Share via

Azure Postgres flexible sql server authentication error.

rishabh krishna 0 Reputation points
2026-02-11T13:43:35.84+00:00

I am using azure postgres sql server , which is vnet integrated , it was working fine but a week a go I started to get-
Unable to connect to server: connection failed: connection to server at ip , port 5432 failed: FATAL: password authentication failed for <user>

this error without making any change,

I tried to to reset the password and login but still getting same issue.

I am working in private environment, with a vpn in local which has ip and endpoint in the host file which makes it accessible to vnet integrated server , with pgadmin client.

The other environments are working just fine with same subnets and same parameters.

Azure Database for PostgreSQL
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Pilladi Padma Sai Manisha 5,070 Reputation points Microsoft External Staff Moderator
    2026-02-11T14:37:55.1333333+00:00

    Hi rishabh krishna,
    Thankyou for reaching Microsoft Q&A!
    If this suddenly started without any configuration change, the issue is usually network path, DNS resolution, or cached credentials rather than the database itself especially since other environments on the same subnets still work.

    First, confirm that your client is really reaching the correct private endpoint. Because you are using a VPN + hosts file, verify that the hostname resolves to the current private IP. Azure Flexible Server private endpoints can change during maintenance or failover, and a stale hosts entry will cause authentication failures even though the server is reachable.

    Next, test connectivity outside pgAdmin to rule out client caching:

    psql "host=<fqdn> user=<user> dbname=postgres sslmode=require"

    pgAdmin sometimes stores old passwords internally, so remove the saved connection profile and recreate it instead of just updating the password.

    Also check these common causes that look like password failures:

    Ensure you are connecting with the full username format username@servername (Flexible Server requires this depending on auth mode).

    Verify that SSL is enabled. If SSL enforcement was updated by platform maintenance, non-SSL attempts can return authentication errors.

    Confirm DNS from your machine while connected to VPN: nslookup <server>.postgres.database.azure.com The IP should match the private endpoint, not a public address.

    Finally, review server logs under Monitoring > Server logs. If you see repeated auth failures but no network rejects, it confirms the client is reaching the server with wrong credentials format rather than being blocked by VNet rules.

    Since password reset didn’t help and other environments work, I would strongly suspect hosts file/DNS mismatch or pgAdmin cached credentials those are the most common causes in private VNet + VPN setups.


  2. Q&A Assist
    2026-02-11T13:43:52.11+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error message you are encountering, "FATAL: password authentication failed for <user>", typically indicates that the password being used is incorrect. Since you mentioned that you have already tried resetting the password and are still facing the same issue, here are some additional troubleshooting steps you can consider:

    1. Check Firewall Configuration: Ensure that your Azure Database for PostgreSQL firewall settings allow connections from your current IP address, especially since you are using a VPN. You may need to verify that your VPN's IP address is included in the allowed IP ranges.
    2. Client Firewall: Make sure that the firewall on your local machine allows outbound connections to the Azure PostgreSQL server on port 5432.
    3. SSL Configuration: If your server requires SSL connections, ensure that your pgAdmin client is configured to use SSL. You can set the SSL mode in pgAdmin to require SSL if it is not already set.
    4. Connection String: Double-check your connection string and ensure that all parameters are correct, including the server name, port, database name, user, and password.
    5. Logs Review: Review the server logs for any additional error messages or clues regarding the failed authentication attempts. This can help identify if there are specific issues with the connection attempts.
    6. Network Configuration: Since you mentioned that other environments are working fine, compare the network configurations of those environments with the one that is failing to identify any discrepancies.

    If after trying these steps you are still unable to connect, consider reaching out to Azure support for further assistance.


    References:

    0 comments No comments

Your answer

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