az postgres flexible-server execute "no pg_hba.conf entry for host" #8410
Labels
Auto-Assign
Auto assign by bot
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Service Attention
This issue is responsible by Azure service team.
Subscription
Describe the bug
I'm getting an error message when running
Warning
Failed connection to 6oz3lgrp6b54q-postgresql. Check error and validate firewall and public access or virtual network settings.
connection to server at ".postgres.database.azure.com" (), port 5432 failed: FATAL: no pg_hba.conf entry for host "", user "", database "postgres", no encryption
But when I try to connect using psql - it works from same host.
docker run -it --rm postgres /bin/bash psql "host=<NAME>.postgres.database.azure.com port=5432 dbname=postgres user=<MY-USER> password=<TOKEN> sslmode=require"
I'm using same user/host/token for this, but for some reason CLI gets blocked.
My IP from the error is added to firewall rules
Related command
az postgres flexible-server execute
Errors
Warning
Failed connection to 6oz3lgrp6b54q-postgresql. Check error and validate firewall and public access or virtual network settings.
connection to server at ".postgres.database.azure.com" (), port 5432 failed: FATAL: no pg_hba.conf entry for host "", user "", database "postgres", no encryption
Issue script & Debug output
Expected behavior
since firewall rules are in place and I can connect to the DB, I expect the CLI command to succeed
Environment Summary
azure-cli 2.67.0
core 2.67.0
telemetry 1.1.0
Extensions:
aks-preview 13.0.0b2
azure-iot 0.25.0
bastion 1.3.1
containerapp 1.1.0b1
load 1.4.0
rdbms-connect 1.0.7
ssh 2.0.6
Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users<USER>.azure\cliextensions'
Python (Windows) 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response
The text was updated successfully, but these errors were encountered: