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.

Disconnect without reconnect in rc13

See original GitHub issue

Up until v2.0rc12 I sometimes had the issue with the (spurious) OutOfMemory error related to connection problems. Since updating to rc13 last week, I did not find those issues anymore, but instead had the following:

02:09:14|pipeline| ERROR |pipeline_stages:_on_mqtt_discon | MQTTTransportStage: _on_mqtt_disconnect called: Paho returned rc==1 caused by None
02:09:14|pipeline| WARNI |pipeline_stages:_on_mqtt_discon | MQTTTransportStage: disconnection was unexpected
02:09:14|pipeline| ERROR |handle_exceptio:handle_backgrou | Exception caught in background thread.  Unable to handle.
02:09:14|pipeline| ERROR |handle_exceptio:handle_backgrou | ['azure.iot.device.common.transport_exceptions.ConnectionDroppedError: None caused by Paho returned rc==1 caused by None\n']

From then on, the connection seemed to be dead with no more messages being sent. Should this exception be handled by the user (me) or should the reconnect be done by the SDK?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:28 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
BertKleeweincommented, Dec 2, 2019

@mounir-futurefacts - I think I see the problem here (and a hole in our testing).

INFO:azure.iot.device.common.pipeline.pipeline_stages_base:ReconnectStage: disconnected, but not virtually connected.  Not triggering reconnect timer.

Your first send_message call was causing the client to connect automatically, and that’s the way it’s supposed to work, but that code path wasn’t setting the flag that triggered the automatic reconnect logic.

You should be able to work around this by calling connect() on the client object before you start sending messages.

1reaction
lokijotacommented, Jan 23, 2020

Same here. Added the connect() call and just get sequences of the following:

MQTTTransportStage: _on_mqtt_disconnect called: Paho returned rc==1 caused by None MQTTTransportStage: disconnection was unexpected Exception caught in background thread. Unable to handle. [‘azure.iot.device.common.transport_exceptions.ConnectionDroppedError: None caused by Paho returned rc==1 caused by None\n’] failed to receive on socket: [Errno 104] Connection reset by peer

This is fixed from my end. I was sending contents of CSV files and by mistake a pretty large one was left in the folder - causing the send_message to fail. A better error message would have been helpful, in any case. //hint, hint 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Your Guide to Energy Disconnection and Reconnection
However, you cannot be disconnected or denied reconnection based on the past due bills of a former customer who no longer resides in...
Read more >
WAC 480-100-128: - WA.gov
The utility may disconnect service without prior notice when it discovers further theft, tampering, or fraud. The utility may refuse to reconnect service...
Read more >
Disconnect Policies | The LIHEAP Clearinghouse
If the customer's service has already been disconnected, the customer must pay a reconnect fee of no more than $36 to restore. Customers...
Read more >
25.483.pdf - Public Utility Commission of Texas
reconnection, and has adequately tested the transactions described in ... Where service is reconnected without authority after disconnection for nonpayment;.
Read more >
Remote Desktop client disconnects and can't reconnect to the ...
Troubleshooting "Class not registered" error with Remote Desktop connection. Cannot connect to RDS because no RD Licensing servers are available ...
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