英文:
Can't link IoT Hub Device Provisioning Service to IoTHub not found
问题
这是 Azure 问题还是我配置方面的问题?
感谢您的帮助。
我尝试手动从门户中将我的设备预配服务(DPS)和我的物联网(IoT)中心连接起来,但不起作用。我遵循了关于共享访问策略配置的文档,但我的设置是“允许”。
英文:
I just created an IoTHub with a Device Provisioning Service and I get an error when I try to link the two together.
The Azure portal sends me back
There was a problem updating your Device Provisioning Service to link to IoT hub. An unexpected error occurred while updating your Device Provisioning Service. Error message: Unable to find the IoThub <my iothub>.azure-devices.net
. Check if the hub exists and the connection information is correct.
Is it an Azure problem or a configuration problem on my side?
Thank for your help
I try to link manually from the portal my DPS and my IoT Hub but it doesn't work. I follow the documentation about shared access policy configuration but mine is on "Allow"
答案1
得分: 0
- 在bash中
- 检查连接到DPS的IoT Hub列表 bash。
az iot dps linked-hub list --dps-name dpsname --resource-group resourcegroupname
- 在Bash中将现有的DPS与IoT Hub关联
az iot dps linked-hub create --dps-name MyExampleDps --resource-group MyResourceGroup --connection-string "HostName=MyExampleHub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=user123" --location westus
- 在Bash中更新已存在的DPS与IoT Hub
az iot dps linked-hub update --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub.azure-devices.net --allocation-weight 10 --apply-allocation-policy True
- 在Powershell
-
检查连接到DPS的IoT Hub列表
-
Poweshell
az iot dps linked-hub list --dps-name $dpsName --resource-group $resourceGroupName
将DPS与IoT Hub关联
- Poweshell
az iot dps linked-hub create --dps-name MyExampleDps --resource-group MyResourceGroup --connection-string "HostName=MyExampleHub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XNBhoasdfhqRlgGnasdfhivtshcwh4bJwe7c0RIGuWsirW0=" --location westus
更新DPS与IoT Hub
- 使用PowerShell更新DPS
az iot dps linked-hub update --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub.azure-devices.net --allocation-weight 10 --apply-allocation-policy True
更新已关联的IoT Hub 'MyLinkedHub.azure-devices.net' 在Azure IoT Hub设备预配服务中
英文:
> I created IOT device using microsoft and connected Azure IoT Hub Device Provisioning Service (DPS). I got the same error and resolved it.
Thanks to Victoria Litvinova for Reference
- In bash
- To check if the list of IOT Hub connected to DPS bash.
az iot dps linked-hub list --dps-name dpsname --resource-group resourcegroupname
- For linking dps existing with Iot hub in Bash
az iot dps linked-hub create --dps-name MyExampleDps --resource-group MyResourceGroup --connection-string "HostName=MyExampleHub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=user123" --location westus
For updating Dps existing with IoT hub in Bash
az iot dps linked-hub update --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub.azure-devices.net --allocation-weight 10 --apply-allocation-policy True
- In Powershell
-
***To check if the list of IOT Hub connected to DPS ***
-
Poweshell
az iot dps linked-hub list --dps-name $dpsName --resource-group $resourceGroupName
For linking dps with Iot hub
- Poweshell
az iot dps linked-hub create --dps-name MyExampleDps --resource-group MyResourceGroup --connection-string "HostName=MyExampleHub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XNBhoasdfhqRlgGnasdfhivtshcwh4bJwe7c0RIGuWsirW0=" --location westus
For updating Dps with IoT hub
- using PowerShell update the DPS
az iot dps linked-hub update --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub.azure-devices.net --allocation-weight 10 --apply-allocation-policy True
Update linked IoT hub 'MyLinkedHub.azure-devices.net' in an Azure IoT Hub Device Provisioning Service
答案2
得分: 0
我找到了问题所在的位置。这是因为我的iothub无法通过公共网络访问。
我只是更改了与Terraform相关的设置,问题就解决了。
英文:
I found where are located the issue. It's because my iothub was not accessible via public network.
I just change Terraform related setting and it was done.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论