背景提要
由于要做APP审查,网站证明书过期,请同事更新下证明书, 更新完证明书,apache 不能重启了
重启所报错误
[root@xxx ~]# 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.
[root@xxx ~]# systemctl restart httpd
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 命令查看,结果如下:
[root@xxx conf.d]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2023-12-25 14:23:49 CST; 7min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 21919 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 19390 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Process: 21918 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 21918 (code=exited, status=1/FAILURE)
Dec 25 14:23:49 demo systemd[1]: Starting The Apache HTTP Server...
Dec 25 14:23:49 demo systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 25 14:23:49 demo kill[21919]: kill: cannot find process ""
Dec 25 14:23:49 demo systemd[1]: httpd.service: control process exited, code=exited status=1
Dec 25 14:23:49 demo systemd[1]: Failed to start The Apache HTTP Server.
Dec 25 14:23:49 demo systemd[1]: Unit httpd.service entered failed state.
Dec 25 14:23:49 demo systemd[1]: httpd.service failed.
通过 搜索 【apache 再启动 kill[21919]: kill: cannot find process 】关键字,找到下面这篇文章:``
最终通过查看 apache error_log 和 ssl 的 error_log 找到原因:
tail -n 20 /var/log/httpd/error_log:
[Mon Dec 25 14:14:55.472119 2023] [ssl:emerg] [pid 1767] AH02238: Unable to configure RSA server private key
[Mon Dec 25 14:14:55.472140 2023] [ssl:emerg] [pid 1767] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
[Mon Dec 25 14:17:48.877004 2023] [ssl:emerg] [pid 20223] AH02238: Unable to configure RSA server private key
[Mon Dec 25 14:17:48.877025 2023] [ssl:emerg] [pid 20223] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
tail -n 100 /var/log/httpd/pia_ssl_error_log:
[Mon Dec 25 14:14:55.472119 2023] [ssl:emerg] [pid 1767] AH02238: Unable to configure RSA server private key
[Mon Dec 25 14:14:55.472140 2023] [ssl:emerg] [pid 1767] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
[Mon Dec 25 14:17:48.877004 2023] [ssl:emerg] [pid 20223] AH02238: Unable to configure RSA server private key
[Mon Dec 25 14:17:48.877025 2023] [ssl:emerg] [pid 20223] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
同事把证明书恢复成之前的之后,apache 就可以启动起来了
标签:所换,httpd,证明书,14,service,25,apahce,key,Dec From: https://www.cnblogs.com/xixi-and-haha/p/17926164.html