httpd.service重启记录

Posted frank1901s

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了httpd.service重启记录相关的知识,希望对你有一定的参考价值。

 

今天无法打开站点,猜测httpd.service服务肯定又停止了,可能是受到外部攻击(也可能是来自自己的攻击)

首先查看httpd.service状态 ,结果如下,果然在一周以前的时候就停止了,换算成北京时间应该是9月20日下午,那时可能是我在测试。但是我查阅当日工作日志并没有发现相关的信息,不太确定是不是遭遇了外部攻击,或者是服务器资源不足导致Apache自己运行出现了问题。具体问题暂时不想再纠结了,自己水平目前真的太菜,还有很多东西要学习,暂时无精力去调查了,以后测试时做好记录,便于分析攻击来源。
[[email protected] html]# systemctl status httpd.service
* httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-09-19 05:43:17 EDT; 1 weeks 5 days ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 747 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 739 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=killed, signal=KILL)
Main PID: 739 (code=killed, signal=KILL)
Status: “Total requests: 31461; Current requests/sec: 0; Current traffic: 0 B/sec”

Mar 31 17:51:01 tac systemd[1]: Starting The Apache HTTP Server…
Mar 31 17:51:02 tac systemd[1]: Started The Apache HTTP Server.
Jun 20 11:34:23 tac systemd[1]: Starting The Apache HTTP Server…
Jun 20 11:34:24 tac systemd[1]: Started The Apache HTTP Server.
Sep 19 05:43:16 tac systemd[1]: httpd.service: main process exited, code=killed, status=9/KILL
Sep 19 05:43:17 tac kill[747]: kill: cannot find process “”
Sep 19 05:43:17 tac systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 19 05:43:17 tac systemd[1]: Unit httpd.service entered failed state.
Sep 19 05:43:18 tac systemd[1]: httpd.service failed.

我的服务器肯定也没有重启过,我还是顺手添加开机启动(因为之前就是开机启动的)
[[email protected] html]# systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

重启httpd.service服务
[[email protected] html]# systemctl restart httpd.service

再查看httpd.service的状态
[[email protected] html]# systemctl status httpd.service
* httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-10-01 22:46:22 EDT; 12s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 14117 (httpd)
Status: “Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec”
CGroup: /system.slice/httpd.service
|-14117 /usr/sbin/httpd -DFOREGROUND
|-14118 /usr/sbin/httpd -DFOREGROUND
|-14119 /usr/sbin/httpd -DFOREGROUND
|-14120 /usr/sbin/httpd -DFOREGROUND
|-14121 /usr/sbin/httpd -DFOREGROUND
`-14122 /usr/sbin/httpd -DFOREGROUND

Oct 01 22:46:21 tac systemd[1]: Starting The Apache HTTP Server…
Oct 01 22:46:22 tac systemd[1]: Started The Apache HTTP Server.
[[email protected] html]#

站点就可以重新访问了。

http://tacgib.club/?p=116

---转载请注明出处---







































以上是关于httpd.service重启记录的主要内容,如果未能解决你的问题,请参考以下文章

http启动(重启)报错:Job for httpd.service failed because the control process exited with error code.

Job for httpd.service failed. See 'systemctl status httpd.service'

Job for httpd.service failed because the control process exited with error code. See "systemctl

httpd.service 的作业失败,因为控制进程以错误代码退出。有关详细信息,请参阅“systemctl status httpd.service”和“journalctl -xe”

最新cenos执行service httpd restart 报错Failed to restart httpd.service: Unit not found.

centos7中无法打开httpd.service