PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Apache Webserver startet nach Socket Error nicht mehr



chiratoss
17.12.10, 00:30
Hallo Gemeinde. Ich hab für euch was zu knobeln:
Es geht um einen root server auf openSUSE 11.1 mit Plesk 9.2 auf dem der Apache2 gestern Abend abgestürzt ist und sich seit dem nicht mehr starten lässt.


/var/log/apache/error_log
[Wed Dec 15 13:29:32 2010] [error] [client 208.43.127.84] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
SQL Error = (select SpamEmail from SpamDB_s where Account=?)DB Error: no such table - select SpamEmail from SpamDB_s where Account='xxx' [nativecode=1146 ** Table 'atmail.SpamDB_s' doesn't exist]
SQL Error = (select SpamEmail from SpamDB_s where Account=?)DB Error: no such table - select SpamEmail from SpamDB_s where Account='xxx' [nativecode=1146 ** Table 'atmail.SpamDB_s' doesn't exist]
SQL Error = (select SpamEmail from SpamDB_p where Account=?)DB Error: no such table - select SpamEmail from SpamDB_p where Account=xxx [nativecode=1146 ** Table 'atmail.SpamDB_p' doesn't exist]
SQL Error = (select SpamEmail from SpamDB_p where Account=?)DB Error: no such table - select SpamEmail from SpamDB_p where Account='xxx[nativecode=1146 ** Table 'atmail.SpamDB_p' doesn't exist]
[Wed Dec 15 15:45:09 2010] [error] [client 88.191.68.95] File does not exist: /srv/www/vhosts/default/htdocs/w00tw00t.at.blackhats.romanian.anti-sec:)
[Wed Dec 15 15:45:09 2010] [error] [client 88.191.68.95] File does not exist: /srv/www/vhosts/default/htdocs/vhcs2
[Wed Dec 15 15:45:09 2010] [error] [client 88.191.68.95] File does not exist: /srv/www/vhosts/default/htdocs/vhcs2
[Wed Dec 15 16:52:08 2010] [error] [client 94.136.45.55] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Wed Dec 15 17:05:47 2010] [error] [client 208.43.127.84] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Wed Dec 15 21:22:15 2010] [notice] Graceful restart requested, doing restart
[Wed Dec 15 21:22:15 2010] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
[Thu Dec 16 12:27:58 2010] [info] Init: Initialized OpenSSL library

Seitdem tut er keinen Mux mehr… auch wenn ich mit:

apache2ctl –e debug –k start starte:
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module actions_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module alias_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module auth_basic_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module authn_file_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module authz_host_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module authz_groupfile_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module authz_default_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module authz_user_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module authn_dbm_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module autoindex_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module cgi_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module dir_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module env_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module expires_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module include_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module log_config_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module mime_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module negotiation_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module setenvif_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module ssl_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module userdir_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module php5_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module rewrite_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module perl_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module python_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module fcgid_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module jk_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module proxy_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module proxy_ajp_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module proxy_connect_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module proxy_ftp_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module proxy_http_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module suexec_module
[Thu Dec 16 13:15:22 2010] [debug] mod_so.c(246): loaded module bw_module

Er läuft auch nicht:

ps –ef | grep apache
root 13725 12372 0 13:15 pts/2 00:00:00 grep apache


ps -ef | grep httpd
root 13757 12372 0 13:19 pts/2 00:00:00 grep httpd
und der Port 80 ist auch frei:

netstat -l | grep :80
tcp 0 0 *:8009 *:* LISTEN
die Konfigurationsdateien scheinen auch in Ordnung zu sein:

apache2ctl -t
Syntax OK
Und wie gesagt: er macht beim Starten keinen Mux in den log-Dateien.

Beim Starten vom Plesk bringt er mir einen Fehler, dass er postgresql nicht starten kann, vielleicht liegt es daran.


/etc/init.d/psa start
Starting xinetd service... done
Starting named service... done
Starting mysql service... done
Starting postgresql service... failed
Starting psa-spamassassin service... done
Plesk: Starting Mail Server... already started
Syntax OK
startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1..
failed
websrvmng: Service /etc/init.d/apache2 failed to restart
websrvmng: Service /etc/init.d/apache2 failed to restart
Starting mail handlers tmpfs storage
Starting Plesk... failed
Starting drwebd service... failed

Ich hab den Server resettet und apache per update nochmal drüber installiert. Brachte nichts.


Ich bin auf alle Fälle langsam mit meinem Latein am Ende. Hat einer von euch eine Idee ? :confused:

Edit: Hab postgresql zum laufen gebracht... apache startet immer noch nicht. Damit hat es nichts zu tun.

Edit2:

Ich bin immer noch nicht wirklich weiter... die OpenSSL library wird auf alle Fälle beim Serverneustart initialisiert. Die Meldung gibt er mir aus. Ich denke es hat irgendwas mit diesem

[Wed Dec 15 21:22:15 2010] [error] (9)Bad file descriptor: apr_socket_accept: (client socket) zu tun, ich benutze die Apache Version 2.2.10. Dieser Bug mit dem restart graceful wurde meines wissens in der Version 2.2.6 schon gefixt.

Oh Mann.....

oziris
17.12.10, 11:16
Kannst Du Dich per ssh anmelden und dann die Binary des Apachen manuell starten? Etwa so: "/usr/sbin/apache2 -X -k start" (Pfad könnte falsch sein; kenne den von SuSE nicht). Vielleicht sagt er ja dann etwas, weil er nichtmal ins Log schreiben konnte. Evtl. bekommst Du auch einen Exit-Status, wenn er nichtmal was ausgeben konnte.

chiratoss
17.12.10, 21:56
Ne, wie gesagt, kein Mux:

:~ # /usr/sbin/httpd2 -X -k start
:~ # ps -ef |grep httpd
root 12078 12038 0 21:54 pts/1 00:00:00 grep httpd
:~ # tail /var/log/apache2/error_log
[Fri Dec 17 05:19:03 2010] [info] Init: Initialized OpenSSL library
:~ #

oziris
17.12.10, 22:21
Versteh ich nich.
Hast Du auf dem Rechner "strace"? Wenn ja, kannst Du es dann noch davor tun? Also etwa so: "strace /usr/sbin/httpd2 -X -k start"
Vielleicht kommt dann was hilfeiches. Normalerweise kommt aus strace so viel Zeug, dass man STDERR in eine Datei umleiten muss, wenn man es durchsehen will, aber wir können es ja erstmal so probieren.
Ich hoffe ja, dass /usr/sbin/httpd2 kein Link auf bzw. keine Kopie von /bin/bash ist ...

chiratoss
18.12.10, 05:46
ich hab strace installiert. Und nein... /usr/sbin/httpd2 zeigt auf /usr/sbin/httpd2-prefork und das ist das apache2 binary.

Der Output ist echt etwas umfangreich.... er befindet sich im Anhang.

chiratoss
18.12.10, 05:55
Ok. das war zu gross.. ich hab es kurz gezipped.

oziris
18.12.10, 10:51
Ganz unten wird eine Fehlermeldung in die Datei /srv/www/vhosts/boegelein.org/statistics/logs/error_log geschrieben. Hilft die?

chiratoss
18.12.10, 10:58
er schreibt dort:
[Sat Dec 18 10:57:08 2010] [error] Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile]

oziris
18.12.10, 11:52
Damit kenne ich mich nicht aus, doch ich vermute, wenn Du das SSL für die betroffenen Hosts abschaltest oder deren Zertifikate an die richtige Stele tust, dann wird es vermutich weiter gehen ... bis zum nächsten Fehler zumindest ...

chiratoss
18.12.10, 14:24
Gut, ich hab festgestellt, dass die Zertifikate abgelaufen sind, also hab ich sie erneuert. Der Fehler dürfte aber nicht kritisch sein.

Aber ich bin grade wirklich zu blöd.. weiß irgendwer wo openSUSE 11.1 mit Plesk 9.2 diese Konfigurationsdatei die auf das Zertifikat zeigt ablegt ?

Hier ist mein Layout:

# Filesystem layout:
#
# /etc/apache2/
# |-- charset.conv . . . . . . . . . . . . for mod_auth_ldap
# |-- conf.d/
# | |-- apache2-manual.conf . . . . . . . conf that comes with apache2-doc
# | |-- mod_php4.conf . . . . . . . . . . (example) conf that comes with apache2-mod_php4
# | `-- ... . . . . . . . . . . . . . . . other configuration added by packages
# |-- default-server.conf
# |-- errors.conf
# |-- httpd.conf . . . . . . . . . . . . . top level configuration file
# |-- listen.conf
# |-- magic
# |-- mime.types -> ../mime.types
# |-- mod_autoindex-defaults.conf
# |-- mod_info.conf
# |-- mod_log_config.conf
# |-- mod_mime-defaults.conf
# |-- mod_perl-startup.pl
# |-- mod_status.conf
# |-- mod_userdir.conf
# |-- mod_usertrack.conf
# |-- server-tuning.conf
# |-- ssl-global.conf
# |-- ssl.crl/ . . . . . . . . . . . . . . PEM-encoded X.509 Certificate Revocation Lists (CRL)
# |-- ssl.crt/ . . . . . . . . . . . . . . PEM-encoded X.509 Certificates
# |-- ssl.csr/ . . . . . . . . . . . . . . PEM-encoded X.509 Certificate Signing Requests
# |-- ssl.key/ . . . . . . . . . . . . . . PEM-encoded RSA Private Keys
# |-- ssl.prm/ . . . . . . . . . . . . . . public DSA Parameter Files
# |-- sysconfig.d/ . . . . . . . . . . . . files that are created from /etc/sysconfig/apache2
# | |-- global.conf
# | |-- include.conf
# | `-- loadmodule.conf
# |-- uid.conf
# `-- vhosts.d/ . . . . . . . . . . . . . . put your virtual host configuration (*.conf) here
# |-- vhost-ssl.template
# `-- vhost.template

Und das ist die ssl-global.conf:


<IfDefine SSL>
<IfDefine !NOSSL>
<IfModule mod_ssl.c>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/lib/apache2/ssl_scache(512000)
SSLSessionCacheTimeout 600
SSLMutex default
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
</IfDefine>
</IfDefine>

chiratoss
19.12.10, 17:47
danke.. hab's hinbekommen.

Das ist ein bisschen trickreich. War ein Bug in der Apache Aktualisierung der bricht unter bestimmten Umständen mit den Konfigurationsdateien und schreibt keine Logdateien mehr. Musste die Zeilen einzeln auskommentieren um die richtigen Befehle zu finden.

Der Thread wird im Apache Bug-Forum schon diskutiert.