Failed to list IoT Hub devices Error: Requested Host is not supported ; ArgumentInvalid
Opened this issue · 7 comments
Hello,
running the command
sudo iotedge list
I’m getting a empty list:
iotedge-user@ SEMPER-ULTRA-EFLOW [ ~ ]$ sudo iotedge list
NAME STATUS DESCRIPTION CONFIG
and running sudo iotedge logs SimulatedTemperatureSensor -f
I’m getting:
A module runtime error occurred
Visual studio Code too is no more showing the list of devices under IOTHub
I ran this command: sudo iotedge system logs -- -f
And I got a
Hub client error
aziot-identityd[1160]: 2022-03-25T08:55:35Z [INFO] - !!! caused by: ErrorCode:ArgumentInvalid;Requested Host is not supported
Additional Info:
-
I’m not behind a proxy. The command `curl -v ` easly connects to IotHub
-
Edge Device is installed in a Linux VM hosted on my notebook (Windows 10)
hostnamectl
Virtualization: microsoft
Operating System: CBL-Mariner/Linux
Kernel: Linux 5.10.93.1-4.cm1
Architecture: x86-64
How can I find where is the “ArgumentInvalid” to fix the issue?
Thank you in advance
Log lines follows (got giving the command sudo iotedge system logs -- -f
) :
iotedge-user@SEMPER-ULTRA-EFLOW [ ~ ]$ sudo iotedge system logs -- -f
-- Logs begin at Tue 2022-03-08 12:07:39 UTC. --
Mar 25 08:53:34 SEMPER-ULTRA-EFLOW aziot-keyd[1163]: 2022-03-25T08:53:34Z [INFO] - <-- GET /key/device-id?api-version=2020-09-01 {"host": "keyd.sock"}
Mar 25 08:53:34 SEMPER-ULTRA-EFLOW aziot-keyd[1163]: 2022-03-25T08:53:34Z [INFO] - --> 200 {"content-type": "application/json"}
Mar 25 08:53:34 SEMPER-ULTRA-EFLOW aziot-keyd[1163]: 2022-03-25T08:53:34Z [INFO] - <-- POST /sign?api-version=2020-09-01 {"content-type": "application/json", "host": "keyd.sock", "content-length": "382"}
Mar 25 08:53:34 SEMPER-ULTRA-EFLOW aziot-keyd[1163]: 2022-03-25T08:53:34Z [INFO] - --> 200 {"content-type": "application/json"}
Mar 25 08:53:35 SEMPER-ULTRA-EFLOW aziot-identityd[1160]: 2022-03-25T08:53:35Z [INFO] - !!! Hub client error
Mar 25 08:53:35 SEMPER-ULTRA-EFLOW aziot-identityd[1160]: 2022-03-25T08:53:35Z [INFO] - !!! caused by: ErrorCode:ArgumentInvalid;Requested Host is not supported
Mar 25 08:53:35 SEMPER-ULTRA-EFLOW aziot-identityd[1160]: 2022-03-25T08:53:35Z [INFO] - --> 404 {"content-type": "application/json"}
Mar 25 08:53:35 SEMPER-ULTRA-EFLOW aziot-edged[1155]: 2022-03-25T08:53:35Z [WARN] - Error in watchdog when checking for edge runtime status:
Mar 25 08:53:35 SEMPER-ULTRA-EFLOW aziot-edged[1155]: 2022-03-25T08:53:35Z [WARN] - A module runtime error occurred.
Mar 25 08:53:35 SEMPER-ULTRA-EFLOW aziot-edged[1155]: 2022-03-25T08:53:35Z [WARN] - caused by: HTTP response error: [404 Not Found] {"message":"Hub client error\ncaused by: ErrorCode:ArgumentInvalid;Requested Host is not supported"}
Mar 25 08:54:34 SEMPER-ULTRA-EFLOW aziot-edged[1155]: 2022-03-25T08:54:34Z [INFO] - Checking edge runtime status
Mar 25 08:54:34 SEMPER-ULTRA-EFLOW aziot-edged[1155]: 2022-03-25T08:54:34Z [INFO] - Creating and starting edge runtime module edgeAgent
Mar 25 08:54:34 SEMPER-ULTRA-EFLOW aziot-identityd[1160]: 2022-03-25T08:54:34Z [INFO] - <-- PUT /identities/modules/$edgeAgent?api-version=2020-09-01&type=aziot {"content-type": "application/json", "host": "2f72756e2f617a696f742f6964656e74697479642e736f636b:0", "content-length": "40"}
Thanks a lot. I appreciate your help!
I met this issue today after VS Code is updated to 1.70.0. Have you solved this issue?
Hi @shijong
Wondering if your hub name is using any special characters. Can you try to create another hub to try again? Can you list your devices from the az cli
?
I am not able to repro with latest VSCode.
BTW, the issues related to IoT Edge should be reported in the IoT Edge repo.
Dear @rido-min
Thank you for your response.
The location of my IoTHub is East Asia.
As you suggested, I try to create another IoTHub in East US, then I can see the device from the Azure IoTHub Extension in VS code.
So, maybe there is something wrong with the IoTHub in East Asia.
Would you please check me with this?
Thank you very much!
I just created a new hub in East Asia and everything looks good, wondering if the hub name, maybe using extended characters, might be the cause,
+1, my customer is facing the same issue.
I can see the devices in my IoT Hub in Japan East with VSCode, but I can't see in customer's IoT Hub which is also located in Japan East region. The hub name contains only alphabets and no numbers or other special characters. It seems that the behavior is different depending on IoT Hub.
I think it's a VSCode issue since I can see the devices from Azure IoT Explorer and Azure CLI. Could you please investigate?
Thanks,
Seems there is an issue when using uppercase letters in the hostname, can you try again using a lowercase hostname in your connection string?