no pg_hba.conf entry error

Evan Corkrean 35 Reputation points
2023-08-31T23:58:54.5+00:00

Hello,

I receive the following error when trying to connect to an Azure Database for PostgreSQL flexible server.

psql: error: connection to server at "example.postgres.database.azure.com" (20.39.50.159), port 5432 failed: SSL error: certificate verify failed

connection to server at "postgrestestcorkrean.postgres.database.azure.com" (20.39.50.159), port 5432 failed: FATAL: no pg_hba.conf entry for host "redacted_ip", user "evan", database "postgres", no encryption

I spun this DB up about 30 min ago. I've confirmed that my IP is allowed in the firewall and public access is enabled.

psql client version = 14.9

PostgreSQL version = 15.3

Azure Database for PostgreSQL
{count} vote

1 answer

Sort by: Most helpful
  1. SSingh-MSFT 16,371 Reputation points Moderator
    2023-09-01T03:45:44.0033333+00:00

    Hi
    Evan Corkrean
    •,

    Welcome to Microsoft Q&A forum and thanks for using Azure Services.

    As I understand, you are getting error: "no pg_hba.conf entry error" in Azure Database for PostgreSQL Flexible Server.

    Could you please refer to the solutions provided in this Stackoverflow thread and see if this helps in your case:

    https://stackoverflow.com/questions/1406025/no-pg-hba-conf-entry-for-host

    Let us know if it does not help and share configuration details of your server.

    Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.