-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raspberry crashes on docker-compose up #7051
Comments
Note: at time writting, ARM is not an officially suported plaform for docker-compose (even we are aware many users do rely on it). The issue you describe is pretty weird, as docker-compose do fully rely on the docker engine to run containers by it's HTTP API, and as such could fail with ugly errors, but I harldy understand how a python process can crash the system this way. |
I tried that, but the shell never came back I was connected via SSH to my Pi, and after |
Hi !
|
Same here,
|
Just to add something to those that might look for the reason of this. In my case it happens almost 100% of the time. My path took me in the strangest corners: Bottom line
|
Hi all, I'm running docker-compose 1.26.2 |
Looks to me like it is not really too widely a problem as few write. Shortly after my post I just created a new SD with Raspian again, the version with GUI and few applications. Everything works fine with multiple restarts and updates when I did this to install docker and docker-compose. The steps before this are just update things and zsh. 6)
echo "----- Install docker"
sudo apt install -y docker.io
sudo systemctl enable --now docker
docker --version
docker run hello-world
;;
7)
echo "----- Install docker-compose"
sudo apt install -y docker-compose
docker-compose version
;;
8)
echo "Add current user to docker group"
sudo usermod -aG docker ${USER}
;; I presume it is caused by something else I have running or an experiment that left stuff behind. Just so somebody doing a pure docker installation knows that it is easy. Just new install and run the few lines above. Good luck ... |
Hi I tried the latest release 1.27.3. It doesn't crash, the containers start fine the Pi itself dies after a reboot. Otherwise, it carries on working fine if left powered on |
Hi tam481! Here I give you the whole script that I run right after a new raspberry install. After this I clone one more git with my docer compose thing and that is the whole thing. What I experienced with docker and obviously with docker-compose is that sometimes the containers that are I removed some things that are specific to my setup and files that you don't have. If you have a completely naked installation of Raspian, this should work. Besides the hello-world you have portainer which gives you at least some GUI. Maybe you can see something there. Also pulling images of different versions is possibly easier for you. At least it is in some cases for me. Else I can only wish you the best of luck. Mine is still working fine and when I update my images everything starts up fine as well. #!/bin/bash
# Load package dialog if it is not installed
pkgs='dialog'
if ! dpkg -s $pkgs >/dev/null 2>&1; then
sudo apt-get install -y $pkgs
fi
# Dialog stuff
cmd=(dialog --separate-output --checklist "Select options:" 22 76 16)
options=(1 "Update" on # any option can be set to default to "on"
2 "Upgrade" on
3 "Full Upgrade" off
4 "Install GIT" off
5 "Install ZSH (Oh-My-ZSH)" off
6 "Install Docker" off
7 "Install Docker-Compose" off
8 "Add current user to docker group" off
9 "Start Portainer in Docker" off
10 "STILL TO COME!! - Start Portainer in Docker-Compose Stack SYS with others" off
11 "Add .bash_aliases function" off
12 "Install Python3 and PIP3" off
20 "REBOOT WITHOUT ASKING!!!" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
1)
sudo apt-get -y update
;;
2)
sudo apt-get -y upgrade
;;
3)
sudo apt-get -y full-upgrade
;;
4)
sudo apt install -y git
git --version
;;
5)
# bash SUB/ZSH/first-inst-zsh.sh
;;
6)
echo "----- Install docker"
sudo apt install -y docker.io
sudo systemctl enable --now docker
docker --version
docker run hello-world
;;
7)
echo "----- Install docker-compose"
sudo apt install -y docker-compose
docker-compose version
;;
8)
echo "Add current user to docker group"
sudo usermod -aG docker ${USER}
;;
9)
echo "----- Portainer"
echo "----- Create Volume for Portainer"
docker volume create portainer_data
echo "----- Run Portainer"
docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
;;
10)
echo "The function to mount stack SYS is still to come!"
;;
11)
# This is to make it global for bash. You need to enter your user password. Works only if you are a sudoer.
;;
12)
sudo apt install -y python3-pip
pip3 --version
echo "As for the installation of Python3 you should already have it installed with the OS"
echo "If not use: sudo apt-get install python3.6 or whatever is current."
;;
20)
sudo reboot now
;;
esac
done Here you have my docker-compose.yml. It will not work like this for you because you are missing the environment files with the passwords and so on, but just so you see what I load. If you load something similar I can change some of the environment files.
By the way this is a slightly changed version of what you can make out of IOThub. |
I've also observed this on a RPi 4 - connected via SSH, run I believe that the machine is not crashing, but actually that the I was able to reproduce the issue via SSH over Wifi while I also had HDMI connected and a local keyboard and was able to get the output of
So obviously since I could still use the RPi locally, it had not crashed entirely - it appears just the wifi network interface is deleted somehow by docker or docker-compose. I am running a totally ordinary local network using consumer router (Fritzbox if that matters) The RPi 4 has a static DHCP assignment on the 192.168.1.x subnet. Please advise if there is any more diagnosis steps that might help here. Versions etc:
|
Prior to my previous comment about this appearing to be an issue related to the This thread on the RPi forums provided a fix: https://www.raspberrypi.org/forums/viewtopic.php?t=282425#p1712939 Add this to
So far, with this applied, I have not been able to reproduce the issue at all - I can start and stop |
Hi, I had the exact same issue as @matt1 and his solution works like a charm. Thanks! |
As it appears for me - So many thanks were going crazy |
Hi @aiordache @ulyssessouza I maintain https://hub.docker.com/r/botsudo/action-docker-compose and would like to distribute multi arch images |
This happened to on an AWS instance with 50 GB disk and 2 GB ram |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it had not recent activity during the stale period. |
Description of the issue
I am running Manjaro ARM on my raspberry PI 3B. I tried to start the
homeassistant/raspberry3-homassistant
image from docker-composeIt did not work, and the PI froze (needed a hard reset to work again)
Context information (for bug reports)
The issue was, that i tried to start a arm32 image on my arm64 pi, and Manjaro lacks the support for arm32
Running the image with
docker
gave this error:standard_init_linux.go:211: exec user process caused "exec format error"
(which is totally user-unfriendly btw)docker-compose straight up crashed the whole system instead
Output of
docker-compose version
Output of
docker version
Output of
docker-compose config
Steps to reproduce the issue
docker run --name="home-assistant" -e "TZ=Europe/Berlin" -v $PWD/config:/config -p 8123:8123 homeassistant/raspberrypi3-homeassistant:latest
and
docker-compose up
with the given configObserved result
docker-compose crashes the system, while docker gives an error
Expected result
docker-compose gives an error
Stacktrace / full error message
for docker:
docker-compose:
no error, since Pi crashes
Additional information
OS version / distribution,
docker-compose
install method, etc.Linux raspi 5.3.12-1-MANJARO-ARM #1 SMP Wed Nov 20 16:23:31 UTC 2019 aarch64 GNU/Linux
docker-compose installed through
yay -S docker-compose
The text was updated successfully, but these errors were encountered: