我正在运行 Alma Linux 8,并且正在设置一个新的虚拟主机。之后我想重新启动 HTTPD 并收到以下错误消息:
Redirecting to /bin/systemctl start 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.
当我运行 systemctl status httpd.service 时,我得到:
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code) since Sat 2023-11-04 01:20:24 GMT; 30s ago
Docs: man:httpd.service(8)
Process: 675671 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Process: 683401 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 683401 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
Nov 04 01:20:24 rasmusknabe.dk systemd[1]: Starting The Apache HTTP Server...
Nov 04 01:20:24 rasmusknabe.dk httpd[683401]: [Sat Nov 04 01:20:24.362923 2023] [so:warn] [pid 683401:tid 139681646659904] AH01574: module rewrite_module is already load>
Nov 04 01:20:24 rasmusknabe.dk httpd[683401]: [Sat Nov 04 01:20:24.572558 2023] [core:error] [pid 683401:tid 139681646659904] (EAI 2)Name or service not known: AH00547: >
Nov 04 01:20:24 rasmusknabe.dk httpd[683401]: (98)Address already in use: AH00072: make_sock: could not bind to address 185.185.126.120:443
Nov 04 01:20:24 rasmusknabe.dk httpd[683401]: no listening sockets available, shutting down
Nov 04 01:20:24 rasmusknabe.dk httpd[683401]: AH00015: Unable to open logs
Nov 04 01:20:24 rasmusknabe.dk systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Nov 04 01:20:24 rasmusknabe.dk systemd[1]: httpd.service: Failed with result 'exit-code'.
Nov 04 01:20:24 rasmusknabe.dk systemd[1]: Failed to start The Apache HTTP Server.
当我运行journalctl -xe 时我得到:
Nov 04 01:16:05 rasmusknabe.dk sshd[683223]: Failed password for root from 121.229.62.94 port 59871 ssh2
Nov 04 01:16:06 rasmusknabe.dk sshd[683232]: Accepted password for root from 2.104.115.39 port 58962 ssh2
Nov 04 01:16:06 rasmusknabe.dk sshd[683232]: pam_systemd(sshd:session): Failed to create session: Maximum number of sessions (8192) reached, refusing further sessions.
Nov 04 01:16:06 rasmusknabe.dk sshd[683232]: pam_unix(sshd:session): session opened for user root by (uid=0)
Nov 04 01:16:08 rasmusknabe.dk sshd[683223]: Received disconnect from 121.229.62.94 port 59871:11: Bye Bye [preauth]
Nov 04 01:16:08 rasmusknabe.dk sshd[683223]: Disconnected from authenticating user root 121.229.62.94 port 59871 [preauth]
Nov 04 01:16:13 rasmusknabe.dk sudo[683261]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/sbin/service httpd start
Nov 04 01:16:13 rasmusknabe.dk sudo[683261]: pam_systemd(sudo:session): Failed to create session: Maximum number of sessions (8192) reached, refusing further sessions.
Nov 04 01:16:13 rasmusknabe.dk sudo[683261]: pam_unix(sudo:session): session opened for user root by root(uid=0)
Nov 04 01:16:13 rasmusknabe.dk systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Nov 04 01:16:13 rasmusknabe.dk httpd[683274]: [Sat Nov 04 01:16:13.702217 2023] [so:warn] [pid 683274:tid 139995425147200] AH01574: module rewrite_module is already load>
Nov 04 01:16:13 rasmusknabe.dk httpd[683274]: [Sat Nov 04 01:16:13.865702 2023] [core:error] [pid 683274:tid 139995425147200] (EAI 2)Name or service not known: AH00547: >
Nov 04 01:16:13 rasmusknabe.dk httpd[683274]: (98)Address already in use: AH00072: make_sock: could not bind to address 185.185.126.120:443
Nov 04 01:16:13 rasmusknabe.dk httpd[683274]: no listening sockets available, shutting down
Nov 04 01:16:13 rasmusknabe.dk httpd[683274]: AH00015: Unable to open logs
Nov 04 01:16:13 rasmusknabe.dk systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Nov 04 01:16:13 rasmusknabe.dk systemd[1]: httpd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit httpd.service has entered the 'failed' state with result 'exit-code'.
Nov 04 01:16:13 rasmusknabe.dk systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Nov 04 01:16:13 rasmusknabe.dk sudo[683261]: pam_unix(sudo:session): session closed for user root
Nov 04 01:16:16 rasmusknabe.dk sshd[683277]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=208.109.15.199 user=root
Nov 04 01:16:18 rasmusknabe.dk sshd[683277]: Failed password for root from 208.109.15.199 port 50174 ssh2
Nov 04 01:16:19 rasmusknabe.dk sshd[683277]: Received disconnect from 208.109.15.199 port 50174:11: Bye Bye [preauth]
Nov 04 01:16:19 rasmusknabe.dk sshd[683277]: Disconnected from authenticating user root 208.109.15.199 port 50174 [preauth]
我不太明白这两条消息,希望这里有人能帮助我找出问题所在?
我发现我的 ssl.conf 文件中有一行“Listen 185.185.126.120:443”。
不知道为什么这是一个问题或我是如何到达那里的,但删除它有帮助!