First 2.0.0 spin with Direct Message to Module on Edge - not working
See original GitHub issueTook the brand new 2.0.0 for a spin (I was really looking forward to that) and it looks promising, but still no success:
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']
MethodInvokeOperation: completing with error HTTP operation returned: 504 GatewayTimeoutError(Error: Gateway Timeout) caused by None
Callback completed with error HTTP operation returned: 504 GatewayTimeoutError(Error: Gateway Timeout) caused by None
azure.iot.device.exceptions.ServiceError: HTTP operation returned: 504 GatewayTimeoutError(Error: Gateway Timeout) caused by None
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/azure/iot/device/iothub/aio/async_clients.py", line 29, in handle_result
return await callback.completion()
File "/usr/local/lib/python3.5/dist-packages/azure/iot/device/common/async_adapter.py", line 93, in completion
return await self.future
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
azure.iot.device.exceptions.ServiceError: HTTP operation returned: 504 GatewayTimeoutError(Error: Gateway Timeout) caused by None
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "dm_2.py", line 42, in <module>
loop.run_until_complete(main())
File "/usr/lib/python3.5/asyncio/base_events.py", line 466, in run_until_complete
return future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
File "dm_2.py", line 30, in main
device_id="Haven2", module_id="motion-detection", method_params=fake_method_params
File "/usr/local/lib/python3.5/dist-packages/azure/iot/device/iothub/aio/async_clients.py", line 466, in invoke_method
method_response = await handle_result(callback)
File "/usr/local/lib/python3.5/dist-packages/azure/iot/device/iothub/aio/async_clients.py", line 39, in handle_result
raise exceptions.ClientError(message="Unexpected failure", cause=e)
azure.iot.device.exceptions.ClientError: Unexpected failure caused by HTTP operation returned: 504 GatewayTimeoutError(Error: Gateway Timeout) caused by None
Is the output, when running https://github.com/Azure/azure-iot-sdk-python/blob/master/azure-iot-device/samples/async-edge-scenarios/invoke_method_on_module.py inside a module on a device. Python 3.5.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Cloud to device message with iot edge device - Microsoft Q&A
Hi, I used to use function triggered by iot hub to send cloud to device message. Now, that i decide to use my...
Read more >PySimpleGUI
This User's Manual; The Cookbook; The 170+ Demo Programs; Docstrings enable you to access help directly from Python or your IDE; Searching the...
Read more >Using The Lua Script - ExpressLRS
Enter the Lua script by selecting "ExpressLRS" in the Tools menu and pressing ENTER. If the parameter list does not populate after a...
Read more >Unable to resolve module `react-native-reanimated`
I figured out this because I deleted the node_modules folder and installed again all the dependencies by yarn install so, if have a...
Read more >selenium-wire - PyPI
Chrome, Firefox, Edge and Remote Webdriver supported ... If you get an error about not being able to build cryptography you may be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Argh. I misunderstood the purpose. I need code that listen to a method Call inside a module. Sorry. My mistake.
Hey @njbuch let’s figure out what’s wrong! When you are invoking the method on the target device or module, is the client set up to respond to your specific method invoke parameters? A 504 timeout to me might hint at that. If you could post some anonymized debug logs of the run here too that would be helpful in addition to the stack trace already provided.