Azure IoT Edge Preview 2 - Debugging Container Exceptions

The "docker ps" command shows which containers are running.  There should be two containers running from the Azure IoT Edge team plus the containers you configured modules for.  If they are not running troubleshoot by:

  1. Run the "iotedgectl start" command to ensure the Edge runtime is started.
  2. Run "docker ps" to see if the containers are running.
  3. Run "docker ps --all" to find all the relevant container id's.
  4. View the logs of each container with the "docker logs <container id>" command. I find it helpful to add "--tail 50" to reduce the output to only the last 50 lines in the log.
  5. If microsoft/azureiotedge-hub:1.0-preview or microsoft/azureiotedge-agent:1.0-preview containers logged an exception then:
    1. In PowerShell run "Invoke-Expression (Invoke-WebRequest -useb https://aka.ms/iotedgewin)" to validate your prerequisites.
    2. Try setting up the device again:
      1. Run "iotedgectl uninstall" to uninstall the existing containers.
      2. Run "iotedgectl setup..." to install the containers.
      3. Run "iotedgectl login..." to provide the container registry credentials.
      4. Run "iotedgectl start".
      5. View the logs of the new containers to see what happened.

One tip is that the logs show which docker commands were executed but not the raw output.  To see what happened, copy the command out of the log and run it from the command line.