vscode-sqltools icon indicating copy to clipboard operation
vscode-sqltools copied to clipboard

Extensions always connect to localhost, but host in config different.

Open nipua opened this issue 3 years ago • 3 comments

I have postgresql on virtual machine with address 192.168.88.101 settings.json

{
    "workbench.colorTheme": "Visual Studio 2019 Light",
    "workbench.iconTheme": "material-icon-theme",
    "editor.fontSize": 15,
    "editor.minimap.enabled": false,
    "diffEditor.ignoreTrimWhitespace": false,
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "sqltools.connections": [
    
        {
            "askForPassword": true,
            "database": "blog",
            "driver": "PostgreSQL",
            "name": "blog",
            "pgOptions": {
            },
            "port": 5432,
            "previewLimit": 50,
            "server": "192.168.88.101",
            "username": "blog_admin"
        }
    ]
}

error log

['sql:ext:main:info'] EXECUTING => sqltools.selectConnection
['sql:ext:main:info'] EXECUTING => sqltools.getConnections
['sql:ext:main:info'] EXECUTING => sqltools.getConnections
['sql:ext:error-handler'] Error opening connection no pg_hba.conf entry for host "192.168.88.254", user "blog_admin", database "blog", SSL off
['sql:ext:error-handler:verbose'] [ResponseError: no pg_hba.conf entry for host "192.168.88.254", user "blog_admin", database "blog", SSL off
	at /Users/op/.vscode/extensions/mtxr.sqltools-0.22.11/extension.js:16:111706
	at /Users/op/.vscode/extensions/mtxr.sqltools-0.22.11/extension.js:16:112113
	at Immediate.<anonymous> (/Users/op/.vscode/extensions/mtxr.sqltools-0.22.11/extension.js:16:112655)
	at processImmediate (internal/timers.js:439:21)
	at process.topLevelDomainCallback (domain.js:131:23)] {
  code: -32001,
  data: { driver: 'PostgreSQL', driverOptions: { pgOptions: {} } }
}

Desktop (please complete the following information):

  • SQLTools Version [v0.22.11]
  • VSCode Version: [June 2020 (version 1.47)]
  • OS: [Mac Catalina]
  • Driver:
    • [ ] PostgreSQL
  • Database version: [PostgreSQL v12]

nipua avatar Aug 02 '20 21:08 nipua

i have the same issue, when i am trying to connect via VPN to my db. when i turn of vpn i see in the cscode-sqltools logs that the correct host is used but of course is not reachable

flokain avatar Apr 22 '21 13:04 flokain

is there a way to increase the loglevel of sqltools?

flokain avatar Apr 22 '21 13:04 flokain

Is it possible you also have a workspace-level definition? See #872

gjsjohnmurray avatar Jul 22 '22 22:07 gjsjohnmurray