lcarli / NodeRedIoTHub

Fork from origin plus changes
Apache License 2.0
14 stars 24 forks source link

[armv7] Error while trying to send message:Unauthorized #24

Closed daniel6096 closed 5 years ago

daniel6096 commented 6 years ago

Hi everyone,

I encounter a problem on armv7 platform. It always shows "authorized" when I try to send message to Azure. The same procedure is OK on my x86 PC. Here is my system configuration.

Node.js@6.10.3 Node-RED@0.18.6 node-red-contrib-azure-iot-hub@0.4.0

13 Jul 11:04:17 - [info] Started flows 13 Jul 11:04:23 - [info] [azureiothub:Azure IoT Hub] JSON 13 Jul 11:04:23 - [info] [azureiothub:Azure IoT Hub] Connection to IoT Hub not established or configuration changed. Reconnecting. 13 Jul 11:04:23 - [info] [azureiothub:Azure IoT Hub] Connecting to Azure IoT Hub: Protocol: http Connection string :HostName=IoTHubTest111222.azure-devices.net;DeviceId=device146;SharedAccessKey=KytvWFxJvtpsp9BYlwvAziNW8GAyY3+dsgLHeLe/DMw= 13 Jul 11:04:26 - [info] [azureiothub:Azure IoT Hub] Connected to Azure IoT Hub. 13 Jul 11:04:26 - [info] [azureiothub:Azure IoT Hub] Message is pending. Sending it to Azure IoT Hub. 13 Jul 11:04:26 - [info] [azureiothub:Azure IoT Hub] Sending Message to Azure IoT Hub : Payload: "{tem: 25, wind: 20}" 13 Jul 11:04:26 - [error] [azureiothub:Azure IoT Hub] Error while trying to send message:UnauthorizedError: Could not send message: Unauthorized 13 Jul 11:04:27 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:28 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:29 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:30 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:31 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:32 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:33 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:34 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:35 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:36 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:37 - [error] [azureiothub:Azure IoT Hub] Unauthorized 13 Jul 11:04:38 - [error] [azureiothub:Azure IoT Hub] Unauthorized

Best regards, Daniel

daniel6096 commented 5 years ago

Finally I find this is not an issue. After set correct system time, this issue does not happen anymore.