该服务器是运行CentOS 7 64位的VPS。
我正在尝试让服务器执行由浏览器 (CGI) 调用的 Perl 脚本。为此,我在网站管理员论坛上发了一个帖子。但是在尝试执行建议的任务来完成此任务时,我遇到了操作系统生成的一些错误。具体来说,systemctl restart 命令失败。
[root@WANNABEsports /]# sudo systemctl restart httpd.service
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.
运行错误中的命令并收到以下内容:
[root@WANNABEsports /]# systemctl status httpd.service -l
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2023-03-23 06:21:48 UTC; 3min 23s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 14999 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 14999 (code=exited, status=1/FAILURE)
Mar 23 06:21:48 WANNABEsports.name systemd[1]: Starting The Apache HTTP Server...
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: (98)Address already in use: AH00073: make_sock: unable to listen for connections on address [::]:80
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: (98)Address already in use: AH00073: make_sock: unable to listen for connections on address 0.0.0.0:80
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: no listening sockets available, shutting down
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: AH00015: Unable to open logs
Mar 23 06:21:48 WANNABEsports.name systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 23 06:21:48 WANNABEsports.name systemd[1]: Failed to start The Apache HTTP Server.
Mar 23 06:21:48 WANNABEsports.name systemd[1]: Unit httpd.service entered failed state.
Mar 23 06:21:48 WANNABEsports.name systemd[1]: httpd.service failed.
和 。 。 。
[root@WANNABEsports /]# journalctl -xe
--
-- Unit httpd.service has begun starting up.
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: (98)Address already in use: AH00073: make_sock: unable to listen for connections on address [::]:80
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: (98)Address already in use: AH00073: make_sock: unable to listen for connections on address 0.0.0.0:80
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: no listening sockets available, shutting down
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: AH00015: Unable to open logs
Mar 23 06:21:48 WANNABEsports.name systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 23 06:21:48 WANNABEsports.name systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Mar 23 06:21:48 WANNABEsports.name systemd[1]: Unit httpd.service entered failed state.
Mar 23 06:21:48 WANNABEsports.name systemd[1]: httpd.service failed.
Mar 23 06:21:48 WANNABEsports.name sudo[14995]: pam_unix(sudo:session): session closed for user root
我明白两者都涉及失败,但不明白需要做什么来纠正这种情况。