Error on RPi 4 : standard_init_linux.go:219: exec user process caused: exec format error
Closed this issue · 6 comments
Hello,
I am trying to run your Docker image on a RPi 4 with Raspberry OS, but I get the below error:
standard_init_linux.go:219: exec user process caused: exec format error
uname -a shows:
pi@pi4:~/docker $ uname -a
Linux pi4 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux
All other images are running well (including the prerequisite, eclipse-mosquitto:latest)
pi@pi4:~/docker $ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
494569c96a95 dmitriy/broadlink-mqtt "./start.sh" 4 hours ago Exited (1) 7 minutes ago docker_broadlink-mqtt_1
d2fb2cd93be9 carldebilly/zigbee2mqttassistant "dotnet Zigbee2MqttA…" 16 hours ago Up 16 hours 0.0.0.0:8880->80/tcp zigbee2mqttGUI
eeb33e59a20d koenkk/zigbee2mqtt:latest "docker-entrypoint.s…" 16 hours ago Up 16 hours zigbee2mqtt
369f7fe578cb grafana/grafana:master "/run.sh" 26 hours ago Up 26 hours grafana
7a79c59b9db6 linuxserver/code-server "/init" 3 days ago Up 3 days 0.0.0.0:18443->8443/tcp octoprint_config-editor_1
81aade636e86 octoprint/octoprint "/init" 3 days ago Up 3 days 0.0.0.0:10080->80/tcp octoprint_octoprint_1
77b15a5d6e91 pykmsorg/py-kms "/bin/sh -c '/usr/bi…" 3 days ago Up 3 days py-kms
6969ab33cec0 influxdb:1.8 "/entrypoint.sh infl…" 3 days ago Up 3 days 0.0.0.0:28086->8086/tcp, 0.0.0.0:28088->8088/tcp influxdb2
7ff43de89637 openhab/openhab:2.5.12 "/entrypoint gosu op…" 4 days ago Up 3 days openhab2
075ca44c9ad7 influxdb:1.8 "/entrypoint.sh infl…" 4 days ago Up 3 days 0.0.0.0:8086->8086/tcp, 0.0.0.0:8088->8088/tcp influxdb
555b9617b86e openhab/openhab:latest "/entrypoint gosu op…" 5 days ago Up 47 hours (healthy) openhab
08bfa9986cd3 nodered/node-red:latest "npm --no-update-not…" 6 days ago Up 4 days (healthy) nodered
19d07a304d7c eclipse-mosquitto:latest "/docker-entrypoint.…" 7 days ago Up 4 days mosquitto
5673dd9b685c containrrr/watchtower:armhf-latest "/watchtower" 7 days ago Up 4 days 8080/tcp watchtower
docker-compose.yml:
broadlink-mqtt:
image: "dmitriy/broadlink-mqtt"
environment:
- MQTT_SERVER=10.0.0.3
- MQTT_USER=xxx
- MQTT_PASS=xxx
- MQTT_TOPIC_PREFIX=broadlink/rmpro/
- DEVICE_HOST=10.0.0.99
- DEVICE_MAC=34:ea:34:43:2f:86
- TZ=Europe/Bucharest
depends_on:
- mosquitto
Any advice to run this image on a RPi4?
Thanks
It definitely requires using another base image because of the different CPU architecture. Modern docker images publish different architectures under the same tag. But my docker image is pretty simple and was built for a particular use case.
Unfortunately, I don't have RPi to do a quick test. You can try to fork and update base image to something arm64v8/python:2.7
(I have no experience with it, just the first link from google). Sorry.
armv7l GNU/Linux
Just noticed that it's v7 not v8. Then you can try arm32v7/python:2.7
Thanks a lot for your answer.
Where do I have to specify arm32v7/python:2.7
? In Dockerfile, line 1: FROM python:2
- change to FROM arm32v7/python:2.7
?
I am not familiar with docker image creation, so far I only used images that were already available.
Thanks!
You are correct, it should be changed in the 1st line. At least I thought that will be enough. And I just created branch and committed change c635590. I expected that dockerhub will create a new tag.
Unfortunately, it doesn't work. It seems dockerfile should be reworked to be a true multi-arch dockerfile (some first link from google https://www.docker.com/blog/multi-arch-images/). So it requires more effort than I can spend. Sorry.
I have compiled yesterday a new image based on directive FROM arm32v7/python:2.7
. It compiled succesfully but unfortunately I get the following error when running it:
Traceback (most recent call last):
File "mqtt.py", line 4, in <module>
import broadlink # pip install broadlink
File "/usr/local/lib/python2.7/site-packages/broadlink/__init__.py", line 114
dev_type: int,
^
SyntaxError: invalid syntax
Meanwhile I found an alternate image (fredrickbacker/broadlink-mqtt-bridge
) which compiled and ran succesfully on arm32v7
architecture.
However I am a fan of Eugene Schava's broadlink-mqtt script and I will try to find a solution once I resolve other priorities.
Once again, thanks a lot for your help and for taking the time to create a branch for the arm32v7 architecture.
Best,
Cristian
Glad to hear that it's almost there for you. And thanks for fredrickbacker/broadlink-mqtt-bridge
, the presence of admin UI is a major advantage. I will consider migrating on it (if will find time :) )