I have my site and VM on Azure. PGSQL is on VM. Site and VM is in VPN.
I'm using PDO_pgsql to connect to my DB:
new PDO("pgsql:host=10.0.0.4;port=5432;dbname=db;connect_timeout=5;sslmode=require;options='--client_encoding=UTF8'", $username, $password, array(PDO::ATTR_PERSISTENT => true, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
And when I'm trying to connect, getting this error:
SQLSTATE[08006] [7] could not connect to server: Cannot assign requested address (0x00002741/10049)
I already tryed to resync certs and recreate gateway with no result. And yes, I can connect to DB from my PC by VIP.
What can cause such error?