Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task
nipua opened this issue Aug 2, 2020 · 3 comments
Closed
1 task
Labels
needs more info Awaiting response from reporter

Comments

@nipua
Copy link

nipua commented Aug 2, 2020

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 nipua added the triage label Aug 2, 2020
@flokain
Copy link

flokain commented Apr 22, 2021

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
Copy link

flokain commented Apr 22, 2021

is there a way to increase the loglevel of sqltools?

@gjsjohnmurray
Copy link
Collaborator

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

@gjsjohnmurray gjsjohnmurray added the needs more info Awaiting response from reporter label Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info Awaiting response from reporter
Projects
None yet
Development

No branches or pull requests

3 participants