guysoft/MagicMirrorOS

Black screen, docker container stuck on "Restarting"

ROODAY opened this issue · 4 comments

ROODAY commented

Installed MagicMirror OS on a Raspberry Pi Model B Rev 2. I connected it to a TV and ethernet and started it up to get it going, and I saw lines printed on the TV as the Pi was booting, then the screen was black. I was able to see it show up on my network and I ssh'd into it, but I still had a black screen.

I checked the other issues here, #59 mentioned running cat /etc/os-release, which for me showed:

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
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"

So then I updated /home/pi/magicmirror/run/docker-compose.yml to look like this:

version: '3'

services:
  magicmirror:
    container_name: mm
    image: karsten13/magicmirror:buster
    volumes:
      - ../mounts/config:/opt/magic_mirror/config
      - ../mounts/modules:/opt/magic_mirror/modules
      - ../mounts/css:/opt/magic_mirror/css
      - /tmp/.X11-unix:/tmp/.X11-unix
      - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
    devices:
      - /dev/vchiq
    environment:
      DISPLAY: unix:0.0
    network_mode: host
    shm_size: "128mb"
    restart: unless-stopped
    command:
      - npm
      - run
      - start

Then I restarted the Pi, let it download the buster image, and I still had a black screen. I tried restarting it again, and I see this from the start logs:

pi@magicmirroros:~ $ cat ~/scripts/start.log
---------log-of-run_magicmirroros---------
mm is up-to-date
Pulling magicmirror ...
Pulling magicmirror ... pulling from karsten13/magicmirror
Pulling magicmirror ... digest: sha256:85737559f90cb1ee2b...
Pulling magicmirror ... status: image is up to date for k...
Pulling magicmirror ... done
mm is up-to-date
Total reclaimed space: 0B

At this point I checked docker, and it shows that the container is restarting, but the logs are empty:

pi@magicmirroros:~ $ docker ps -a
CONTAINER ID   IMAGE                          COMMAND                  CREATED          STATUS                            PORTS     NAMES
901b8daa79b0   karsten13/magicmirror:buster   "/usr/bin/tini -- ./…"   28 minutes ago   Restarting (139) 16 seconds ago             mm
pi@magicmirroros:~ $ docker logs mm
pi@magicmirroros:~ $

Not sure what to try at this point.

there are always some standard log entries, may you executed docker logs mm at the time the container was down ...

Can you go into the folder /home/pi/magicmirror/run and stop the container with docker-compose down and then start it again with docker-compose up (without the -d option). This should show the logs (hopefully) ...

ROODAY commented

Unfortunately still no logs, I did docker-compose down then:

pi@magicmirroros:~ $ cd magicmirror/run/
pi@magicmirroros:~/magicmirror/run $ docker-compose up
Creating mm ... done
Attaching to mm
pi@magicmirroros:~/magicmirror/run $ docker ps -a
CONTAINER ID   IMAGE                          COMMAND                  CREATED          STATUS                           PORTS     NAMES
a30a19ee7567   karsten13/magicmirror:buster   "/usr/bin/tini -- ./…"   26 seconds ago   Restarting (139) 3 seconds ago             mm
pi@magicmirroros:~/magicmirror/run $ docker logs mm
pi@magicmirroros:~/magicmirror/run $ 
ROODAY commented

I think I found a bit more info, I tried running the container with docker run:

pi@magicmirroros:~/magicmirror/run $ docker run karsten13/magicmirror:buster
WARNING: The requested image's platform (linux/arm/v7) does not match the detected host platform (linux/arm/v6) and no specific platform was requested

Then I tried specifying the platform:

^C^C^Cpi@magicmirroros:~/magicmirror/run $ docker run --platform linux/arm/v6 karsten13/magicmirror:buster
Unable to find image 'karsten13/magicmirror:buster' locally
buster: Pulling from karsten13/magicmirror
Digest: sha256:85737559f90cb1ee2b655b1d5835374eda0719f7d75ded7ad1a4729f7999ae06
Status: Image is up to date for karsten13/magicmirror:buster
docker: Error response from daemon: image with reference karsten13/magicmirror:buster was found but does not match the specified platform: wanted linux/arm/v6, actual: linux/arm/v7.
See 'docker run --help'.

Perhaps the container is failing immediately and stuck restarting (status 139) because the image is built for a different platform? Are there any linux/arm/v6 versions?

Installed MagicMirror OS on a Raspberry Pi Model B Rev 2

overlooked this, this model has processor BCM2835 which ist armv6

Are there any linux/arm/v6 versions

no, and there will be none ...

The hardware is to old for this setup, you can try a classic install of mm with the automated script mentioned in the docs