Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstalling docker-ce RPM does not disable docker.socket #851

Closed
ruizink opened this issue Feb 23, 2023 · 6 comments · Fixed by #852
Closed

Uninstalling docker-ce RPM does not disable docker.socket #851

ruizink opened this issue Feb 23, 2023 · 6 comments · Fixed by #852

Comments

@ruizink
Copy link
Contributor

ruizink commented Feb 23, 2023

The docker-ce rpm package does not cleanup the docker.socket unit from systemd on uninstall.

This makes it so that docker.socket keeps in an active state, despite the socket not being functional:

# systemctl status docker.socket
● docker.socket
   Loaded: not-found (Reason: Unit docker.socket not found.)
   Active: active (listening) since Thu 2023-02-23 22:57:22 UTC; 33s ago
    Tasks: 0 (limit: 25092)
   Memory: 264.0K
   CGroup: /system.slice/docker.socket

Feb 23 22:57:22 751cf9ad8325 systemd[1]: Starting Docker Socket for the API.
Feb 23 22:57:22 751cf9ad8325 systemd[1]: Listening on Docker Socket for the API.
Feb 23 22:57:53 751cf9ad8325 systemd[1]: docker.socket: Socket unit configuration has changed while unit has been running, no open socket file descriptor left. The socket unit is not functional until restarted.

This is a silent trap for the next time we start the service after reinstallation, because socket activation won't work:

# journalctl -u docker.service

Feb 23 23:03:37 751cf9ad8325 systemd[1]: Starting Docker Application Container Engine...
Feb 23 23:03:38 751cf9ad8325 dockerd[19450]: time="2023-02-23T23:03:38.028768000Z" level=info msg="Starting up"
Feb 23 23:03:38 751cf9ad8325 dockerd[19450]: failed to load listeners: no sockets found via socket activation: make sure the service was started by systemd
Feb 23 23:03:38 751cf9ad8325 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Feb 23 23:03:38 751cf9ad8325 systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 23 23:03:38 751cf9ad8325 systemd[1]: Failed to start Docker Application Container Engine.
Feb 23 23:03:40 751cf9ad8325 systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
Feb 23 23:03:40 751cf9ad8325 systemd[1]: docker.service: Scheduled restart job, restart counter is at 1.
Feb 23 23:03:40 751cf9ad8325 systemd[1]: Stopped Docker Application Container Engine.
@corhere
Copy link

corhere commented Feb 24, 2023

The deb package is also affected: moby/moby#45059

@thaJeztah
Copy link
Member

@corhere for deb, the fix was in #686 but we had to revert it for older Ubuntu LTS versions (18.04); #699

@ruizink
Copy link
Contributor Author

ruizink commented Sep 28, 2023

Hello.
Can we get an update on this issue?
Thanks

@thaJeztah
Copy link
Member

I think this should be fixed through

Which re-applied the original fix (now that Ubuntu 18.04 reached EOL); @ruizink were you still seeing this issue, and if so on what version of docker (and what distro)?

@ruizink ruizink changed the title Uninstalling docker-ce does not disable docker.socket Uninstalling docker-ce RPM does not disable docker.socket Sep 28, 2023
@ruizink
Copy link
Contributor Author

ruizink commented Sep 28, 2023

This is an issue related with the RPM package, not deb.
I've updated the title for clarity.
#852 should fix the issue, but it's still pending review.

@thaJeztah
Copy link
Member

🤦‍♂️ doh! Sorry for that, jumping between too many tickets, and thought this was about the deb issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants