• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[gelöst] Mein Apache-Server bleibt plötzlich hängen

JohnLex

Newbie
Nun, wie mein Titel schon im Groben verät bleibt mein ApacheServer immer wenn ich ihn starten will hängen. Also erst mal voraus: Ich hab nen Root-Server mit Suse auf den ich mit SSH connecte. Apache und so sind dort auch schon eingerichtet gewesen und musste nur noch gestartet werden. Naja, 2-3 Wochen lief das problemlos. Ich habe auch nichts an den Configs oder sonst wo geändert, vor allem nicht in den letzten Tagen. Doch plötzlich kann keiner mehr auf meinen Gameserver, weil die automatischen Downloads nicht mehr funktionieren. Woran liegts: Der Apache is down. Okay dachte ich mir, wenn er mal abstürtzt, dat macht ja nicht so viel. Dummerweise ist er allerdings einfach nur hängn geblieben. Die Anwendungen laufen im Hintergrund sind aber nur Zombies. Ich hab dann erst mal im Internet nach gesucht und meine Log mit einer verglichen, wo jemand drauf meinte, es könnte sich um einen Angriff von dem Wurm Nimda handeln. Das ergibt bei mir allerdings nicht wirklich viel Sinn, da er ja down gegangen ist. Allerdings hat irgendjemand oder -etwas meine inhalte von htdocs auf gut glück durchsucht wie aus der Log zu entnehmen ist. Das war jedenfalls nicht ich und vor allem ist das über einen längeren Abstand geschehen. Naja, dann hab ich mal komplett alle Anwendungen die mit dem Webserver zu tun haben geschlossen und mir Xampp drauf gemacht. Dort das gleiche, erst kommt die Meldung das er startet und dann schmiert die Konsole ab und ich kann nischt mehr eingeben. Zurück bleiben dann die Zombieanwendungen.

Hier ist jetzt noch die Errorlog von meinem bisher funktionierenden Apache:
Code:
[Sat Aug 20 16:06:01 2005] [error] [client 80.2.178.148] File does not exist: /home/httpd/vhosts/default/htdocs/downloads/et/tcetest/de_dust.pk3, referer: ET://80.237.146.13:27960
[Sat Aug 20 16:06:12 2005] [error] [client 62.214.212.139] File does not exist: /home/httpd/vhosts/default/htdocs/downloads/et/tcetest/de_dust.pk3, referer: ET://80.237.146.13:27960
[Sat Aug 20 18:33:46 2005] [error] [client 217.115.141.56] File does not exist: /home/httpd/vhosts/default/htdocs/phpMyAdmin
[Sun Aug 21 23:34:10 2005] [error] [client 66.235.194.233] File does not exist: /home/httpd/vhosts/default/htdocs/phpmyadmin
[Mon Aug 22 06:17:10 2005] [error] [client 216.244.165.226] script not found or unable to stat: /home/httpd/vhosts/default/cgi-bin/awstats.pl
[Mon Aug 22 18:37:31 2005] [error] [client 193.219.14.15] Directory index forbidden by rule: /home/httpd/vhosts/default/htdocs/downloads/et/tcetest/
[Mon Aug 22 18:37:37 2005] [error] [client 193.219.14.15] Directory index forbidden by rule: /home/httpd/vhosts/default/htdocs/downloads/et/
[Mon Aug 22 18:37:41 2005] [error] [client 193.219.14.15] Directory index forbidden by rule: /home/httpd/vhosts/default/htdocs/downloads/
[Mon Aug 22 18:37:45 2005] [error] [client 193.219.14.15] File does not exist: /home/httpd/vhosts/default/htdocs/top_body_bg.jpg, referer: http://80.237.146.13/
[Mon Aug 22 18:37:45 2005] [error] [client 193.219.14.15] File does not exist: /home/httpd/vhosts/default/htdocs/background.jpg, referer: http://80.237.146.13/
[Mon Aug 22 19:31:26 2005] [error] [client 70.17.255.43] File does not exist: /home/httpd/vhosts/default/htdocs/sumthin
[Mon Aug 22 23:15:08 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/download
[Mon Aug 22 23:15:08 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico
[Mon Aug 22 23:15:16 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/download
[Mon Aug 22 23:15:16 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico
[Mon Aug 22 23:15:20 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/top_body_bg.jpg, referer: http://80.237.146.13/
[Mon Aug 22 23:15:20 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/background.jpg, referer: http://80.237.146.13/
[Mon Aug 22 23:15:21 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico
[Mon Aug 22 23:15:54 2005] [error] [client 83.39.107.33] Directory index forbidden by rule: /home/httpd/vhosts/default/htdocs/downloads/et/
[Mon Aug 22 23:15:54 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico
[Mon Aug 22 23:16:06 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/downloads/et/tctest
[Mon Aug 22 23:16:06 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico
[Mon Aug 22 23:16:12 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/downloads/et/tctest
[Mon Aug 22 23:16:12 2005] [error] [client 83.39.107.33] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico
[Tue Aug 23 09:03:54 2005] [error] [client 216.244.165.226] script not found or unable to stat: /home/httpd/vhosts/default/cgi-bin/awstats.pl
[Tue Aug 23 16:35:51 2005] [warn] child process 716 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:51 2005] [warn] child process 6214 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:51 2005] [warn] child process 5554 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:51 2005] [warn] child process 7519 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:51 2005] [warn] child process 4281 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:51 2005] [warn] child process 716 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:51 2005] [warn] child process 6214 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:51 2005] [warn] child process 5554 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:51 2005] [warn] child process 7519 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:51 2005] [warn] child process 4281 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:52 2005] [warn] child process 716 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:52 2005] [warn] child process 6214 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:52 2005] [warn] child process 5554 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:52 2005] [warn] child process 7519 still did not exit, sending a SIGTERM
[Tue Aug 23 16:35:52 2005] [warn] child process 4281 still did not exit, sending a SIGTERM

Und hier noch alle laufenden Prozesse, die jetzt z.b. laufen bzw Zombies sind:
Code:
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   588  240 ?        Ss   21:02   0:00 init
root      1629  0.0  0.0  2308 1160 ?        Ss   21:02   0:00 /bin/bash /etc/init.d/rc 3
root      1787  0.0  0.0  1392  524 ?        Ss   21:02   0:00 /sbin/syslogd -a /var/lib/ntp/dev/log
root      1790  0.0  0.0  1496  692 ?        Ss   21:02   0:00 /sbin/klogd -c 1 -2
root      1816  0.0  0.0  2620  820 ?        S    21:02   0:00 /usr/lib/courier-imap/libexec/couriertcpd -address=0 -stderrlo
root      1818  0.0  0.0  2392  608 ?        S    21:02   0:00 /usr/lib/courier-imap/sbin/courierlogger imapd
root      1827  0.0  0.0  2624  824 ?        S    21:02   0:00 /usr/lib/courier-imap/libexec/couriertcpd -address=0 -stderrlo
root      1829  0.0  0.0  2392  608 ?        S    21:02   0:00 /usr/lib/courier-imap/sbin/courierlogger imapd-ssl
root      1836  0.0  0.0  2624  824 ?        S    21:02   0:00 /usr/lib/courier-imap/libexec/couriertcpd -address=0 -stderrlo
root      1838  0.0  0.0  2392  608 ?        S    21:02   0:00 /usr/lib/courier-imap/sbin/courierlogger pop3d
root      1846  0.0  0.0  2624  824 ?        S    21:02   0:00 /usr/lib/courier-imap/libexec/couriertcpd -address=0 -stderrlo
root      1848  0.0  0.0  2392  608 ?        S    21:02   0:00 /usr/lib/courier-imap/sbin/courierlogger pop3d-ssl
named     1862  0.0  0.0 10972 2568 ?        Ss   21:02   0:00 /usr/sbin/named -t /var/lib/named -u named
named     1863  0.0  0.0 10972 2568 ?        S    21:02   0:00 /usr/sbin/named -t /var/lib/named -u named
named     1864  0.0  0.0 10972 2568 ?        S    21:02   0:00 /usr/sbin/named -t /var/lib/named -u named
named     1865  0.0  0.0 10972 2568 ?        S    21:02   0:00 /usr/sbin/named -t /var/lib/named -u named
named     1866  0.0  0.0 10972 2568 ?        S    21:02   0:00 /usr/sbin/named -t /var/lib/named -u named
root      1872  0.0  0.0  4960 1800 ?        Ss   21:02   0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
root      1878  0.0  0.0  2036  860 ?        Ss   21:02   0:00 /usr/sbin/xinetd
root      1881  0.0  0.0  2432 1160 ?        S    21:02   0:00 /bin/bash /etc/init.d/rc3.d/S16psa start
root      1944  0.0  0.0  2304 1088 ?        S    21:02   0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --pid-file=/var/lib/
mysql     2009  0.0  0.0 21968 2800 ?        S    21:02   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --use
mysql     2010  0.0  0.0 21968 2800 ?        S    21:02   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --use
mysql     2011  0.0  0.0 21968 2800 ?        S    21:02   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --use
qmails    2015  0.0  0.0  1408  356 ?        S    21:02   0:00 qmail-send
qmaill    2017  0.0  0.0  1364  424 ?        S    21:02   0:00 splogger qmail
root      2018  0.0  0.0  1364  324 ?        S    21:02   0:00 qmail-lspawn ./Maildir/
qmailr    2019  0.0  0.0  1364  324 ?        S    21:02   0:00 qmail-rspawn
qmailq    2020  0.0  0.0  1356  300 ?        S    21:02   0:00 qmail-clean
postgres  2073  0.0  0.0 19096 2480 ?        S    21:02   0:00 /usr/bin/postmaster -D /var/lib/pgsql/data
postgres  2077  0.0  0.0  9896 2260 ?        S    21:02   0:00 postgres: stats buffer process
postgres  2078  0.0  0.0  8904 2316 ?        S    21:02   0:00 postgres: stats collector process
root      2091  0.0  0.0  3136  592 ?        S    21:02   0:00 /usr/local/psa/admin/sbin/websrvmng -p -v
root      2092  0.0  0.0  2308 1140 ?        Ss   21:02   0:00 /bin/sh /etc/init.d/apache2 start
root      2116  0.0  0.0  9928 3016 ?        S    21:02   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -t
root      2502  0.0  0.0  8164 2368 ?        Ss   21:03   0:00 sshd: root@notty
root      2514  0.0  0.0  4804 1448 ?        Ss   21:03   0:00 /usr/lib/ssh/sftp-server
root     12771  0.3  0.0  8000 2360 ?        Ss   21:09   0:00 sshd: root@pts/0
root     12785  0.8  0.0  2764 1688 pts/0    Ss   21:09   0:00 -bash


Ich hoffe das mir irgendjemand helfen kann, denn ich kann mir einfach nicht erklären woran es liegt. Möchte jetzt auch nicht unbedingt gleich nen kompletten Serverreset anordnen müssen. Bis dann alles wieder läuft.... :cry:

mfg. John
 

nbkr

Guru
Also das Log gibt nicht viel her, am Ende scheinen ein paar Childprozesse des Apache sich nicht ordnungsgemäß zu beenden. Vielleicht ein abgestürztes PHP Script. Auf dem Prozessauszug sehe ich keinen Zombie.
 
OP
J

JohnLex

Newbie
PHP-Scripte liefen bisher keine drauf und Zombies müssen diese Prozesse ja wohl sein:

Code:
root      2092  0.0  0.0  2308 1140 ?        Ss   21:02   0:00 /bin/sh /etc/init.d/apache2 start
root      2116  0.0  0.0  9928 3016 ?        S    21:02   0:00 /usr/sbin/httpd2-prefork -f

Wenn ich den Status des Apache abrufe bekomme ich Dead als Meldung und wenn ich ihn restarte bleibt die Console hängen. Ist aber erst seit vorgestern so...
 

nbkr

Guru
S heißt Sleeping. Ein Zombie wird mit <defunct> markiert. Hast Du in der Zeit seit dem der Apache nicht mehr geht was an der Config geändert. Ist der Rechner irgendwie auffällig (mehr Traffic als normalerweise, etc). Was sagt das auth.log, und die Apachelogs? Was gibt chkrootkit her?
 
OP
J

JohnLex

Newbie
lol, jetzt kommt mal ne bessere antwort... dachte bei diesem forum ginge es reger zu... naja, egal, die Logs kann ich dir jetzt sowieso nich mehr geben. Ich hab jetzt nen Hardreset bzw. eine Neuinstallation angeordnet, denn sonst hätte es zu lange gedauert. Wenn es nicht ein Hacker oder Hacktool war, dann weiß ich auch nicht woran es lag... Absolut nichts hatte ich schließlich verändert. Zumindest was den Apache anging. Hatte mich sonst nur um den Gameserver gekümmert. Der Apache war nur für die Downloads zuständig und zum andern hat irgendwas oder irgendjemand alle Verzeichnisse gescannt, bzw. auf gut glück nach bestimmten möglicherweise vorhandenen Dateien gesucht...

nichts für ungut... :wink:

Greetz,
John
 
Oben