Unable to connec to Azure Database for PostgreSQL flexible server from AWS VPC with site-to-site VPN
I want to connec to Azure Database for PostgreSQL flexible server from AWS VPC.
I created site-to-site VPN and the VPN status is all right.
But I still cannot connec to the Azure Database for PostgreSQL flexible server from AWS VCP with this VPN.
Logs as below:
codeuser@ct-webapp-84f48f595c-rzzpx:/app> psql -h 10.0.2.4 -U ct_production
psql: error: connection to server at "10.0.2.4", port 5432 failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
codeuser@ct-webapp-84f48f595c-rzzpx:/app> telnet 10.0.2.4 5432
Trying 10.0.2.4...
Connected to 10.0.2.4.
Escape character is '^]'.
Connection closed by foreign host.
Azure Database for PostgreSQL flexible server Info:
Subscription ID: c39ac57b-719f-4e84-a558-7f2a95cb1357
Resource group: shoot--sap-jam--eu21-int1
Server name: eu21-int1
VPN: eu21-int1_pg_db_vnet_gateway