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.

RPC remain registered after connection is lost

See original GitHub issue

My client side environment: Google Chrome 40.0.2214.111 (Official Build) Revision 6f7d3278c39ba2de437c55ae7e380c6b3641e94e-refs/branch-heads/2214@{#480} OS Mac OS X Blink 537.36 (@189455) JavaScript V8 3.30.33.16

My server side environment: Crossbar.io package versions and platform information:

Crossbar.io : 0.9.11

Autobahn|Python : 0.9.3-3 WebSocket UTF8 Validator : wsaccel-0.6.2 WebSocket XOR Masker : wsaccel-0.6.2 WAMP JSON Codec : ujson-1.33 WAMP MsgPack Codec : msgpack-python-0.1.10 Twisted : 14.0.2-EPollReactor Python : 2.7.3-CPython

OS : Linux-3.13.0-39-generic-x86_64-with-Ubuntu-12.04-precise Machine : x86_64

I have client-side JavaScript running within the browser that registers RPC handlers. These handlers function as expected while I am connected (using a corporate VPN). When I reconnect after the connection is dropped (the VPN goes down) I encounter the following:

Potentially unhandled rejection [1] {"error":"wamp.error.procedure_already_exists",
"args":["register for already registered procedure 'com.example.rpc'"],"kwargs":{}} 
(WARNING: non-Error used)autobahn.js:12110 (anonymous function)

I believe these should automatically unregister when the connection is lost. However I would be satisfied with a means to remove the orphaned registrations.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
colmaenguscommented, Apr 14, 2017

I’m seeing this issue even when using auto_ping. I’m using crossbar 16.10.1 with autobahn.js clients. The problem is that registrations are left hanging even though the session is detected as disconnected. So when I query registration details I get the following:

{ id: 7893628210237042, invoke: ‘single’, match: ‘wildcard’, created: ‘2017-04-11T20:34:03.341Z’, uri: ‘com.myprocedure’, callees: [ null ], calleeCount: 1 }

When I restart the client its unable to create the registration again. Is there any way to explicitly delete the registration without a callee session id ?

I’ve tried to reproduce this using a small test but have been unable to do so but its happening quite a lot on our deployments. This is related to crossbario/crossbar/issues/980

Any suggestions on what I could try to help reproduce this as its a big problem for us ?

1reaction
oberstetcommented, Feb 24, 2015

@shaworth Crossbar.io automatically unregisters all registrations (and subscriptions) a client has established when it detects that the client connection is gone. When the VPN silently drops the TCP connection, this goes unnoticed on the server side. This is an aspect of TCP: when no data is sent, a dead connection can go unnoticed for a long time.

For these reasons, Crossbar.io has options for WAMP-over-WebSocket to do automatic WebSocket ping/pong for fast detection of dead connections. Have a look at the docs here http://crossbar.io/docs/WebSocket-Options/

Try these settings:

      "auto_ping_interval": 1000,
      "auto_ping_timeout": 2000,
      "auto_ping_size": 4

This means, every 1000ms Crossbar.io will send a WebSocket ping of payload size 4 bytes. When that ping isn’t replied within 2000ms, Crossbar.io will assume the connection to be dead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix "The RPC Server is Unavailable" Error in Windows
A complete guide to help you tackle your "RPC server is ... 2) Right click the network connection you are using, and then...
Read more >
How to fix remote connection error ("RPC server is unavailable")
Steps to enable "File and Printer Sharing for Microsoft Networks": Select Start --> Settings --> Network Connections.
Read more >
Windows Server Troubleshooting: RPC server is unavailable
This error message may occur if the File and Printer Sharing for Microsoft Networks component is not enabled on the remote computer.
Read more >
How to Solve the "RPC Server is Unavailable" Error in ...
1. Restart the RPC Server · 2. Clean Boot the Computer to Rule Out Third-Party Applications · 3. Check Your Network Connection Settings...
Read more >
ORA-28511 lost RPC connection to heterogeneous
I have "ORA-28511 lost RPC connection to heterogeneous" on heterogeneous connection with mysql. ... Sign in or register to get started.
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