Connection time out error while trying to connect to YbManaged sandbox cluster from node js application

I am trying to test the sample application given in the docs in my local
I am using the node js application
The below is my config file

const config = {
    host: 'us-central1.9aee433e-0a44-44a1-82c2-b68bec633f16.gcp.ybdb.io',
    port: '5433',
    database: 'yugabyte',
    user: 'admin',
    password: 'qpINGl19T4bXunoMtCVxvvrDFyJ5a_',
    // Uncomment and initialize the SSL settings for YugabyteDB Managed and other secured types of deployment
    ssl: {
         rejectUnauthorized: true,
        ca: fs.readFileSync('C:/yugabyte/root.crt').toString()
     },
    connectionTimeoutMillis: 90000
};

**But I am getting connection time out every time
**

>>>> Connecting to YugabyteDB!
Error: connect ETIMEDOUT 34.171.17.184:5433
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16) {
  errno: -4039,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '34.171.17.184',
  port: 5433
}

Can Anybody please tell me what I am doing wrong

Hi, to you add the IP of your application server to the Allow IP list in YugabyteDB Managed?

On a server with openssl installed, you can validate the ability to connect to any server, and thus including YBManaged using the openssl utility:

openssl s_client -connect <hostname|ipaddress>:<port>

If the port is open, the first result will show:

CONNECTED(00000003)

If the port is not firewalled, but on the server no process has opened the port, the port state is called ‘closed’, and the first line will read:

connect: Connection refused

If the port is firewalled, it will simply not respond. This means the utility will wait for a long time (it waits for the tcp timeout), and then say:

connect: No route to host
1 Like