SQL Datenbank nicht mehr erreichbar

Apache, Lighttpd, nginx, Cherokee
Post Reply
baumpaul
Posts: 20
Joined: 2004-06-03 12:00
Contact:
 

SQL Datenbank nicht mehr erreichbar

Post by baumpaul »

Hallo,

ich habe Confixx 3.0.4 Pro auf meinen Suse 9 Server laufen.

Seit heute früh sind alle Datenbankgestützten Seiten nicht mehr am laufen. Die Fehlermeldung war: Zu viel SQL connection

Daraufhin habe ich den Server über SSH neu gestartet.

Die Webseiten bekommen jetzt aber keinen SQL connect mehr hin.
E-Mails können auch nicht mehr eimpfangen oder versendet werden.

An was kann das liegen? Und was benötigt Ihr noch um das genauer zu analysieren? (Ihr müsst mir dann aber auch sagen wie ich das finde was Ihr wissen wollt.)
stefanpropehan
Posts: 335
Joined: 2002-12-17 22:25
Location: Berlin
 

Re: SQL Datenbank nicht mehr erreichbar

Post by stefanpropehan »

Ein paar Fehler bzw. Statusmeldungen z.B. aus der /var/log/syslog und /var/log/mysql (oder wie die Dateien bei Suse auch immer heißen) wären nicht schlecht. Was passiert wenn du denn mysql Daemon startest?

Stefan
baumpaul
Posts: 20
Joined: 2004-06-03 12:00
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by baumpaul »

stefanpropehan wrote:Ein paar Fehler bzw. Statusmeldungen z.B. aus der /var/log/syslog und /var/log/mysql (oder wie die Dateien bei Suse auch immer heißen) wären nicht schlecht. Was passiert wenn du denn mysql Daemon startest?

Stefan

Code: Select all

h4138:~ # mysqld --log
050902 11:25:12  Can't start server: Bind on TCP/IP port: Address already in use
050902 11:25:12  Do you already have another mysqld server running on port: 3306               ?
050902 11:25:12  Aborting

050902 11:25:12  mysqld: Shutdown Complete
Hilft das auch schon mal. Suche noch mehr heraus.
stefanpropehan
Posts: 335
Joined: 2002-12-17 22:25
Location: Berlin
 

Re: SQL Datenbank nicht mehr erreichbar

Post by stefanpropehan »

Es scheint so als läuft da noch eine Instanz vom mysql... beende diese mal und versuche dann neu zu starten.

"ps" und "kill" sind deine Freunde.
baumpaul
Posts: 20
Joined: 2004-06-03 12:00
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by baumpaul »

Code: Select all

h4138:/etc/init.d # mysqladmin shutdown
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
Und wo ist der localhost auf einmal hin?
stefanpropehan
Posts: 335
Joined: 2002-12-17 22:25
Location: Berlin
 

Re: SQL Datenbank nicht mehr erreichbar

Post by stefanpropehan »

Poste mal eine Ausgabe von "ps -xauf", es scheint doch kein mysqld mehr zu laufen... was lauscht auf Port 3306?

Code: Select all

 netstat -lntp
baumpaul
Posts: 20
Joined: 2004-06-03 12:00
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by baumpaul »

stefanpropehan wrote:Poste mal eine Ausgabe von "ps -xauf", es scheint doch kein mysqld mehr zu laufen... was lauscht auf Port 3306?

Code: Select all

 netstat -lntp

Code: Select all

h4138:~ # netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State                                    PID/Program name
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN                                   700/mysqld
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN                                   651/xinetd
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN                                   597/portmap
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN                                   944/httpd2-prefork
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN                                   605/perl
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN                                   651/xinetd
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN                                   889/master
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN                                   944/httpd2-prefork
tcp        0      0 :::53                   :::*                    LISTEN                                   715/named
tcp        0      0 :::22                   :::*                    LISTEN                                   658/sshd
stefanpropehan
Posts: 335
Joined: 2002-12-17 22:25
Location: Berlin
 

Re: SQL Datenbank nicht mehr erreichbar

Post by stefanpropehan »

Code: Select all

kill 700
Danach noch einmal den mysqld neu Starten!
baumpaul
Posts: 20
Joined: 2004-06-03 12:00
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by baumpaul »

stefanpropehan wrote:Danach noch einmal den mysqld neu Starten!
Was muss ich da eingeben? "/etc/init.d/mysql restart" geht schon mal nicht
baumpaul
Posts: 20
Joined: 2004-06-03 12:00
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by baumpaul »

stefanpropehan wrote:Poste mal eine Ausgabe von "ps -xauf", es scheint doch kein mysqld mehr zu laufen... was lauscht auf Port 3306?

Code: Select all

h4138:/etc/init.d # ps -xauf
Warning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.5  0.0   620  256 ?        S    11:44   0:06 init [3]
root         2  0.0  0.0     0    0 ?        SW   11:44   0:00 [keventd]
root         3  0.0  0.0     0    0 ?        SWN  11:44   0:00 [ksoftirqd_CPU0]
root         4  0.0  0.0     0    0 ?        SW   11:44   0:00 [kswapd]
root         5  0.0  0.0     0    0 ?        SW   11:44   0:00 [bdflush]
root         6  0.0  0.0     0    0 ?        SW   11:44   0:00 [kupdated]
root        10  0.0  0.0     0    0 ?        SW   11:44   0:00 [khubd]
root        11  0.0  0.0     0    0 ?        SW   11:44   0:00 [kjournald]
root        73  0.0  0.0     0    0 ?        SW   11:44   0:00 [kjournald]
root       443  0.0  0.0  1520  472 ?        S    11:44   0:00 /sbin/dhcpcd -H -D -N -t 999999 -h linux eth0
root       510  0.1  0.1  1560  624 ?        S    11:44   0:01 /sbin/syslogd -a /var/lib/named/dev/log
root       513  0.0  0.3  2488 1552 ?        S    11:44   0:00 /sbin/klogd -c 1 -2
bin        597  0.0  0.0  1516  400 ?        S    11:44   0:00 /sbin/portmap
root       600  0.0  0.2  4136 1068 ?        S    11:44   0:00 /usr/sbin/saslauthd -a pam
root       601  0.0  0.2  4136 1068 ?        S    11:44   0:00  _ /usr/sbin/saslauthd -a pam
root       602  0.0  0.2  4136 1068 ?        S    11:44   0:00  _ /usr/sbin/saslauthd -a pam
root       603  0.0  0.2  4136 1068 ?        S    11:44   0:00  _ /usr/sbin/saslauthd -a pam
root       604  0.0  0.2  4136 1068 ?        S    11:44   0:00  _ /usr/sbin/saslauthd -a pam
root       605  0.0  1.1  8224 5800 ?        S    11:44   0:00 /usr/bin/perl /usr/lib/webmin/miniserv.pl /etc
root       651  0.0  0.1  2172  880 ?        S    11:44   0:00 /usr/sbin/xinetd
root       656  0.0  0.2  2460 1092 ?        S    11:44   0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --pi
mysql      700  0.0  0.9 24812 4988 ?        S    11:44   0:00  _ /usr/sbin/mysqld --basedir=/usr --datadir=
mysql      729  0.0  0.9 24812 4988 ?        S    11:44   0:00      _ /usr/sbin/mysqld --basedir=/usr --data
mysql      730  0.0  0.9 24812 4988 ?        S    11:44   0:00          _ /usr/sbin/mysqld --basedir=/usr --
mysql     1007  0.0  0.9 24812 4988 ?        S    11:46   0:00          _ /usr/sbin/mysqld --basedir=/usr --
mysql     2191  0.0  0.9 24812 4988 ?        S    11:49   0:00          _ /usr/sbin/mysqld --basedir=/usr --
mysql     2657  0.0  0.9 24812 4988 ?        S    11:56   0:00          _ /usr/sbin/mysqld --basedir=/usr --
mysql     2835  0.0  0.9 24812 4988 ?        S    12:00   0:00          _ /usr/sbin/mysqld --basedir=/usr --
mysql     2836  0.0  0.9 24812 4988 ?        S    12:00   0:00          _ /usr/sbin/mysqld --basedir=/usr --
mysql     2849  0.0  0.9 24812 4988 ?        S    12:01   0:00          _ /usr/sbin/mysqld --basedir=/usr --
mysql     2858  0.0  0.9 24812 4988 ?        S    12:02   0:00          _ /usr/sbin/mysqld --basedir=/usr --
mysql     2865  0.0  0.9 24812 4988 ?        S    12:02   0:00          _ /usr/sbin/mysqld --basedir=/usr --
root       658  0.0  0.3  4912 1612 ?        S    11:44   0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.p
root      2390  0.0  0.4  5440 2344 ?        S    11:49   0:00  _ sshd: root@pts/0
root      2391  0.0  0.4  5440 2344 ?        S    11:49   0:00      _ sshd: root@pts/0
root      2394  0.0  0.3  2964 1712 pts/0    S    11:49   0:00      _ -bash
root      2870  0.0  0.1  2664  720 pts/0    R    12:03   0:00          _ ps -xauf
root       707  0.0  0.0  1352  280 ?        S    11:44   0:00 /sbin/startpar -f -- /etc/init.d/rc3.d/S13name
named      715  0.0  0.5 11256 2580 ?        S    11:44   0:00 /usr/sbin/named -t /var/lib/named -u named
named      716  0.0  0.5 11256 2580 ?        S    11:44   0:00  _ /usr/sbin/named -t /var/lib/named -u named
named      717  0.0  0.5 11256 2580 ?        S    11:44   0:00      _ /usr/sbin/named -t /var/lib/named -u n
named      718  0.0  0.5 11256 2580 ?        S    11:44   0:00      _ /usr/sbin/named -t /var/lib/named -u n
named      719  0.0  0.5 11256 2580 ?        S    11:44   0:00      _ /usr/sbin/named -t /var/lib/named -u n
root       889  0.0  0.2  4168 1348 ?        S    11:45   0:00 /usr/lib/postfix/master
postfix   1030  0.0  0.2  4204 1348 ?        S    11:46   0:00  _ pickup -l -t fifo -u
postfix   1031  0.0  0.2  4348 1516 ?        S    11:46   0:00  _ qmgr -l -t fifo -u
postfix   1033  0.0  0.3  5068 1736 ?        S    11:46   0:00  _ trivial-rewrite -n rewrite -t unix -u
postfix   1040  0.0  0.2  4276 1468 ?        S    11:46   0:00  _ smtp -t unix -u
postfix   1042  0.0  0.2  4276 1468 ?        S    11:46   0:00  _ smtp -t unix -u
postfix   1044  0.0  0.2  4276 1468 ?        S    11:46   0:00  _ smtp -t unix -u
postfix   1046  0.0  0.2  4276 1468 ?        S    11:46   0:00  _ smtp -t unix -u
postfix   2628  0.0  0.2  4204 1304 ?        S    11:54   0:00  _ flush -z -t unix -u
postfix   2644  0.0  0.2  4276 1464 ?        S    11:55   0:00  _ smtp -t unix -u
postfix   2840  0.0  0.3  5224 1812 ?        S    12:01   0:00  _ cleanup -z -t unix -u
postfix   2841  0.0  0.3  5224 1812 ?        S    12:01   0:00  _ cleanup -z -t unix -u
root       944  0.0  1.6 20348 8644 ?        S    11:45   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd
root       945  0.0  0.2  3312 1404 ?        S    11:45   0:00  _ /usr/bin/perl /root/confixx/pipelog.pl
wwwrun     994  0.2  2.1 21864 11136 ?       S    11:45   0:02  _ /usr/sbin/httpd2-prefork -f /etc/apache2/h
wwwrun     998  0.2  2.2 22164 11636 ?       S    11:45   0:02  _ /usr/sbin/httpd2-prefork -f /etc/apache2/h
wwwrun    1001  0.2  2.3 22848 12012 ?       S    11:45   0:02  _ /usr/sbin/httpd2-prefork -f /etc/apache2/h
wwwrun    2461  0.0  2.1 21764 10932 ?       S    11:51   0:00  _ /usr/sbin/httpd2-prefork -f /etc/apache2/h
wwwrun    2465  0.1  2.3 22696 11832 ?       S    11:51   0:00  _ /usr/sbin/httpd2-prefork -f /etc/apache2/h
wwwrun    2677  0.0  2.0 21396 10532 ?       S    11:56   0:00  _ /usr/sbin/httpd2-prefork -f /etc/apache2/h
wwwrun    2682  0.1  2.0 21620 10700 ?       S    11:56   0:00  _ /usr/sbin/httpd2-prefork -f /etc/apache2/h
wwwrun    2825  0.0  1.7 20348 8760 ?        S    12:00   0:00  _ /usr/sbin/httpd2-prefork -f /etc/apache2/h
wwwrun    2826  0.0  1.7 20348 8764 ?        S    12:00   0:00  _ /usr/sbin/httpd2-prefork -f /etc/apache2/h
wwwrun    2857  0.0  1.7 20348 8752 ?        S    12:02   0:00  _ /usr/sbin/httpd2-prefork -f /etc/apache2/h
root       974  0.0  0.1 12272  792 ?        S    11:45   0:00 /usr/sbin/nscd
root       975  0.0  0.1 12272  792 ?        S    11:45   0:00  _ /usr/sbin/nscd
root       976  0.0  0.1 12272  792 ?        S    11:45   0:00      _ /usr/sbin/nscd
root       977  0.0  0.1 12272  792 ?        S    11:45   0:00      _ /usr/sbin/nscd
root       978  0.0  0.1 12272  792 ?        S    11:45   0:00      _ /usr/sbin/nscd
root       979  0.0  0.1 12272  792 ?        S    11:45   0:00      _ /usr/sbin/nscd
root       980  0.0  0.1 12272  792 ?        S    11:45   0:00      _ /usr/sbin/nscd
root       984  0.0  0.1  1516  584 ?        S    11:45   0:00 /usr/sbin/cron
root      2866  0.0  0.0     0    0 ?        Z    12:02   0:00  _ [cron] <defunct>
root       986  0.0  0.0  1500  512 tty1     S    11:45   0:00 /sbin/mingetty --noclear tty1
root       987  0.0  0.0  1500  512 tty2     S    11:45   0:00 /sbin/mingetty tty2
root       988  0.0  0.0  1500  512 tty3     S    11:45   0:00 /sbin/mingetty tty3
root       989  0.0  0.0  1500  512 tty4     S    11:45   0:00 /sbin/mingetty tty4
root       990  0.0  0.0  1500  512 tty5     S    11:45   0:00 /sbin/mingetty tty5
root       991  0.0  0.0  1500  512 tty6     S    11:45   0:00 /sbin/mingetty tty6
root       992  0.0  0.0  1492  488 ttyS0    S    11:45   0:00 /sbin/agetty -L 57600 ttyS0 vt102
rootsvr
Posts: 538
Joined: 2005-09-02 11:12
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by rootsvr »

kill 656
bzw:
656 0.0 0.2 2460 1092 ? S 11:44 0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --pi
mysql 700 0.0 0.9 24812 4988 ? S 11:44 0:00 _ /usr/sbin/mysqld --basedir=/usr --datadir=
mysql 729 0.0 0.9 24812 4988 ? S 11:44 0:00 _ /usr/sbin/mysqld --basedir=/usr --data
mysql 730 0.0 0.9 24812 4988 ? S 11:44 0:00 _ /usr/sbin/mysqld --basedir=/usr --
mysql 1007 0.0 0.9 24812 4988 ? S 11:46 0:00 _ /usr/sbin/mysqld --basedir=/usr --
mysql 2191 0.0 0.9 24812 4988 ? S 11:49 0:00 _ /usr/sbin/mysqld --basedir=/usr --
mysql 2657 0.0 0.9 24812 4988 ? S 11:56 0:00 _ /usr/sbin/mysqld --basedir=/usr --
mysql 2835 0.0 0.9 24812 4988 ? S 12:00 0:00 _ /usr/sbin/mysqld --basedir=/usr --
mysql 2836 0.0 0.9 24812 4988 ? S 12:00 0:00 _ /usr/sbin/mysqld --basedir=/usr --
mysql 2849 0.0 0.9 24812 4988 ? S 12:01 0:00 _ /usr/sbin/mysqld --basedir=/usr --
mysql 2858 0.0 0.9 24812 4988 ? S 12:02 0:00 _ /usr/sbin/mysqld --basedir=/usr --
mysql 2865 0.0 0.9 24812 4988 ? S 12:02 0:00 _ /usr/sbin/mysqld --basedir=/usr --

alle die töten, wenn ein mysql stop jicht hilft ist vermutlich die PID weg..
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by Joe User »

Code: Select all

pkill -u mysql && kill 656
/etc/init.d/mysql start
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
baumpaul
Posts: 20
Joined: 2004-06-03 12:00
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by baumpaul »

Also mySql scheint wieder zu funktionieren. Zumindest gehen die Webseiten wieder. Haben über Webmin mySql neu gestartet.

Dafür kann man immer noch keine Mails empfangen oder senden.
stefanpropehan
Posts: 335
Joined: 2002-12-17 22:25
Location: Berlin
 

Re: SQL Datenbank nicht mehr erreichbar

Post by stefanpropehan »

Welche Konfiguration? Bezieht Postfix die Email Adressen aus der mysql Datenbank? Dann Postfix mal neu Starten - da sich Postfix neu auf das Socket connecten muss!

Fehlermeldungen /var/log/mail? Glaskugeln haben wir alle nicht!

Ist zwar ein wenig spät... du solltest dir das hier aber noch einmal durchlesen und mal darüber nach denken!

http://www.rootforum.org/forum/viewtopic.php?t=5248

Stefan
baumpaul
Posts: 20
Joined: 2004-06-03 12:00
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by baumpaul »

stefanpropehan wrote:Welche Konfiguration? Bezieht Postfix die Email Adressen aus der mysql Datenbank? Dann Postfix mal neu Starten - da sich Postfix neu auf das Socket connecten muss!

Fehlermeldungen /var/log/mail? Glaskugeln haben wir alle nicht!

Ist zwar ein wenig spät... du solltest dir das hier aber noch einmal durchlesen und mal darüber nach denken!

http://www.rootforum.org/forum/viewtopic.php?t=5248

Stefan
Ja das ist mir schon klar. Aber den Server haben ich jetzt seit 3 Jahren am durchlaufen und jetzt macht er ein mal mucken. Ausserdem ist das ding nur Privat und geschenkt.

Mit Postfix hat das doch nix zu tun das doch nichts zu tun SLQ immer noch nicht geht oder sich andauert aufhängt.
rootsvr
Posts: 538
Joined: 2005-09-02 11:12
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by rootsvr »

Naja aber Dein Mail geht nicht hat (oder kann) mit postfix und einer Vielleicht nötigen DB Anbindung zu tun haben.
baumpaul
Posts: 20
Joined: 2004-06-03 12:00
Contact:
 

Re: SQL Datenbank nicht mehr erreichbar

Post by baumpaul »

rootsvr wrote:Naja aber Dein Mail geht nicht hat (oder kann) mit postfix und einer Vielleicht nötigen DB Anbindung zu tun haben.
Das hat aber glaub ich tiefere probleme. Da wie gesagt die Webseiten wieder keine Verbindung herstellen können.

Der einzige der das kann ist scheinbar die root
baumpaul
Posts: 20
Joined: 2004-06-03 12:00
Contact:
 

kleines problem mit großer auswirkung

Post by baumpaul »

also alles geht wieder.

Reoback hat ein 35 GB großes Backup gemacht, womit die Festplatte natürlich voll war.

Darauf ist wohl keiner gekommen :)

Thx an euch.
Post Reply