question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Call stuck connecting when server is initially unavailable, but becomes available later

See original GitHub issue

Problem description

I have a (C#) grpc server and (grpc-js) client, which I start simultaneously and connect them over loopback (127.0.0.1). Usually the server becomes ready after the client, thus client will often observe nothing listening on a port initially.

Prior to grpc-js 0.7.5 it worked all quite fine, client and some initial calls that I start waited for the server to get ready and connected silently. Apparently 0.7.5 introduced some fixes that made calls fail-fast when client is not connected, so I modified code passing waitForReady:true in metadata.

Unfortunately, this didn’t bring the previous behavior. Now the client / calls are stuck and never connect successfully.

Reproduction steps

  1. clone https://github.com/kskalski/snippets/tree/master/GrpcJsElectronSharp
  2. cd GrpcJsElectronSharp && ./build.sh (adjust paths as needed in the script)
  3. run ./Server.exe
  4. run ./Client.exe
  5. observe server receiving messages whenever Client’s window is minimized (handler triggering message send)
  6. stop Client and Server
  7. run ./Client.exe
  8. run ./Server.exe
  9. observe server no longer receives messages when Client’s window is minimized (the calls are stuck on connecting)

Environment

  • OS name, version and architecture: Windows 10, x64
  • Node version: Electron 8.3.0 (Node 12)
  • Node installation method Electron
  • If applicable, compiler version .NET 4.6
  • Package name and version 0.7.5 (it happens also on 1.0.3, but I was able to backtrack that the problem appeared between 0.7.4 and 0.7.5)

Additional context

I poked around a bit and it seems that there is TRANSIENT_FAILURE in channel.js (this piece of code executed):

case picker_1.PickResultType.TRANSIENT_FAILURE:
                if (callMetadata.getOptions().waitForReady) {
                    this.pickQueue.push({ callStream, callMetadata });

but nothing happens afterwards, there is never completion or other result of re-connection attempt

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
murgatroid99commented, Jun 3, 2020

grpc 1.24.2 is the other implementation. It shares no code with the library that has the bug that this issue is about. So, that sounds similar but it is definitely not the same bug.

0reactions
sidcool1234commented, Jan 4, 2021

I am on the version ^1.1.7. The bug is showing up still. google pub sub version is 1.1.6.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Find My unable to connect to server | Apple Developer Forums
After opening Find My app I am presented with a dialogue box saying “Find My Unavailable - Unable to connect to the server....
Read more >
DNS Server Unavailable | How to Fix DNS Server Issues
DNS server unavailable? Learn how to fix DNS Server issues with this troubleshooting guide that covers everything you need to know.
Read more >
VoIP Troubleshooting: 5 Fixes for Common Connection Issues
Is your VoIP phone not working? In this VoIP troubleshooting guide, learn how to fix common VoIP issues and know why they happen....
Read more >
Client Calling connect() without server calling listen()
It works perfectly when server is started first (i.e. server calls listen() and then waits for client to call connect() ). Now, what...
Read more >
How to Fix "DNS Server Not Responding" Error (11 Methods)
Fixing this issue can be as simple as troubleshooting your network problems or connecting with a different device. However, there are occasions when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found