Screenly / Anthias

The world's most popular open source digital signage project.
https://anthias.screenly.io
Other
2.51k stars 623 forks source link

Installation Problem on Raspberry PI 3 - Docker Timeout #1691

Closed michaelortnersanube closed 1 year ago

michaelortnersanube commented 1 year ago

When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.

Overview of the Issue

Installation failure on ansible step "Install Docker"

Reproduction Steps

Steps to reproduce this issue, eg:

I have installed raspberry pi image over the raspberry pi imager, then i insert it into the raspberry and fill out the installation process, keyboard language german, than i have to add a user, name "pi" and then the password for the user. Then i have activated over raspi-config the ssh deamon and connect over ssh.

At least i have make a sudo apt update && sudo apt upgrade -y

Now i have used the bashscript and select all three questions with "Y"

The installation begin. And then on the Task " Install Docker "

this error come:

image

Environment

vpetersson commented 1 year ago

Can you please paste that as text rather than a screenshot as it's almost impossible to read?

michaelortnersanube commented 1 year ago

yes i can - but a very strange thing: I have rebooted the raspberry pi and i have retry the script, and now it pulls the docker images. Is this maybe a onetime bug? If you want, i can make a second sd card and try again a fresh install like i have wrote. Then i can send you the text. If you need more details of the hardware please send me all things what you need. :)

vpetersson commented 1 year ago

Well, if it's a timeout error, it's definitely possible that the SD cards is too slow. We only use industrial Class 10 SD cards for all our players. If you're using anything other than a Class 10 SD card, then you might want to get one of these.

willworkforicecream commented 1 year ago

I've been able to replicate this (or some other issue, hard to read) on a few different Pis and a few different SD cards over the last week or two.

Running the script a second time consistently resolves the issue.

Edit: Here's the output if that helps:

TASK [system : Install Docker] **********************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"cache_update_time": 1670948283, "cache_updated": true, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"       install 'docker-ce:armhf' 'docker-ce-cli:armhf' 'docker-compose-plugin:armhf' -o APT::Install-Recommends=no' failed: E: Sub-process /usr/bin/dpkg returned an error code (1)\n", "rc": 100, "stderr": "E: Sub-process /usr/bin/dpkg returned an error code (1)\n", "stderr_lines": ["E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following package was automatically installed and is no longer required:\n  dc\nUse 'sudo apt autoremove' to remove it.\nThe following additional packages will be installed:\n  containerd.io\nSuggested packages:\n  cgroupfs-mount | cgroup-lite\nRecommended packages:\n  apparmor docker-ce-rootless-extras libltdl7\nThe following NEW packages will be installed:\n  containerd.io docker-ce docker-ce-cli docker-compose-plugin\n0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 79.1 MB of archives.\nAfter this operation, 333 MB of additional disk space will be used.\nGet:1 https://download.docker.com/linux/debian bullseye/stable armhf containerd.io armhf 1.6.12-1 [20.4 MB]\nGet:2 https://download.docker.com/linux/debian bullseye/stable armhf docker-ce-cli armhf 5:20.10.21~3-0~debian-bullseye [37.5 MB]\nGet:3 https://download.docker.com/linux/debian bullseye/stable armhf docker-ce armhf 5:20.10.21~3-0~debian-bullseye [13.1 MB]\nGet:4 https://download.docker.com/linux/debian bullseye/stable armhf docker-compose-plugin armhf 2.12.2~debian-bullseye [8232 kB]\nFetched 79.1 MB in 15s (5172 kB/s)\nSelecting previously unselected package containerd.io.\r\n(Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 45707 files and directories currently installed.)\r\nPreparing to unpack .../containerd.io_1.6.12-1_armhf.deb ...\r\nUnpacking containerd.io (1.6.12-1) ...\r\nSelecting previously unselected package docker-ce-cli.\r\nPreparing to unpack .../docker-ce-cli_5%3a20.10.21~3-0~debian-bullseye_armhf.deb ...\r\nUnpacking docker-ce-cli (5:20.10.21~3-0~debian-bullseye) ...\r\nSelecting previously unselected package docker-ce.\r\nPreparing to unpack .../docker-ce_5%3a20.10.21~3-0~debian-bullseye_armhf.deb ...\r\nUnpacking docker-ce (5:20.10.21~3-0~debian-bullseye) ...\r\nSelecting previously unselected package docker-compose-plugin.\r\nPreparing to unpack .../docker-compose-plugin_2.12.2~debian-bullseye_armhf.deb ...\r\nUnpacking docker-compose-plugin (2.12.2~debian-bullseye) ...\r\nSetting up containerd.io (1.6.12-1) ...\r\nCreated symlink /etc/systemd/system/multi-user.target.wants/containerd.service -> /lib/systemd/system/containerd.service.\r\nSetting up docker-compose-plugin (2.12.2~debian-bullseye) ...\r\nSetting up docker-ce-cli (5:20.10.21~3-0~debian-bullseye) ...\r\nSetting up docker-ce (5:20.10.21~3-0~debian-bullseye) ...\r\nCreated symlink /etc/systemd/system/multi-user.target.wants/docker.service -> /lib/systemd/system/docker.service.\r\nCreated symlink /etc/systemd/system/sockets.target.wants/docker.socket -> /lib/systemd/system/docker.socket.\r\nJob for docker.service failed because the control process exited with error code.\r\nSee \"systemctl status docker.service\" and \"journalctl -xe\" for details.\r\ninvoke-rc.d: initscript docker, action \"start\" failed.\r\n* docker.service - Docker Application Container Engine\r\n     Loaded: loaded (\u001b]8;;file://raspberrypi/lib/systemd/system/docker.service\u0007/lib/systemd/system/docker.service\u001b]8;;\u0007; enabled; vendor preset: enabled)\r\n     Active: activating (auto-restart) (Result: exit-code) since Tue 2022-12-13 16:20:11 GMT; 28ms ago\r\nTriggeredBy: \u001b[0;1;32m*arget.wants/containerd.service -> /lib/systemd/system/containerd.service.", "Setting up docker-compose-plugin (2.12.2~debian-bullseye) ...", "Setting up docker-ce-cli (5:20.10.21~3-0~debian-bullseye) ...", "Setting up docker-ce (5:20.10.21~3-0~debian-bullseye) ...", "Created symlink /etc/systemd/system/multi-user.target.wants/docker.service -> /lib/systemd/system/docker.service.", "Created symlink /etc/systemd/system/sockets.target.wants/docker.socket -> /lib/systemd/system/docker.socket.", "Job for docker.service failed because the control process exited with error code.", "See \"systemctl status docker.service\" and \"journalctl -xe\" for details.", "invoke-rc.d: initscript docker, action \"start\" failed.", "* docker.service - Docker Application Container Engine", "     Loaded: loaded (\u001b]8;;file://raspberrypi/lib/systemd/system/docker.service\u0007/lib/systemd/system/docker.service\u001b]8;;\u0007; enabled; vendor preset: enabled)", "     Active: activating (auto-restart) (Result: exit-code) since Tue 2022-12-13 16:20:11 GMT; 28ms ago", "TriggeredBy: \u001b[0;1;32m*\u001b[0m docker.socket", "       Docs: \u001b]8;;https://docs.docker.com\u0007https://docs.docker.com\u001b]8;;\u0007", "    Process: 8413 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock \u001b[0;1;31m(code=exited, status=1/FAILURE)\u001b[0m", "   Main PID: 8413 (code=exited, status=1/FAILURE)", "        CPU: 542ms", "", "Dec 13 16:20:11 raspberrypi systemd[1]: \u001b[0;1;38;5;185m\u001b[0;1;39m\u001b[0;1;38;5;185mdocker.service: Failed with result 'exit-code'.\u001b[0m", "Dec 13 16:20:11 raspberrypi systemd[1]: \u001b[0;1;31m\u001b[0;1;39m\u001b[0;1;31mFailed to start Docker Application Container Engine.\u001b[0m", "dpkg: error processing package docker-ce (--configure):", " installed docker-ce package post-installation script subprocess returned error exit status 1", "Processing triggers for man-db (2.9.4-2) ...", "Errors were encountered while processing:", " docker-ce"]}
vpetersson commented 1 year ago

@willworkforicecream this likely a function of the docker images being rather big at the moment. As such, they will require a decent amount of data to be written to disk. If you're using a slower SD card, it's likely going to time out.

That said, the error you posted isn't from the docker image pull -- it's from the installation of docker.

A few questions:

willworkforicecream commented 1 year ago

Fresh install. This specific time I'm installing it on a SanDisk Ultra Plus class 10 that I tested a write speed to 22 MB/s earlier this week. I had the same thing happen on a Patriot class 10. I'm going to try it again with a SSD to see if I can rule out any SD card shenanigans.

willworkforicecream commented 1 year ago

It does look like a case of not all SD cards being created equally, even those claiming to be class 10. No issues with when installing on an SSD.

vpetersson commented 1 year ago

Oh definitely. SD cards very a ton in performance in quality. We've had a lot of conversations about this with the folks over at Balena over the years and we've come to the same conclusion. The most reliable ones are SanDisk's (now Western Digital) Industrial cards. Short of that, the Samsung ones are also decent.

ealmonte32 commented 1 year ago

@michaelortnersanube Just checking to see if you can close this Issue.