Open LaudixGit opened 8 months ago
Note: the device appears to have the latest versions installed
This seems to imply that running as a container cannot work since Docker already has the connection https://github.com/Azure/azure-iot-sdk-python/issues/445#issuecomment-579489769
the docker container for your module probably has a process that's has it's own network connection for the module
Apparently, the simulated sensor also implements the Direct method. (line 84) This is failing too.
The container is successfully running and telemetry is received in Azure IoT Hub. Module twin is processed successfully.
When 'reset' is sent to the device another line should appear in the log: "Received direct...".
This fails to appear, and the message times out.
For reference, this is the code that show process the Direct request.
Context
Raspberry Pi4B Linux RPi4-Alpha 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux iotedge 1.4.16 Python 3.9.2 pip 23.2.1 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9)
Description of the issue
With Edge agents halted
sudo iotedge system stop
this sample works launched from the command line. Tested by this command in cloudshell:az iot hub invoke-device-method --device-id "Alpha" --hub-name "hub2" --method-name "method1"
With the Edge agent restored (either reboot or
sudo iotedge config apply -c '/etc/aziot/config.toml'
), similar code based on this sample never triggers the on_method_request_received call_back.There are no errors in the logs, however the cloudshell command fails with
Error occurred in request., ReadTimeout: HTTPSConnectionPool(host='edge2.azure-devices.net', port=443): Read timed out. (read timeout=30)
There are no errors in![image](https://github.com/Azure/azure-iot-sdk-python/assets/58885245/49342f84-408e-4852-a540-b857a8b79b11)
sudo iotedge check --verbose
The container successfully writes to the logs - which correctly show in Azure Portal "Troubleshooting'.Command used to create the container:
sudo docker build --rm -f "./modules/App/Dockerfile.arm64v8" -t iotedge.azurecr.io/app:2023.10.12.16.10-arm64 "./modules/App/"
Code sample exhibiting the issue
A simplification of this sample
Console log of the issue
No error in the log