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

No pg_hba.conf for host #72

Closed
5 of 7 tasks
brbarkley opened this issue Mar 21, 2018 · 7 comments
Closed
5 of 7 tasks

No pg_hba.conf for host #72

brbarkley opened this issue Mar 21, 2018 · 7 comments

Comments

@brbarkley
Copy link

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

Received error message: "no pg_hba.conf entry for host..." when trying to connect to postgresql database using SQLTools. I can connect on same computer from command line using psql and via python using psycopg2. Do you know what the problem might be?

Steps to Reproduce (For bugfixes)

  1. Entered sqltools.connections settings

sqltoolsconnections

  1. Connect to database and receive message "currently connected"

  2. Used SQLToolsConnection: Run Query

Expected behavior: [What you expected to happen]
Expected to retrieve data from database

Actual behavior: [What actually happened]
Received error message: "no pg_hba.conf entry for host..."

image

Versions

  • Version: SQLTools v0.12.1
  • OS: Windows 10
  • SGDB: PostgresSQL

You can get this information from executing SQLTools: Version from VSCode Quick Open.

@mtxr mtxr added bug feature request New issue opened using "Feature request" template labels Apr 18, 2018
@mtxr
Copy link
Owner

mtxr commented May 8, 2018

@mtxr mtxr added help wanted and removed bug feature request New issue opened using "Feature request" template labels May 8, 2018
@mtxr
Copy link
Owner

mtxr commented Jun 6, 2018

Closing. No response.

@mtxr mtxr closed this as completed Jun 6, 2018
@fatangare
Copy link

I am facing same issue while connecting to aws redshift

@sabahang
Copy link

sabahang commented Feb 11, 2020

@mtxr I understand I need to make a change in postgresql.conf but where is this file? my postgres is on a cloud server and everyone else can connect to it. I'm not running it locally nor have access to it's config

@holgerzer
Copy link

@mtxr I understand I need to make a change in postgresql.conf but where is this file? my postgres is on a cloud server and everyone else can connect to it. I'm not running it locally nor have access to it's config

I'm facing the same situation. I tried to add the pgOptions to my settings (see #547 ) but can't find the json.

@Vorobeyko
Copy link

i fixed problem with following step

  1. Enabled ssl
  2. check requestCert
image

@jqknono
Copy link
Contributor

jqknono commented Dec 29, 2023

To connect to AWS RDS, I need to set this TWO:

  • SSL: Enabled
  • rejectUnauthorized: Check And Uncheck. This is important, and make a difference.

The "rejectUnauthorized": false should fill in the setting explicitly.

{
  "pgOptions": {
    "ssl": {
      "requestCert": true,
      "rejectUnauthorized": false
    }
  },
  "previewLimit": 50,
  "server": "XXX",
  "port": 5432,
  "driver": "PostgreSQL",
  "name": "aws.rds.starter",
  "username": "XXX",
  "database": "XXX"
}

gjsjohnmurray pushed a commit that referenced this issue Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants