grpc-node: Error: No connection established
Problem description
Since google-gax
forced the grpc-js
version to 0.6.4 (https://github.com/googleapis/gax-nodejs/commit/628db9e84c61017dfaba22ac7c2215e2c79c9745), I am having the following issue :
Error: No connection established
at Http2CallStream.call.on (/usr/src/node_modules/@google-cloud/bigtable/node_modules/@grpc/grpc-js/build/src/call.js:68:41)
at Http2CallStream.emit (events.js:203:15)
at Http2CallStream.EventEmitter.emit (domain.js:448:20)
at process.nextTick (/usr/src/node_modules/@google-cloud/bigtable/node_modules/@grpc/grpc-js/build/src/call-stream.js:75:22)
at process._tickCallback (internal/process/next_tick.js:61:11)
Reproduction steps
The bug only happens after one hour. We are using grpc-js
inside @google-cloud/bigtable
and our bigtable instance is autoscaling.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 46
- Comments: 94 (30 by maintainers)
@alexander-fenster I tried v0.6.5 and I still have the issue. Lots of
Error: No connection established
after an hour of runtime.@murgatroid99 we are seeing that our services are running fine for 10ish minutes and then we start dropping connections. At this time we see deadline exceeded errors. Once this happens we are unable to have successful requests with both
google-cloud/pubsub
andgoogle-cloud/datastore
@alexander-fenster we are seeing this using with services running within GKE containers
Same issue when using
@google-cloud/datastore
which depends ongoogle-gax
I’m hoping this issue hasn’t resurfaced, but I did encounter the same error in a project that had been idle for some time. I recycled the pod so I should have an idea of the timeout being the cause in the future, but it impacted all our instances in a test environment.
The error:
We install dependencies from the
package-lock.json
, which has@grpc/grpc-js
locked in at1.0.4
.Will have another issue opened if this has resurfaced. I’ll be back with more if it’s an issue we come across again.
Same here, with DataStore and PubSub, 0.6.5 doesn’t fix the issue
I have now published grpc-js version 0.6.9 with some changes that appear to further improve this situation in certain cases.
Same error use firebase admin work with firestore “No connection estabilished”
We downgraded
@grpc/grpc-js
to 0.5.4 and also other related google libraries to a version that don’t depend on@grpc/grpc-js@0.6.x
. The problem seems gone. It may related to #1062 & #1061@murgatroid99 Sorry for the late reply. Pods have been stable, version
0.6.18
has fixed my issues. Thanks again for the quick reply and the fix.I had a rogue reference in my package-lock.json
After nuking that and starting from a clean slate I was able to get the correct grpc-js version. For those interested it was under google-gax as a required dependency
@grpc/grpc-js": "0.6.9"
I have since had three scheduled calls go off with no failures. Fingers crossed this is the one, thanks for the timely responses from all and the community support!
I have published grpc-js version 0.6.8 that contains more potential fixes for these errors.
I have published grpc-js version 0.6.7 that should hopefully resolve this issue for the people who are still experiencing it. If you can update to it please try it out.
We have seen those errors starting to occur around 1 hour after a fresh pod creation. After those started, all subsequent calls were starting to fail. Pintpointing lib to previous working version (0.5.2) resolved the issue. (using google Firestore)
would be reasonable to suggest using pinned @grpc/grpc-js versions ? just to avoid a large impact when those sensitive dependencies run into issues.
@murgatroid99 still testing 0.6.8 on my side. Haven’t encountered any error yet but I will leave it in production for a day to be sure. Is it possible not to pin
@grpc/grpc-js@0.6.7
in@google-cloud/common-grpc
? It makes me push the 0.6.7 version by mistake. Thanks guys.I use
node-pubsub
,npm ls @grpc/grpc-js
:After server restart all works fine, but after some time when I call
publish
nothing not sends. Latests debug info in logs:And:
And after some times(messagees still not sends to pubsub):
I have published 0.6.6 with another possible fix for this problem. If anyone is willing to try it out and report the result that would be helpful.