1. 程式人生 > >httpd.service重啟記錄

httpd.service重啟記錄

自己的 httpd systemctl 目前 ann oct oot failure failed

今天無法打開站點,猜測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重啟記錄