Hi Wappler Community,
I've created a new website in Node.JS and set up the database connections through the target settings, but I'm facing an issue. I have a database connection called "ConnDataSQL" configured in both the Database Manager and the Server Connect Workflows under Globals/Database Connection. The database itself is a DigitalOcean Database Cluster.
Here's the strange part: even though I made sure that the database credentials are identical for both localhost and the production server, I keep getting an ETIMEDOUT error locally. However, when I build the Docker image on the production server, everything works smoothly.
The error message I get when running a simple query on Server Connect locally is:
{
"status": "500",
"code": "ETIMEDOUT",
"message": "connect ETIMEDOUT",
"stack": "Error: connect ETIMEDOUT\n at Connection._handleTimeoutError (/opt/node_app/node_modules/mysql2/lib/connection.js:205:17)\n at listOnTimeout (node:internal/timers:581:17)\n at process.processTimers (node:internal/timers:519:7)"
}
The local connection file is:
{
"name": "ConnDataSQL",
"module": "dbconnector",
"action": "connect",
"options": {
"client": "mysql2",
"connection": {
"host": "private-xxxxxxxxx.b.db.ondigitalocean.com",
"port": 25060,
"user": "xxxx",
"password": "xxxxxxxxxxx",
"database": "xxxxxx",
"ssl": {
"ca": "/certs/ca-certificate.crt"
}
},
"databaseResource": "digitalocean / august2022",
"cloudDatabaseName": "xxxxxx"
}
}
This configuration is identical to the one on the production server, yet I keep receiving the ETIMEDOUT error locally.
If anyone can help or has encountered a similar issue, I'd greatly appreciate any advice.
Thanks in advance!