码迷,mamicode.com
首页 > Web开发 > 详细

httpd.service重启记录

时间:2018-10-02 17:22:19      阅读:283      评论:0      收藏:0      [点我收藏+]

标签:systemd   reset   开机启动   signal   art   stop   result   unit   enabled   

 

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

首先查看httpd.service状态 ,结果如下,果然在一周以前的时候就停止了,换算成北京时间应该是9月20日下午,那时可能是我在测试。但是我查阅当日工作日志并没有发现相关的信息,不太确定是不是遭遇了外部攻击,或者是服务器资源不足导致Apache自己运行出现了问题。具体问题暂时不想再纠结了,自己水平目前真的太菜,还有很多东西要学习,暂时无精力去调查了,以后测试时做好记录,便于分析攻击来源。
[root@tac 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.

我的服务器肯定也没有重启过,我还是顺手添加开机启动(因为之前就是开机启动的)
[root@tac 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服务
[root@tac html]# systemctl restart httpd.service

再查看httpd.service的状态
[root@tac 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.
[root@tac html]#

站点就可以重新访问了。

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

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

httpd.service重启记录

标签:systemd   reset   开机启动   signal   art   stop   result   unit   enabled   

原文地址:https://www.cnblogs.com/frank1901s/p/9736653.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!