-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module gets disconnected after some time #19
Comments
Hi jabaloo, I looked at the logs - it seems like the module EdgePublisher was not connected to the EdgeHub for a long time (for some reason), but eventually it did connect to the EdgeHub and the EdgeHub was able to send messages to IoTHub (look at the last few lines in the log you attached). Is that not what you are seeing? |
Hi Varunpuranik In fact after this happens, the module is no longer able to send any messages. In the module log, I get the lines (taken from another occasion when this problem happened):
|
It happened again last night. I am not sure if it's the same problem but the effect is the same. the first problem occurs when the token needs to be renewed (log of edgeHub):
Some time later, it seems to reconnect the module
But shortly after it gets a SSL exception
After that I get messages that the module is disconnected
I got one more time the message that the module has connected, but then I get another error
At this stage, the module stops sending messages and never recovers, throwing this message (module log):
Some time later, I get another error message at edgeHub:
Those error messages keeping coming at the log and the module never recovers.. Cheers |
Thanks for all the details, @Jabaloo ! I will look at all the logs and see if I can get to the bottom of the issue. Meanwhile, can you try switching your module to AMQP (instead of MQTT). Basically when you create the ModuleClient, pass in AMQP as the transport type. |
I would add if your module sits quiet in AMQP, you will want to make sure you implement a connection state handler and capture the status/reason of Disconnected/Client_close (and then just reconnect). There seems to be one time event of disconnect after 4 or 5 mins of inactivity. After the initial, I don't see it again.
…________________________________
From: Varun Puranik <[email protected]>
Sent: Wednesday, July 18, 2018 12:37 PM
To: Azure/iotedge
Cc: Subscribed
Subject: Re: [Azure/iotedge] Module gets disconnected after some time (#19)
Thanks for all the details, @Jabaloo<https://github.com/jabaloo> ! I will look at all the logs and see if I can get to the bottom of the issue.
Meanwhile, can you try switching your module to AMQP (instead of MQTT). Basically when you create the ModuleClient, pass in AMQP as the transport type.
From what we have seen, AMQP seems more stable for long running modules, mainly because the token update happens over the CBS link.
Let me know if you run into any problems with that.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#19 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/APvMfI3VofSTP-5ZHOP37n16BeZ-jWqpks5uH3I9gaJpZM4VO-I9>.
|
Thanks @varunpuranik
I have modules that generate the data by polling the local machine, and modules that do processing on the data before sending it to Azure thanks |
For tracking, it seems to be the same problem: Azure/azure-iot-sdk-csharp#558 |
@lucianoctorres There are a couple of issues affecting the MQTT connections right now, and both are related to the C# SDK - |
For tracking, we believe the underlying issue has been fixed in dotnetty here: Azure/DotNetty#413 We need to cut a release of DotNetty and get the SDK updated. |
Hello, @myagley ! Thanks for applying this fix! |
We are working on getting a new C# SDK release out today. I think the only way to address in the meantime is to use the latest DotNetty release and build upgrade the C# SDK and build as part of your project. New C# SDK should be out in a couple of hours. |
@MaxKhlupnov Version 1.18.0 of the C# SDK is now out on nuget.org. This contains the new version of DotNetty that includes this fix. |
@myagley thanks for prompt help! Appreciated! |
Few comments: Original issue uses Python SDK and not C#. And I tested with release 1.0.1 of Edge Hub, problem is still there. Is it because 1.18.0 is not yet integrated in Edge Hub? |
I see, I was under the impression you were using the C# SDK. This is most likely a client side issue (not the EdgeHub). We have heard similar issues with the Python SDK, and are looking into it. |
@lucianoctorres the MQTT connection issues were purely client side, not in the Edge Hub. Not integrating 1.18.0 into the Edge Hub shouldn't have any effect for this specific issue. Like @varunpuranik mentions we should look at the Python SDK. |
Version 1.0.2 of the runtime was just released. In addition to bumping the DotNetty/Device SDK dependencies in the Edge Hub to the latest versions, this release also includes updates to allow operation when disconnected. You can read more about this here:
The changes required for offline operation improve some of the edge cases for when the Edge Hub is able to drain a module's/downstream device's message queue. The Edge Hub can now send data upstream using its credentials, on behalf of the module. This means it always has a valid set up credentials to connect to Edge Hub. This brings more stability. |
I appear to be having that same problem, running on RPi arm32. The module starts fine and then after a few hours disconnects. Is there a know fix to this issue? See log below... |
And one more thing, the custom module fails with the following message... Sending message: {'temperature': 33.46,'humidity': 75.37, 'Timestamp': November 21, 2018 - 01:35:10PM} |
Any updates? |
Is this resolved in azure C SDK. Because the latest C sdk still giving me error like " AMQP doesn't support input queues" error. |
The ARM32 issue mentioned a couple of comments above was fixed in |
Hey, I am facing this issue too.
All communications between the device and cloud (both C2D and D2C) halt after some hours. |
Everything starts working again normally when I restart the iotedge service:
|
I still see this behavior on both development IoT Edges as well in production. Is there anything new regarding it? |
This issue is being marked as stale because it has been open for 30 days with no activity. |
@varunpuranik was this fixed for 1.0.8? |
This should be fixed with 1.0.8.4. Please re-open the issue if you are still the issue with 1.0.8.4 and provide the complete EdgeHub debug logs. |
O.k. but when will an update hit https://packages.microsoft.com/ubuntu/16.04/multiarch/prod? As far as I can see this release is still 1.0.8(.0)? |
I have several modules running on an Edge device running on Linux (Edge GA)
After some time, one of the modules is no longer able to send messages to IoT Hub. Even after restarting iotedge it is not able to recover. Sometimes (not always) deleting all docker containers and images the module recovers and starts sending messages again.
On edgeHub, we have the attached log when we restart iotedge and it it is not able to recover.
The module AutomationPublisher is the one which generates the data, and EdgePublisher is the one that sends it to IoT Hub.
log.edgepublisherproblem.txt
The text was updated successfully, but these errors were encountered: