Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Docker fails to start after upgrade
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 127
Location: Dortmund

PostPosted: Sun Jan 26, 2025 3:56 pm    Post subject: Docker fails to start after upgrade Reply with quote

After updating my gentoo laptop, docker fails to start.

Code:

~ # systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xeu docker.service" for details.


The logs:

Code:

░░ The job identifier is 10140.
Jan 26 16:45:15 hal9000 dockerd[9163]: time="2025-01-26T16:45:15.310546598+01:00" level=info msg="Starting up"
Jan 26 16:45:15 hal9000 dockerd[9163]: time="2025-01-26T16:45:15.311324853+01:00" level=info msg="OTEL tracing is not configured, using no-op tracer provider"
Jan 26 16:45:15 hal9000 dockerd[9163]: failed to start daemon: failed to dial "/run/containerd/containerd.sock": Unimplemented: unknown service containerd.services.namespaces.v1.Namespaces: not implemented
Jan 26 16:45:15 hal9000 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ An ExecStart= process belonging to unit docker.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Jan 26 16:45:15 hal9000 systemd[1]: docker.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ The unit docker.service has entered the 'failed' state with result 'exit-code'.
Jan 26 16:45:15 hal9000 systemd[1]: Failed to start Docker Application Container Engine.
░░ Subject: A start job for unit docker.service has failed
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ A start job for unit docker.service has finished with a failure.
░░
░░ The job identifier is 10140 and the job result is failed.
Jan 26 16:45:17 hal9000 systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ Automatic restarting of the unit docker.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Jan 26 16:45:17 hal9000 systemd[1]: docker.service: Start request repeated too quickly.
Jan 26 16:45:17 hal9000 systemd[1]: docker.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ The unit docker.service has entered the 'failed' state with result 'exit-code'.
Jan 26 16:45:17 hal9000 systemd[1]: Failed to start Docker Application Container Engine.
░░ Subject: A start job for unit docker.service has failed
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ A start job for unit docker.service has finished with a failure.
░░
░░ The job identifier is 10412 and the job result is failed.


I found no information about the Error:
Unimplemented: unknown service containerd.services.namespaces.v1.Namespaces: not implemented


My emerge --info:
https://bpa.st/Y2LQ

Thanks in advance
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2654

PostPosted: Sun Jan 26, 2025 4:43 pm    Post subject: Reply with quote

You failed to mention which version is docker and its use configuration.

Post the output of emerge -pv app-containers/docker

Best Regards,
Georgi
Back to top
View user's profile Send private message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 127
Location: Dortmund

PostPosted: Sun Jan 26, 2025 7:55 pm    Post subject: Reply with quote

:-) here is the version:
Code:

~ # emerge -pv app-containers/docker

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 5.50 s (backtrack: 0/20).

[ebuild   R    ] app-containers/docker-27.4.1-r1::gentoo  USE="container-init overlay2 seccomp systemd -apparmor -btrfs (-cuda) (-selinux)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

 * IMPORTANT: 8 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


I tested also tested app-containers/docker-27.5.0, same result.
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1456
Location: Richmond Hill, Canada

PostPosted: Sun Jan 26, 2025 8:12 pm    Post subject: Reply with quote

Did you change your docker.service unit file?

Do you have non-default containerd?

Please run
Code:
systemctl cat docker.service | grep ExecStart=


Your posted message have
Quote:
Jan 26 16:45:15 hal9000 dockerd[9163]: failed to start daemon: failed to dial "/run/containerd/containerd.sock": Unimplemented: unknown service containerd.services.namespaces.v1.Namespaces: not implemented
Jan 26 16:45:15 hal9000 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Which mean containerd likely did not start or dead.

How about output of
Code:
systemctl status containerd
Back to top
View user's profile Send private message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 127
Location: Dortmund

PostPosted: Sun Jan 26, 2025 8:34 pm    Post subject: Reply with quote

Code:

 ~# systemctl cat docker.service | grep ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock


My docker is disabled, I use docker on my laptop sometimes for software development.

Code:

~ # systemctl status containerd
● containerd.service - containerd container runtime
     Loaded: loaded (/usr/lib/systemd/system/containerd.service; disabled; preset: disabled)
     Active: active (running) since Sun 2025-01-26 16:01:11 CET; 5h 17min ago
 Invocation: be248033c82c4a26aacdf0eb9a3d12fe
       Docs: https://containerd.io
    Process: 6739 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
   Main PID: 6742 (containerd)
      Tasks: 12
     Memory: 56.8M (peak: 58.8M)
        CPU: 355ms
     CGroup: /system.slice/containerd.service
             └─6742 /usr/bin/containerd

Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335331393+01:00" level=info msg="loading plugin" id=io.containerd.grpc.v1.healthcheck type=io.containerd.grpc.v1
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335360665+01:00" level=info msg="loading plugin" id=io.containerd.nri.v1.nri type=io.containerd.nri.v1
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335615016+01:00" level=info msg="runtime interface created"
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335625826+01:00" level=info msg="created NRI interface"
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335637677+01:00" level=info msg="loading plugin" id=io.containerd.grpc.v1.cri type=io.containerd.grpc.v1
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335650371+01:00" level=warning msg="failed to load plugin" error="unable to load CRI image service plugin dependency: /var/lib/containerd/>
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335852192+01:00" level=info msg=serving... address=/run/containerd/containerd.sock.ttrpc
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335898564+01:00" level=info msg=serving... address=/run/containerd/containerd.sock
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335953829+01:00" level=info msg="containerd successfully booted in 0.018988s"
Jan 26 16:01:11 hal9000 systemd[1]: Started containerd container runtime.


I start containerd:
Code:

~ # systemctl start containerd
hal9000 ~ # systemctl status containerd
● containerd.service - containerd container runtime
     Loaded: loaded (/usr/lib/systemd/system/containerd.service; disabled; preset: disabled)
     Active: active (running) since Sun 2025-01-26 16:01:11 CET; 5h 17min ago
 Invocation: be248033c82c4a26aacdf0eb9a3d12fe
       Docs: https://containerd.io
    Process: 6739 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
   Main PID: 6742 (containerd)
      Tasks: 12
     Memory: 56.8M (peak: 58.8M)
        CPU: 355ms
     CGroup: /system.slice/containerd.service
             └─6742 /usr/bin/containerd

Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335331393+01:00" level=info msg="loading plugin" id=io.containerd.grpc.v1.healthcheck type=io.containerd.grpc.v1
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335360665+01:00" level=info msg="loading plugin" id=io.containerd.nri.v1.nri type=io.containerd.nri.v1
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335615016+01:00" level=info msg="runtime interface created"
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335625826+01:00" level=info msg="created NRI interface"
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335637677+01:00" level=info msg="loading plugin" id=io.containerd.grpc.v1.cri type=io.containerd.grpc.v1
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335650371+01:00" level=warning msg="failed to load plugin" error="unable to load CRI image service plugin dependency: /var/lib/containerd/>
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335852192+01:00" level=info msg=serving... address=/run/containerd/containerd.sock.ttrpc
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335898564+01:00" level=info msg=serving... address=/run/containerd/containerd.sock
Jan 26 16:01:11 hal9000 containerd[6742]: time="2025-01-26T16:01:11.335953829+01:00" level=info msg="containerd successfully booted in 0.018988s"
Jan 26 16:01:11 hal9000 systemd[1]: Started containerd container runtime.


and then the same error again

Code:

~ # systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xeu docker.service" for details.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2654

PostPosted: Sun Jan 26, 2025 9:04 pm    Post subject: Reply with quote

For some reason, docker is unable to communicate with containerd.

What's the output of emerge -pv containerd?

Best Regards,
Georgi
Back to top
View user's profile Send private message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 127
Location: Dortmund

PostPosted: Mon Jan 27, 2025 6:33 am    Post subject: Reply with quote

Code:

~ # emerge -pv containerd

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 4.99 s (backtrack: 0/20).

[ebuild   R    ] app-containers/containerd-2.0.1::gentoo  USE="cri device-mapper seccomp -apparmor -btrfs -hardened (-selinux) -test" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


reinstall:
Code:

~ # emerge  containerd
   .
   .
   .
>>> Source compiled.
 * Skipping make test/check due to ebuild restriction.
>>> Test phase [disabled because of RESTRICT=test]: app-containers/containerd-2.0.1

>>> Install app-containers/containerd-2.0.1 into /var/tmp/portage/app-containers/containerd-2.0.1/image
>>> Completed installing app-containers/containerd-2.0.1 into /var/tmp/portage/app-containers/containerd-2.0.1/image

 * Final size of build directory: 209388 KiB (204.4 MiB)
 * Final size of installed tree:  146376 KiB (142.9 MiB)


>>> Installing (1 of 1) app-containers/containerd-2.0.1::gentoo

>>> Completed (1 of 1) app-containers/containerd-2.0.1::gentoo

 * GNU info directory index is up-to-date.
~ # systemctl daemon-reload
~ # systemctl stop containerd
~ # systemctl start containerd
~ # systemctl status containerd
● containerd.service - containerd container runtime
     Loaded: loaded (/usr/lib/systemd/system/containerd.service; disabled; preset: disabled)
     Active: active (running) since Mon 2025-01-27 06:54:46 CET; 3min 3s ago
 Invocation: b46349e99be9430ba533d8327a0168ea
       Docs: https://containerd.io
    Process: 41232 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
   Main PID: 41233 (containerd)
      Tasks: 12
     Memory: 15M (peak: 16.2M)
        CPU: 151ms
     CGroup: /system.slice/containerd.service
             └─41233 /usr/bin/containerd

Jan 27 06:54:46 xxx containerd[41233]: time="2025-01-27T06:54:46.616457277+01:00" level=info msg="loading plugin" id=io.containerd.grpc.v1.healthcheck type=io.containerd.grpc.v1
Jan 27 06:54:46 xxx containerd[41233]: time="2025-01-27T06:54:46.616488072+01:00" level=info msg="loading plugin" id=io.containerd.nri.v1.nri type=io.containerd.nri.v1
Jan 27 06:54:46 xxx containerd[41233]: time="2025-01-27T06:54:46.616534044+01:00" level=info msg="runtime interface created"
Jan 27 06:54:46 xxx containerd[41233]: time="2025-01-27T06:54:46.616553600+01:00" level=info msg="created NRI interface"
Jan 27 06:54:46 xxx containerd[41233]: time="2025-01-27T06:54:46.616580954+01:00" level=info msg="loading plugin" id=io.containerd.grpc.v1.cri type=io.containerd.grpc.v1
Jan 27 06:54:46 xxx containerd[41233]: time="2025-01-27T06:54:46.616613484+01:00" level=warning msg="failed to load plugin" error="unable to load CRI image service plugin dependency: /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs does not support d_type. If the backing filesystem is xfs, please reformat with ftype=1 to enable d_type support" id=io.containerd.grpc.v1.cri type=io.containerd.grpc.v1
Jan 27 06:54:46 xxx containerd[41233]: time="2025-01-27T06:54:46.616955246+01:00" level=info msg=serving... address=/run/containerd/containerd.sock.ttrpc
Jan 27 06:54:46 xxx containerd[41233]: time="2025-01-27T06:54:46.617070581+01:00" level=info msg=serving... address=/run/containerd/containerd.sock
Jan 27 06:54:46 xxx containerd[41233]: time="2025-01-27T06:54:46.617217836+01:00" level=info msg="containerd successfully booted in 0.043594s"
Jan 27 06:54:46 xxx systemd[1]: Started containerd container runtime.
~ # systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xeu docker.service" for details.
 ~ # ls -la /run/containerd/
insgesamt 0
drwx--x--x  2 root root   80 27. Jan 06:54 .
drwxr-xr-x 40 root root 1040 27. Jan 06:59 ..
srw-rw----  1 root root    0 27. Jan 06:54 containerd.sock
srw-rw----  1 root root    0 27. Jan 06:54 containerd.sock.ttrpc

The strange thing is, despite the rebuild, he wants a rebuild again.
Code:

~ # emerge -pv containerd

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 5.06 s (backtrack: 0/20).

[ebuild   R    ] app-containers/containerd-2.0.1::gentoo  USE="cri device-mapper seccomp -apparmor -btrfs -hardened (-selinux) -test" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2654

PostPosted: Mon Jan 27, 2025 8:51 am    Post subject: Reply with quote

First start with

emerge --deselect containerd

as this is a dependency and you just put it in world with your unnecesary emerge containerd.

Second, yes it wants to rebuild as the command issued is to build and since it's already emerged, it'll rebuild.

I asked you for those commands as they'll show me use settings and version. And possibly some pending changes in those. I never asked you to actually rebuild.

Third, the only difference I see with my setup is device-mapper enabled. Somewhere I read this is deprecated. Try disabling it and rebuilding containerd, this time with -1 (--oneshot).

And last, but not least, always run emerge with -1 (--oneshot) when fixing something.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum