Azure / iot-edge-v1

Azure IoT Edge
http://azure.github.io/iot-edge/
Other
524 stars 258 forks source link

[V2] IoTEdge Runtime - edgeAgent container - remains in restarting state forever #566

Open alkreddy opened 6 years ago

alkreddy commented 6 years ago

I have setup a new Raspberry Pi as per the guidance in the following blogs https://blog.jongallant.com/2017/11/azure-iot-edge-raspberrypi/ https://blog.jongallant.com/2017/09/raspberrypi-docker/

I attempted to start the runtime sudo iotedgectl start , I see a new container edgeAgent created. However, the status of this container remains as restarting

pi@LKPi:~ $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ad9b7a67bb5f microsoft/azureiotedge-agent:1.0-preview "/usr/bin/dotnet Mic…" 4 hours ago Restarting (139) 32 seconds ago edgeAgent

There are no logs created for the edgeAgent container. I tried restarting the device, removing and recreating the container, restarting the runtime but the container remains in restarting state.

darobs commented 6 years ago

Hello @alkreddy

From how I understand it, that is dotnet returning with a Segmentation Violation (SIGSEGV), or an invalid memory reference.

This is not expected, but we did have a problem with the initial preview22 release of ARM images, please confirm that you've pulled the latest from 1.0-preview. This is the result from my Pi's docker image ls:

microsoft/azureiotedge-agent                                                 1.0-preview                      fc8adc81efb3        2 days ago          218MB

Also, you may want to see if you have any errors from docker, the logs for the docker daemon can be found by running journalctl -u docker.

alkreddy commented 6 years ago

Hello @darobs ,

Appreciate your help. I can confirm that the image I use is latest. docker image ls matches with your result.

I didn't find any helpful info from the docker daemon logs. Attaching it for your inputs.

dockerdaemonlog.txt

alkreddy commented 6 years ago

I have rebuild the PI from scratch. However, I continue to see the same issue.

darobs commented 6 years ago

Hmm - Typically, if you can get the "hello_world" image to run, the edgeAgent will run as well. Would you provide me with the version of Raspbian, iotedgectl, Python and Docker?

alkreddy commented 6 years ago

Hello, Sorry for the delayed response, here's the information you asked for

Kernel version Linux LKPi 4.14.30+ #1102 Mon Mar 26 16:20:05 BST 2018 armv6l GNU/Linux

OS Version PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

IotEdgeCtl Version iotedgectl 1.0.0rc22

Python Version Python 2.7.13

Docker Version Client: Version: 18.03.0-ce API version: 1.37 Go version: go1.9.4 Git commit: 0520e24 Built: Wed Mar 21 23:18:35 2018 OS/Arch: linux/arm Experimental: false Orchestrator: swarm

Server: Engine: Version: 18.03.0-ce API version: 1.37 (minimum version 1.12) Go version: go1.9.4 Git commit: 0520e24 Built: Wed Mar 21 23:14:37 2018 OS/Arch: linux/arm Experimental: false

alkreddy commented 6 years ago

Looking forward for any helpful advice to diagnose/resolve this issue

darobs commented 6 years ago

Thank you for the information. You basically have the same Pi setup as me.

Would you please just run the edgeAgent on the command line:

docker run microsoft/azureiotedge-agent:1.0-preview

Maybe I'll get something in the output that will get me a good clue.

Thanks,

alkreddy commented 6 years ago

Thanks David. I don't have access to my PI. I will get back to you in couple of days.

alkreddy commented 6 years ago

Hi David, Apologies for the delayed response. I tried running the container externally as per your suggestion. However, the container just starts and stops with no additional log messages.

darobs commented 6 years ago

Hello @alkreddy - now it's my turn to apologize for being distracted and not responding.

I have not yet discovered any software cause for your troubles. One additional possibility is an insufficient power supply - The recommendation for a Pi 3 is a 2.5A power supply. . We have seen very odd behavior if the power supply is providing less than 1 Amp.

alkreddy commented 6 years ago

Hi David,

Appreciate your response. The power supply I used has rated o/p of 1.6A at 5V. I will try with 2.5A module next week (after I get back home) and let you know the outcome.

thanks,

darobs commented 6 years ago

That's probably not the problem 1.6A is probably sufficient for most operations. The problem is we've been targetting our builds for ARMv7, and the Pi you're running on is ARMv6. The binaries are incompatible with your board.

I missed that detail from the information you gave me before.

alkreddy commented 6 years ago

Thanks David. Appreciate your help. I just realized that the model of RPi I have is Model B+ V1.2 (which is a model prior to RPi 2). This being an ARMv6 architecture is not an ideal for my IoTEdge Work. Appreciate your help and my limited understanding of RPi wasn't helpful in validating the prerequisites.

thanks,