0

I am having issues after deploying my app.

I can connect properly via local setup using cloudsql proxy and here is the recent connection log :

2016/10/31 12:15:49 Listening on cloudsql/santex-1101:asia-east1:santexdb for santex-1101:asia-east1:santexdb 2016/10/31 12:15:49 Ready for new connections 2016/10/31 12:56:48 New connection for "santex-1101:asia-east1:santexdb" 

Here is the post describing my setup and error log:

App Engine : Flexible

CloudSQL : 2nd Gen

Framework : Node.js

Node lib: mysql

I am seeing this error after I deploy :

2016/10/29 11:38:03 listenInstance: "santex-1101:asia-east1:santexdb" 2016/10/29 11:38:03 Remove("/cloudsql/santex-1101:asia-east1:santexdb") error: remove /cloudsql/santex-1101:asia-east1:santexdb: no such file or directory 2016/10/29 11:38:03 Open socket for "santex-1101:asia-east1:santexdb" at "/cloudsql/santex-1101:asia-east1:santexdb" 2016/10/29 11:38:03 Socket prefix: /cloudsql 2016/10/29 11:39:20 listenInstance: "santex-1101:asia-east1:santexdb" 2016/10/29 11:39:20 Remove("/cloudsql/santex-1101:asia-east1:santexdb") error: remove /cloudsql/santex-1101:asia-east1:santexdb: no such file or directory 2016/10/29 11:39:20 Open socket for "santex-1101:asia-east1:santexdb" at "/cloudsql/santex-1101:asia-east1:santexdb" 2016/10/29 11:39:20 Socket prefix: /cloudsql 

app.js :

var pool = mysql.createPool({ connectionLimit: 100, multipleStatements: true, user: config.get('MYSQL_USER'), password: config.get('MYSQL_PASSWORD'), database: config.get('MYSQL_DATABASE'), socketPath: "/cloudsql/santex-1101:asia-east1:santexdb" }); 

app.yaml :

runtime: nodejs vm: true beta_settings: cloud_sql_instances: "santex-1101:asia-east1:santexdb" 

I also did ssh into the vm to check and I can see that /cloudsql/santex-1101:asia-east1:santexdb is existing.

I am not sure what is causing this problem. I don't think it is a credentials issue either from what I can see in the messages from Logging app in the cloud console.

Thanks in advance,

timecatcher

1
  • 1
    What you're seeing in the logs isn't an error. It's simply showing you that it's opening a new socket, but first tries to remove it if it already exists, hence the 'no such file or directory'. I have a working app which shows the same log output. Are you experiencing any actual connectivity problems? You'd see something like ECONNREFUSED in the logs instead. Commented Dec 10, 2016 at 21:28

1 Answer 1

2

Looking at your error trace, it seems that the socket is created successfully toward the end. Make sure to verify if you are getting any additional error messages and check if you’re experience any observable problems with your application connecting to your Cloud SQL instance.

You can refer to Using Cloud SQL with Node.js tutorial for further information.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.