如果我运行:
sudo /etc/init.d/apache2 restart
看起来运行正常。至少它显示正常。但是 nextcloud 登录页面未提供。如果网站不存在,浏览器会显示错误页面。
有时,实际上到目前为止只有两次,第一次就可以正常工作。但通常不行。然后我必须再次执行该命令。之后它总是可以再次正常工作。
我在日志中查找错误条目,但找不到任何错误。
如果我检查 apache2 的状态,它会说一切正常。
service apache2 status
给我:
Failed to dump process list, ignoring: Input/output error
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Tue 2019-11-05 13:22:36 CET; 2min 46s ago
Process: 31106 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
Process: 31111 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/apache2.service
Nov 05 13:22:36 nextcloud systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output error
Nov 05 13:22:36 nextcloud systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output error
Nov 05 13:22:36 nextcloud systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output error
Nov 05 13:22:36 nextcloud systemd[1]: Stopped The Apache HTTP Server.
Nov 05 13:22:36 nextcloud systemd[1]: Starting The Apache HTTP Server...
Nov 05 13:22:36 nextcloud systemd[31111]: Failed to attach 31111 to compat systemd cgroup /system.slice/apache2.service: No such file or directory
Nov 05 13:22:36 nextcloud apachectl[31111]: httpd (pid 8519) already running
Nov 05 13:22:36 nextcloud systemd[1]: Started The Apache HTTP Server.
如果该命令有效,则 syslog 条目如下所示:
Nov 5 10:39:42 nextcloud systemd[1]: Failed to attach 26239 to compat systemd cgroup /system.slice/apache2.service: No such file or directory
Nov 5 10:39:42 nextcloud systemd[1]: Stopping The Apache HTTP Server...
Nov 5 10:39:42 nextcloud systemd[26239]: Failed to attach 26239 to compat systemd cgroup /system.slice/apache2.service: No such file or directory
Nov 5 10:39:42 nextcloud systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output error
Nov 5 10:39:42 nextcloud systemd[1]: message repeated 3 times: [ apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output error]
Nov 5 10:39:42 nextcloud systemd[1]: Stopped The Apache HTTP Server.
Nov 5 10:39:42 nextcloud systemd[1]: Failed to attach 26244 to compat systemd cgroup /system.slice/apache2.service: No such file or directory
Nov 5 10:39:42 nextcloud systemd[1]: Starting The Apache HTTP Server...
Nov 5 10:39:42 nextcloud systemd[26244]: Failed to attach 26244 to compat systemd cgroup /system.slice/apache2.service: No such file or directory
Nov 5 10:39:42 nextcloud systemd[1]: Started The Apache HTTP Server.
如果网站没有提供服务,则如下所示:
Nov 5 10:39:49 nextcloud systemd[1]: Failed to attach 26417 to compat systemd cgroup /system.slice/apache2.service: No such file or directory
Nov 5 10:39:49 nextcloud systemd[1]: Stopping The Apache HTTP Server...
Nov 5 10:39:49 nextcloud systemd[26417]: Failed to attach 26417 to compat systemd cgroup /system.slice/apache2.service: No such file or directory
Nov 5 10:39:49 nextcloud systemd[1]: apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output error
Nov 5 10:39:49 nextcloud systemd[1]: message repeated 3 times: [ apache2.service: Failed to kill control group /system.slice/apache2.service, ignoring: Input/output error]
Nov 5 10:39:49 nextcloud systemd[1]: Stopped The Apache HTTP Server.
Nov 5 10:39:49 nextcloud systemd[1]: Failed to attach 26422 to compat systemd cgroup /system.slice/apache2.service: No such file or directory
Nov 5 10:39:49 nextcloud systemd[1]: Starting The Apache HTTP Server...
Nov 5 10:39:49 nextcloud systemd[26422]: Failed to attach 26422 to compat systemd cgroup /system.slice/apache2.service: No such file or directory
Nov 5 10:39:49 nextcloud apachectl[26422]: httpd (pid 26248) already running
Nov 5 10:39:49 nextcloud systemd[1]: Started The Apache HTTP Server.
/var/log/apache2 处的 error.log 是空的。
还有什么地方可以让我查看为什么它不起作用吗?还有其他日志文件吗?还是我错过了我发布的文件中的错误?
该系统是一个在 Proxmox 5.4 上运行的 LXC 容器 Ubuntu 18.04。所有系统都是最新的。它仅配置为使用 PostgreSQL 数据库托管 nextcloud(版本 17)。
只需再次运行该命令,一切正常(每次)。我想了解问题出在哪里。并了解更多查找错误消息的地方的信息。