I am trying to spin up a new simple-sensor to connect to my sense server. I tried just installing the simple-sense image as-is on a pi zero w and it just keeps restarting the sensor service. I compared the sensor service in the docker-compose for sense and simple-sensor and I noticed that sense uses a Dockerfile and a startup script with the sensor service. So I brought those changes over to my clone of the simple-sensor repo and did a balena push from my local machine. The build appears to do the right thing adding in the call to the startup script:
user@User-PC:~/work/simple-sensor$ balena push simple-sensor -c --release-tag=1.0.4
[Info] Starting build for simple-sensor, user xxxxxxx
[Info] Dashboard link: https://dashboard.balena-cloud.com/apps/xxxxxxxxx/devices
[Info] Building on arm01
[Info] Pulling previous images for caching purposes...
[Success] Successfully pulled cache images
[sensor] Step 1/4 : FROM balenablocks/sensor
[sensor] ---> e3f96d181e09
[sensor] Step 2/4 : WORKDIR /usr/src/app
[sensor] ---> Running in 26c61146ae17
[sensor] Removing intermediate container 26c61146ae17
[sensor] ---> 82a64f3605d3
[sensor] Step 3/4 : COPY start.sh start.sh
[sensor] ---> f473c455c12f
[sensor] Step 4/4 : CMD ["bash", "start.sh"]
[sensor] ---> Running in 25fb763243ed
[sensor] Removing intermediate container 25fb763243ed
[sensor] ---> 8388de2d5c1c
[sensor] Successfully built 8388de2d5c1c
[Info] Uploading images
[Success] Successfully uploaded images
[Info] Built on arm01
[Success] Release successfully created!
and this build also just keeps restarting as well. I’ve tried manually starting the container locally with the same parameters and this seems to fail as well.
`root@8e6eced:~# balena -D -l debug run 8388de2d5c1c --name sensor-manual -l “io.balena.features.kernel-modules:1” -l “io.balena.features.supervisor-api:1” -l “io.balena.features.sysfs:1” -e COLLAPSE_FIELDS=1 -e RAW_VALUES=0 “/usr/bin/entry.sh bash start.sh”
DEBU[2021-07-23T15:24:02.569171997Z] [hijack] End of stdout
root@8e6eced:~# echo $?
139
Am I missing something and/or do you have suggestions to further debug this? Since the container exits so quickly there are no logs generated so I have little to go on.
I have ruled out hardware issues since I am able to run sense on this hardware without a problem but since I already have a sense server I don’t really need a second one.
thanks!