2009-11-02 104 views
42

這種情況剛剛發生在三週前。我的網站內容沒有改變,它只是一個使用MySQL作爲後端的phpBB論壇。Apache服務器不斷崩潰,「發現了SIGTERM,正在關閉」

一年來沒有任何變化,但最近,每兩天左右,服務器關閉,根本無法訪問,我必須通知服務提供商物理重啓機器。

它似乎與我在日誌中發現的這些SIGTERM錯誤有關。問題是我不知道如何解決這些問題或找到根本原因,因爲我在這方面的技能缺乏。

任何人有任何想法可能會發生什麼?

的Apache/2.2.3(CentOS的)

的Linux 2.6.18-028stab057.4#1 SMP週五8月1日10點47分五十九秒MSD 2008 x86_64的

從錯誤日誌: [Sun Nov 01 15:18:53 2009] [notice]抓到SIGTERM,關機

不完全確定這是什麼原因導致我的問題,但它聽起來不是一件好事。

我可以張貼如果需要更多

 
[Sun Nov 01 05:07:17 2009] [notice] Digest: generating secret for digest authentication ... 
[Sun Nov 01 05:07:17 2009] [notice] Digest: done 
[Sun Nov 01 05:07:19 2009] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. 
[Sun Nov 01 05:07:19 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Sun Nov 01 05:07:19 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Sun Nov 01 05:07:19 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Sun Nov 01 05:07:19 2009] [warn] Init: SSL server IP/port conflict: default-64-6-237-192:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:83) vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:159) 
[Sun Nov 01 05:07:19 2009] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! 
[Sun Nov 01 05:07:19 2009] [warn] WARNING: Attempt to change ServerLimit ignored during restart 
[Sun Nov 01 05:07:19 2009] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations 
[Sun Nov 01 15:16:11 2009] [error] [client 127.0.0.1] Invalid method in request get 
[Sun Nov 01 15:18:53 2009] [notice] caught SIGTERM, shutting down 
[Sun Nov 01 15:19:27 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) 
[Sun Nov 01 15:19:27 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Sun Nov 01 15:19:27 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Sun Nov 01 15:19:27 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Sun Nov 01 15:19:27 2009] [warn] Init: SSL server IP/port conflict: default-64-6-237-192:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:83) vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:159) 
[Sun Nov 01 15:19:27 2009] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! 
[Sun Nov 01 15:19:27 2009] [notice] Digest: generating secret for digest authentication ... 
[Sun Nov 01 15:19:27 2009] [notice] Digest: done 
[Sun Nov 01 15:19:27 2009] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. 
[Sun Nov 01 15:19:27 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Sun Nov 01 15:19:27 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Sun Nov 01 15:19:27 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Sun Nov 01 15:19:27 2009] [warn] Init: SSL server IP/port conflict: default-64-6-237-192:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:83) vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:159) 
[Sun Nov 01 15:19:27 2009] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! 
[Sun Nov 01 15:19:27 2009] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations 
[Sun Nov 01 16:42:31 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 16:47:25 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 16:59:22 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 17:37:42 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 17:44:54 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 17:44:55 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 17:44:56 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 18:14:45 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 18:40:30 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 20:10:59 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 20:35:10 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 20:43:07 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 20:43:46 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 21:25:39 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 21:26:03 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 21:56:57 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:21:02 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:25:16 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting 
[Sun Nov 01 22:25:17 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:25:18 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:25:20 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:25:21 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:25:22 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:46:47 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:52:56 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:56:07 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:56:51 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 22:56:58 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 23:00:41 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 23:09:59 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 23:23:49 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 23:27:14 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 23:36:25 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Sun Nov 01 23:54:06 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 00:12:44 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 00:12:50 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 00:13:23 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 00:39:06 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 00:52:50 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 00:53:02 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 01:13:38 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 01:13:39 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 01:13:40 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 01:23:01 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 01:43:47 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 01:45:51 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 01:46:27 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 01:47:25 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 02:23:02 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 02:25:37 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 02:25:38 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 02:52:29 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 02:52:51 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 03:49:29 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 03:49:48 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 04:35:33 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 04:46:01 2009] [error] [client 66.96.201.63] File does not exist: /var/www/vhosts/default/htdocs/README 
[Mon Nov 02 04:46:01 2009] [error] [client 66.96.201.63] File does not exist: /var/www/vhosts/default/htdocs/horde 
[Mon Nov 02 04:46:01 2009] [error] [client 66.96.201.63] File does not exist: /var/www/vhosts/default/htdocs/horde2 
[Mon Nov 02 04:46:01 2009] [error] [client 66.96.201.63] File does not exist: /var/www/vhosts/default/htdocs/horde3 
[Mon Nov 02 04:46:01 2009] [error] [client 66.96.201.63] File does not exist: /var/www/vhosts/default/htdocs/horde-3.0.9 
[Mon Nov 02 04:46:01 2009] [error] [client 66.96.201.63] File does not exist: /var/www/vhosts/default/htdocs/Horde 
[Mon Nov 02 04:46:02 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 05:01:06 2009] [error] [client 58.246.73.74] File does not exist: /var/www/vhosts/default/htdocs/README 
[Mon Nov 02 05:01:06 2009] [error] [client 58.246.73.74] File does not exist: /var/www/vhosts/default/htdocs/horde 
[Mon Nov 02 05:01:07 2009] [error] [client 58.246.73.74] File does not exist: /var/www/vhosts/default/htdocs/horde2 
[Mon Nov 02 05:01:08 2009] [error] [client 58.246.73.74] File does not exist: /var/www/vhosts/default/htdocs/horde3 
[Mon Nov 02 05:01:08 2009] [error] [client 58.246.73.74] File does not exist: /var/www/vhosts/default/htdocs/horde-3.0.9 
[Mon Nov 02 05:01:09 2009] [error] [client 58.246.73.74] File does not exist: /var/www/vhosts/default/htdocs/Horde 
[Mon Nov 02 05:01:09 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 05:01:10 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 05:01:11 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
[Mon Nov 02 09:17:58 2009] [notice] caught SIGTERM, shutting down 
[Mon Nov 02 09:18:58 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) 
[Mon Nov 02 09:18:58 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Mon Nov 02 09:18:58 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Mon Nov 02 09:18:58 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Mon Nov 02 09:18:58 2009] [warn] Init: SSL server IP/port conflict: default-64-6-237-192:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:83) vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:159) 
[Mon Nov 02 09:18:58 2009] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! 
[Mon Nov 02 09:18:58 2009] [notice] Digest: generating secret for digest authentication ... 
[Mon Nov 02 09:18:58 2009] [notice] Digest: done 
[Mon Nov 02 09:18:58 2009] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. 
[Mon Nov 02 09:18:58 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Mon Nov 02 09:18:58 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Mon Nov 02 09:18:58 2009] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? 
[Mon Nov 02 09:18:58 2009] [warn] Init: SSL server IP/port conflict: default-64-6-237-192:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:83) vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:159) 
[Mon Nov 02 09:18:58 2009] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! 
[Mon Nov 02 09:18:58 2009] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations 
[Mon Nov 02 09:32:34 2009] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/ 
+2

不應該這樣去serverfault.com? – mhaller 2009-11-02 15:34:41

+0

我甚至不知道存在,我會在那裏重新發布,謝謝。 – Tom 2009-11-02 15:51:41

+3

湯姆,對不起,以恢復一個長期死去的線程,但最終解決了這個問題?我似乎在Apache/2.2.3(CentOS)上遇到了完全相同的問題。 CPU /內存使用最大值,然後需要硬重置。 – Wayne 2011-09-14 01:47:48

回答

16

SIGTERM來重新啓動Apache(前提是它在init進程自動重新啓動安裝程序):http://httpd.apache.org/docs/2.2/stopping.html

您在日誌中看到幾乎肯定是有,因爲你的供應商使用SIGTERM爲目的的項目。如果它確實崩潰,甚至不提供靜態內容,那麼這聽起來像某種線程/連接耗盡問題。也許是一個持有連接的DoS開放?

肯定是您的提供商調查的東西。

+0

就是這樣,由於託管解決方案的性質,我的提供商告訴我它已經脫離了他們的手。我一直告訴他們在我的結局上沒有任何變化,因爲這已經開始發生了,但它聾人耳語,他們只是告訴我看看日誌,並聘請某人來幫助,這不是我想聽到的。我會添加一些日誌信息給我的OP。 – Tom 2009-11-02 15:28:13

+0

我發現有趣的日誌中的內容:「服務器在22:25:16達到MaxClients設置」以及所有訪問禁止消息。看看你的訪問日誌,看看那段時間發生了什麼。 – kdgregory 2009-11-02 15:50:16

+0

另請注意,SIGTERM發生在09:17:58,而隊列中的前一條消息是05:01:11 - 這再次表明SIGTERM是故意的。我再次查看訪問日誌以查看以前的活動 - 我猜測它會在05:01左右停止。 – kdgregory 2009-11-02 15:51:56

2

你問你的供應商進行調查日誌信息?我認爲這不是一個專用的服務器,

在它的表面上,這看起來像是一個安全異常,somone正在試圖利用它/或有一個進程正在運行在一個設定的時間導致這一點,你能想想每2天在服務器上運行的任何東西?記錄工具?

SIGTERM是發送到進程以請求其終止的信號。 SIGTERM的符號常量在頭文件signal.h中定義。使用符號信號名稱是因爲信號數量可能因平臺而異,但在絕大多數系統中,SIGTERM是信號#15。

+0

服務器是VPS,我的提供商告訴我他們不支持這種類型的東西。這幾乎都在我的控制之下。 如果我發佈了更多的錯誤日誌,它能幫助搞清楚他發生了什麼嗎? – Tom 2009-11-02 15:12:15

+0

它可能會發生,但到目前爲止,錯誤日誌告訴我們管理員權限告訴服務器關閉。 – LiamB 2009-11-02 15:14:24

+0

我想,Apache會定期重新啓動自己,像這樣的簽名來清理東西。問題可能在於它不能從該自動重啓進入。 – Kzqai 2011-07-02 23:41:07

4

我在我們的L.A.M.P中有神祕的SIGTERM關機。服務器,結果是在自定義PHP模塊中出現錯誤,這是由於版本不匹配造成的。它是通過在發生故障時查看apache訪問/錯誤日誌找到的。不要忘記打開錯誤日誌記錄。

+1

這些錯誤日誌是否位於/ var/logs/httpd?你還記得日誌中的錯誤信息嗎? – Tom 2009-11-02 19:54:36

0

this page

我發現這個信息:

的的mod_fastcgi過程經理不在,雖然特別的患者(有改進的餘地這裏),並因爲它必須關閉操作,發送SIGTERM到所有它負責的FastCGI應用程序。 Apache將重新啓動進程管理器,它將重新啓動託管應用程序(就像服務器剛剛啓動一樣)。 SIGTERM就是SIGTERM - 你的應用程序應該很快退出。

這對我意味着什麼,如果數據庫I/O或CGI腳本的其他部分無法及時響應(即數據量增長速度變慢),那麼mod_fastcgi將會終止腳本......是其他人如何解釋這些文檔或我缺少什麼......