0

Context: server Ubuntu 20.04.1, kernel 5.4.0-53-generic

Multiple times per day, the following error happens (syslog):

Dec  2 18:02:33 my-host systemd[1]: Stopping User Manager for UID 1002...
Dec  2 18:02:33 my-host systemd[1412956]: Stopped target Main User Target.
Dec  2 18:02:33 my-host systemd[1412956]: Stopped target Basic System.
Dec  2 18:02:33 my-host systemd[1412956]: Stopped target Paths.
Dec  2 18:02:33 my-host systemd[1412956]: Stopped target Sockets.
Dec  2 18:02:33 my-host systemd[1412956]: Stopped target Timers.
Dec  2 18:02:33 my-host systemd[1412956]: dbus.socket: Succeeded.
Dec  2 18:02:33 my-host systemd[1412956]: Closed D-Bus User Message Bus Socket.
Dec  2 18:02:33 my-host systemd[1412956]: dirmngr.socket: Succeeded.
Dec  2 18:02:33 my-host systemd[1412956]: Closed GnuPG network certificate management daemon.
Dec  2 18:02:33 my-host systemd[1412956]: gpg-agent-browser.socket: Succeeded.
Dec  2 18:02:33 my-host systemd[1412956]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Dec  2 18:02:33 my-host systemd[1412956]: gpg-agent-extra.socket: Succeeded.
Dec  2 18:02:33 my-host systemd[1412956]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Dec  2 18:02:33 my-host systemd[1412956]: gpg-agent-ssh.socket: Succeeded.
Dec  2 18:02:33 my-host systemd[1412956]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Dec  2 18:02:33 my-host systemd[1412956]: gpg-agent.socket: Succeeded.
Dec  2 18:02:33 my-host systemd[1412956]: Closed GnuPG cryptographic agent and passphrase cache.
Dec  2 18:02:33 my-host systemd[1412956]: pk-debconf-helper.socket: Succeeded.
Dec  2 18:02:33 my-host systemd[1412956]: Closed debconf communication socket.
Dec  2 18:02:33 my-host systemd[1412956]: snapd.session-agent.socket: Succeeded.
Dec  2 18:02:33 my-host systemd[1412956]: Closed REST API socket for snapd user session agent.
Dec  2 18:02:33 my-host systemd[1412956]: Reached target Shutdown.
Dec  2 18:02:33 my-host systemd[1412956]: systemd-exit.service: Succeeded.
Dec  2 18:02:33 my-host systemd[1412956]: Finished Exit the Session.
Dec  2 18:02:33 my-host systemd[1412956]: Reached target Exit the Session.
Dec  2 18:02:33 my-host systemd[1]: user@1002.service: Succeeded.
Dec  2 18:02:33 my-host systemd[1]: Stopped User Manager for UID 1002.
Dec  2 18:02:33 my-host systemd[1]: Stopping User Runtime Directory /run/user/1002...
Dec  2 18:02:33 my-host systemd[1]: run-user-1002.mount: Succeeded.
Dec  2 18:02:33 my-host systemd[1]: user-runtime-dir@1002.service: Succeeded.
Dec  2 18:02:33 my-host systemd[1]: Stopped User Runtime Directory /run/user/1002.
Dec  2 18:02:33 my-host systemd[1]: Removed slice User Slice of UID 1002.
Dec  2 18:02:34 my-host systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
Dec  2 18:02:34 my-host systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec  2 18:02:34 my-host systemd[1]: apache2.service: Scheduled restart job, restart counter is at 3.
Dec  2 18:02:34 my-host systemd[1]: Stopped The Apache HTTP Server.
Dec  2 18:02:34 my-host systemd[1]: Starting The Apache HTTP Server...
Dec  2 18:02:34 my-host systemd[1]: Started The Apache HTTP Server.

As you can see at the end this also causes the Apache server to restart... because the UID being stopped is the user being used by Apache (it is not the default www-data), and that's an issue. What could be causing this error?

2
  • There are two separate things going on here, so let’s start with the first one. This message, “Stopping User Manager for UID 1002” signifies when a user’s last interactive session logs out, and its associated systemd --user instance is shut down. It is possible that the Apache process depends on something that is cleaned up as part of logging out, and subsequently fails. Better check the Apache logs for the exact reason for its failure. – Amir Dec 3 '20 at 7:46
  • Thanks Amir. Looking at the logs of Apache when this happens it logs: [mpm_prefork:emerg] [pid 247986] (43)Identifier removed: AH00144: couldn't grab the accept mutex. Another abstruse error to investigate... – Absurdev Dec 4 '20 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.