auto_ping, auto_timeout

45 views
Skip to first unread message

Massimo Oss Noser

unread,
Jul 18, 2016, 12:10:38 PM7/18/16
to Autobahn
Hello,
I'm facing some problems with auto_ping parameters.

In my application two raspberrypi (with Autobahn/Twisted/Python) are connected to a crossbar server.

I have configured the auto_ping and auto_timeout parameters in the file config.json but crossbar don't detect when I unplug the ethernet cable from a connected client (raspberry app). From client side the problem is the same.

Following the indication of Oberstet, I tried to configure the auto_ping and auto_timeout on client side using ".setProtocolOptions(autoPingInterval=1000, autoPingSize=4, autoPingTimeout=1000)" but it seems to have no effect. (https://github.com/crossbario/autobahn-python/issues/702)

I'm running crossbar 0.13.2, Twisted 15.5.0 and Autobhann 0.12.1.

Is there any working example of the auto_ping and auto_timeout parameters (server and client side)?

Thanks.

David Ford

unread,
Jul 18, 2016, 2:06:16 PM7/18/16
to autob...@googlegroups.com
do you also have these settings in crossbar's config? reliable detection for both the router and clients requires ping from both sides

--
You received this message because you are subscribed to the Google Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autobahnws+...@googlegroups.com.
To post to this group, send email to autob...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/1f247511-ec84-4e8d-8e01-b0b14435d382%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Gay/FireRescue/Geek in 33484, USA
It's the ideals of Linux and Open Source that are amazing, it embodies what WE want, not what is marketed

Tobias Oberstein

unread,
Jul 18, 2016, 3:37:54 PM7/18/16
to autob...@googlegroups.com
>> I have configured the auto_ping and auto_timeout parameters in the file
>> config.json but crossbar don't detect when I unplug the ethernet cable from

How do you know Crossbar.io doesn't detect? (Hint: it does indeed work;)

You can turn on debug logging (--loglevel=debug) and watch out for
respective log messages or you can subscribe to session metaevents in a
different session.

>> a connected client (raspberry app). From client side the problem is the
>> same.
>>
>> Following the indication of Oberstet, I tried to configure the auto_ping
>> and auto_timeout on client side using
>> ".setProtocolOptions(autoPingInterval=1000, autoPingSize=4,
>> autoPingTimeout=1000)" but it seems to have no effect. (
>> https://github.com/crossbario/autobahn-python/issues/702)

setProtocolOptions expects seconds for autoXXX Parameters, like here

https://github.com/crossbario/autobahn-python/blob/master/autobahn/twisted/wamp.py#L212

http://autobahn-python.readthedocs.io/en/latest/websocket/programming.html?highlight=setProtocolOptions#common-options-server-and-client

The Crossbar.io config expects ms though (not seconds).

How this helps,
/Tobias

Massimo Oss Noser

unread,
Jul 19, 2016, 7:55:40 AM7/19/16
to Autobahn
Thank you Tobias,
    the client side now works perfectly.

But when I reconnect the cable and restart the client application the program hangs on register my_procerure.

First execution:

2016-07-19T12:10:06+0200 Principal 'client1' using ticket 'cd46c25a-f57e-11e5-9ce9-5e5517507c66'
2016-07-19T12:10:06+0200 Transport connected
2016-07-19T12:10:06+0200 Authentication challenge received
2016-07-19T12:10:06+0200 WAMP-Ticket challenge received: ticket
2016-07-19T12:10:06+0200 Join started: ticket client1 backend
2016-07-19T12:10:07+0200 Register RPC: my_procedure
2016-07-19T12:10:07+0200 Registered RPC: my_procedure
2016-07-19T12:10:07+0200 Starting main cicle...
2016-07-19T12:10:07+0200 call my_procedure: 1
2016-07-19T12:10:07+0200 my_procedure called!
2016-07-19T12:10:09+0200 call my_procedure: 2
2016-07-19T12:10:09+0200 my_procedure called!
2016-07-19T12:10:10+0200 call my_procedure: 3
2016-07-19T12:10:10+0200 my_procedure called!
2016-07-19T12:10:11+0200 call my_procedure: 4
2016-07-19T12:10:11+0200 my_procedure called!
2016-07-19T12:10:12+0200 call my_procedure: 5
2016-07-19T12:10:12+0200 my_procedure called!
<<< CABLE DISCONNECTION >>>
2016-07-19T12:10:13+0200 call my_procedure: 6
2016-07-19T12:10:21+0200 session left
2016-07-19T12:10:21+0200 transport disconnected
2016-07-19T12:10:21+0200 Main loop terminated.

Process finished with exit code 0

Second execution after cable reconnection:

2016-07-19T12:10:45+0200 Principal 'client1' using ticket 'cd46c25a-f57e-11e5-9ce9-5e5517507c66'
2016-07-19T12:10:45+0200 Transport connected
2016-07-19T12:10:45+0200 Authentication challenge received
2016-07-19T12:10:45+0200 WAMP-Ticket challenge received: ticket
2016-07-19T12:10:45+0200 INGESTION SYSTEM Join started: ticket client1 backend
2016-07-19T12:10:46+0200 Register RPC: my_procedure

Looking at crossbar log I don't understand these things:
1) is the second registration of "my_procedure" failed?
2) I have found some parameters related to NativeWorkerClientProtocol where auto_pingXXX are equal to 0.... (???)

(crossbar log attached)

Thanks for the help.
  Max
crossbar_log.txt

Massimo Oss Noser

unread,
Jul 19, 2016, 8:29:29 AM7/19/16
to Autobahn
Mi config.json is attached.
config_json.txt
Reply all
Reply to author
Forward
0 new messages