google-cloud-node: API requests hang indefinitely
Hi,
I’m using google datastore API and if I run my application from my local computer then the application connects to the datastore, but if I deploy the application it cannot connect to the datastore.
Environment details
- OS: Debian GNU/Linux 8
- Node.js version: 6.9.4
- npm version: shipped with Node.js 6.9.4
- @google-cloud/datastore: 0.6.1
Steps to reproduce
I ran the following example on AppEngine instance:
const Datastore = require('@google-cloud/datastore');
const datastore = Datastore({
projectId: '<$projectId>',
keyFilename: './gcloud-keyfile.json'
});
const query = datastore.createQuery('UserModel')
.filter('user_name', '=', 'gosho');
datastore.runQuery(query)
.then((results) => {
const users = results[0];
users.forEach((user) => console.log(user));
});
My question is, why cannot my deployed application connect to the datastore?
Thanks!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 32 (12 by maintainers)
Just released
google-cloud
version0.46.2
– anyone willing to test, please update and let us know how it went.We suspect that this is due to a recent change in
grpc@1.1.1
not dealing properly with the lack of/etc/services
. We are working on an updated version of the Node.js docker image with a work-around that should be available in a few hours.Could folks try deploying again (in a few hours) with the latest runtime image to see if the problem gets resolved?
Note that
vm: true
has been deprecated, and you should update toenv: flex
.threadsafe: true
has no meaning for Node.js apps. TheGCLOUD_PROJECT
environment variable is set automatically for apps deployed withenv: flex
, so after updating toenv: flex
you can removeGCLOUD_PROJECT
from yourapp.yaml
file.But none of that has much to do with the hanging Datastore API calls. I’ve been able to reproduce the problem using three different versions of
@google-cloud/datastore
and I’ve notified the App Engine team.