上下文:服务器 Ubuntu 20.04.1,内核 5.4.0-53-generic
每天多次出现以下错误(系统日志):
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]: [email protected]: 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]: [email protected]: 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.
正如您在最后看到的,这也会导致 Apache 服务器重新启动...因为被停止的 UID 是 Apache 正在使用的用户(它是不是默认的 www-data),这是一个问题。什么可能导致此错误?