MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.23k stars 21.41k forks source link

Edge not configured with DPS #82384

Closed djaus2 closed 2 years ago

djaus2 commented 2 years ago

[Enter feedback here]

I found that you get error with sudo iotedge list command.: Not connected. Situation: The /etc/iotedge/config.yaml has no DPS/Hub config. It says to enter IoT Hub Connection string. Solution: Change the part where it says to enter the hub connection string, that is the 2nd bit (not the templated first instance) that starts with: "# Manual provisioning with an IoT Hub connection string (SharedAccessKey authenttication only) " .... to DPS eg:

# DPS provisioning with symmetric key attestation
provisioning:
  source: "dps"
   global_endpoint: "https://global.azure-devices-provisioning.net"
   scope_id: "0neXXXXXX" <-- Enter here
   attestation:
     method: "symmetric_key"
     registration_id: "gateway-001"
     symmetric_key: "LXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0="  <-- Enter here
   always_reprovision_on_startup: true
   dynamic_reprovisioning: false

Also need to restart iotedge daemon to take effect .. simplest is to restart VM. Then the list will initially be unpopulated. Takes a few retries before it shows OK though.

Previous on this post for this page: In the Section Replace the manifest the menu option is not Replace but Edit manifest. From there you opt to "replace it with a new file."


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

asergaz commented 2 years ago

Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

dominicbetts commented 2 years ago

reassign: v-krishnag

v-krishnag commented 2 years ago

completed the doc updates #please-close