I have a problem and I don't know where to look for the problem. I'm running debian:buster and I'm trying to set it up as a jellyfin server.
I added the nessecary architecture (amd64).
user@server:~$ sudo dpkg --print-architecture
i386
user@server:~$ sudo dpkg --print-foreign-architectures
amd64
arm64
I created a docker-compose file based on examples from the linuxserver.io/jellyfin documentation.
version: "2"
services:
jellyfin:
image: linuxserver/jellyfin:amd64-latest
container_name: jellyfin
environment:
- PUID=1000
- PGID=1000
- TZ=America/Chicago
- UMASK_SET=022 #optional
volumes:
- /srv/jellyfin/cache/
- /srv/jellyfin/config/
- /media/nasdisk1/series/
- /media/nasdisk1/films/
- /media/nasdisk2/muziek/
ports:
- 8096:8096
- 8920:8920
restart: unless-stopped
When I do the sudo docker-compose up
the container is attempting restarts and the logs of the container show:
standard_init_linux.go:207: exec user process caused "exec format error"
When I look at the logs of the daemon it has the following:
Jan 3 10:04:54 server systemd-udevd[10726]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jan 3 10:04:54 server systemd-udevd[10726]: Could not generate persistent MAC address for veth27501f9: No such file or directory
Jan 3 10:04:54 server systemd-udevd[10409]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jan 3 10:04:54 server systemd-udevd[10409]: Could not generate persistent MAC address for vethf2645f0: No such file or directory
Jan 3 10:04:54 server dockerd[835]: time="2021-01-03T10:04:54.762831765+01:00" level=info msg="shim docker-containerd-shim started" address=/containerd-shim/moby/aac362ac93e9e49bd98e1ae5e5677f36b7622f01467d97be972801fff6e55fa2/shim.sock debug=false pid=11392
Jan 3 10:04:54 server systemd[766]: tmp-runc.Jzl4EG.mount: Succeeded.
Jan 3 10:04:54 server systemd[1255]: tmp-runc.Jzl4EG.mount: Succeeded.
Jan 3 10:04:54 server systemd[1]: tmp-runc.Jzl4EG.mount: Succeeded.
Jan 3 10:04:55 server dockerd[835]: time="2021-01-03T10:04:55.369653723+01:00" level=info msg="shim reaped" id=aac362ac93e9e49bd98e1ae5e5677f36b7622f01467d97be972801fff6e55fa2
Jan 3 10:04:55 server dockerd[835]: time="2021-01-03T10:04:55.380208387+01:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jan 3 10:04:55 server systemd-udevd[10726]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jan 3 10:04:55 server systemd[1255]: run-docker-netns-bb13291a727b.mount: Succeeded.
Jan 3 10:04:55 server systemd[766]: run-docker-netns-bb13291a727b.mount: Succeeded.
Jan 3 10:04:55 server systemd[1]: run-docker-netns-bb13291a727b.mount: Succeeded.
Jan 3 10:04:55 server systemd[766]: var-lib-docker-containers-aac362ac93e9e49bd98e1ae5e5677f36b7622f01467d97be972801fff6e55fa2-mounts-shm.mount: Succeeded.
Jan 3 10:04:55 server systemd[1]: var-lib-docker-containers-aac362ac93e9e49bd98e1ae5e5677f36b7622f01467d97be972801fff6e55fa2-mounts-shm.mount: Succeeded.
Jan 3 10:04:55 server systemd[1255]: var-lib-docker-containers-aac362ac93e9e49bd98e1ae5e5677f36b7622f01467d97be972801fff6e55fa2-mounts-shm.mount: Succeeded.
Jan 3 10:04:55 server systemd[1]: var-lib-docker-overlay2-9fed81476b3c95a4437492d16744fe31d376aff8b329166b1e4fa6a34f6b9410-merged.mount: Succeeded.
Jan 3 10:04:55 server systemd[1255]: var-lib-docker-overlay2-9fed81476b3c95a4437492d16744fe31d376aff8b329166b1e4fa6a34f6b9410-merged.mount: Succeeded.
Jan 3 10:04:55 server systemd[766]: var-lib-docker-overlay2-9fed81476b3c95a4437492d16744fe31d376aff8b329166b1e4fa6a34f6b9410-merged.mount: Succeeded.
Jan 3 10:04:56 server avahi-daemon[610]: Interface br-d72bd039829d.IPv6 no longer relevant for mDNS.
Jan 3 10:04:56 server avahi-daemon[610]: Leaving mDNS multicast group on interface br-d72bd039829d.IPv6 with address fe80::42:eaff:fede:4bc1.
Jan 3 10:04:56 server avahi-daemon[610]: Interface br-d72bd039829d.IPv4 no longer relevant for mDNS.
Jan 3 10:04:56 server avahi-daemon[610]: Leaving mDNS multicast group on interface br-d72bd039829d.IPv4 with address 172.19.0.1.
Jan 3 10:04:56 server avahi-daemon[610]: Withdrawing address record for fe80::42:eaff:fede:4bc1 on br-d72bd039829d.
Jan 3 10:04:56 server avahi-daemon[610]: Withdrawing address record for 172.19.0.1 on br-d72bd039829d.
Jan 3 10:04:56 server dbus-daemon[598]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.8' (uid=0 pid=600 comm="/usr/sbin/NetworkManager --no-daemon ")
Jan 3 10:04:56 server systemd[1]: Starting Network Manager Script Dispatcher Service...
Jan 3 10:04:56 server dbus-daemon[598]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jan 3 10:04:56 server systemd[1]: Started Network Manager Script Dispatcher Service.
Jan 3 10:04:56 server nm-dispatcher: req:1 'down' [br-d72bd039829d]: new request (1 scripts)
Jan 3 10:04:56 server nm-dispatcher: req:1 'down' [br-d72bd039829d]: start running ordered scripts...
I have seen people online that said it had to do with the architecture, I have seen people who have suggested that it has to do with entrypoints in dockerfiles. I have tried googling all over, but I'm missing the necessary frame of reference to do this effectively.
What is going wrong here?
I found the answer by asking some smart people.
The error "exec format error" almost always refers to the architecture not being supported or other problems with it.
using dpkg to see architectures is not the correct way. It shows what architectures installed packages are allowed to use. Not what the host cpu architecture is.
sudo dpkg --print-architecture
i386
user@server:~$ sudo dpkg --print-foreign-architectures
amd64
arm64
The arch
command shows the host cpu architecture.
arch
i686
The problem is that i686 is a 32bit architecture while jellyfin and linux server only support 64bit architectures. I have by accident installed 32bit debian on my system instead of the 64bit one.