Hi, I’m trying to install Rootless Docker on a shared cluster (to work with Slurm). However, I repeatedly ran into Failed to start docker.service issue. This persists after a fresh installation of Docker (after uninstalling Docker). Any help would be very valuable!
$ dockerd-rootless-setuptool.sh install
[WARNING] File already exists, skipping: /afs/.../.config/systemd/user/docker.service
[INFO] starting systemd service docker.service
+ systemctl --user start docker.service
Failed to start docker.service: Unit docker.service not found.
+ set +x
[ERROR] Failed to start docker.service. Run `journalctl -n 20 --no-pager --user --unit docker.service` to show the error log.
[ERROR] Before retrying installation, you might need to uninstall the current setup: `/usr/bin/dockerd-rootless-setuptool.sh uninstall -f ; /usr/bin/rootlesskit rm -rf /afs/.../.local/share/docker`
No journal files were opened due to insufficient permissions.
Thanks! Unfortunately, this didn’t solve the problem:
[INFO] Creating /afs/home/.config/systemd/user/docker.service
[INFO] starting systemd service docker.service
+ systemctl --user start docker.service
Failed to start docker.service: Unit docker.service not found.
+ set +x
[ERROR] Failed to start docker.service. Run `journalctl -n 20 --no-pager --user --unit docker.service` to show the error log.
[ERROR] Before retrying installation, you might need to uninstall the current setup: `/usr/bin/dockerd-rootless-setuptool.sh uninstall -f ; /usr/bin/rootlesskit rm -rf /afs/home/.local/share/docker`
No journal files were opened due to insufficient permissions.
Just want to follow up on the thread. In the end, it seems like placing docker.service in /etc/systemd/user (via sudo) instead of ~/.config/systemd/user/docker.service would work.
However, re-running the dockerd-rootless-setuptool.sh again ran into another problem:
[INFO] Creating [path removed for brevity]
[INFO] starting systemd service docker.service
+ systemctl --user start docker.service
Job for docker.service failed because the control process exited with error code.
See "systemctl --user status docker.service" and "journalctl --user -xe" for details.
+ set +x
[ERROR] Failed to start docker.service. Run `journalctl -n 20 --no-pager --user --unit docker.service` to show the error log.
[ERROR] Before retrying installation, you might need to uninstall the current setup: `/usr/bin/dockerd-rootless-setuptool.sh uninstall -f ; /usr/bin/rootlesskit rm -rf /afs/csail.mit.edu/u/h/hanguo/.local/share/docker`
No journal files were opened due to insufficient permissions.
Following the suggestion, I ran the journalctl command,
$ journalctl -n 20 --no-pager --user --unit docker.service
Hint: You are currently not seeing messages from the system.
Users in groups 'adm', 'systemd-journal' can see all messages.
Pass -q to turn off this notice.
No journal files were opened due to insufficient permissions.
Adding sudo,
$ sudo journalctl -n 20 --no-pager --user --unit docker.service
No journal files were found.
No, but if the installer creates files under your home, I wouldn’t create the file somewhere else. I never had problem with the installer, so I don’t know what could go wrong.
Hey my attempt running the rootless install script failed with the same messages. In the end it turned out my version of slirp4netns was too old.
I got the newest one (v1.3.0) from here, moved the old one from /usr/bin/slirp4netns to /usr/bin/slirp4netns.old and placed the new one there.
After that the install script worked!