MySQL server decided it wanted today off ?

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

There's less than a 1% chance I'll ever have to worry about someone walking up to my computer while I'm away so I have a habit of passing out on the couch just leaving all applications sitting right where they are when I'm working on something.

I did that last nite working on something in PHP/MySQL, woke up this morning and nothing could connect to MySQL.
I checked netstat -l and oddly enough there was no listener for MySQL.

I looked through the logs [Ubuntu system], mysql.err and mysql.log are zero-length files. mysql.log.1.gz is just a 20 byte pretty much empty gz file.

In syslog.0 I found this
Quote:
Mar 21 07:47:56 ubuntubert mysqld[28981]: 080321 7:47:56 [Note] /usr/sbin/mysqld: Normal shutdown
Mar 21 07:47:56 ubuntubert mysqld[28981]:
Mar 21 07:47:56 ubuntubert mysqld[28981]: 080321 7:47:56 InnoDB: Starting shutdown...
Mar 21 07:47:58 ubuntubert mysqld[28981]: 080321 7:47:58 InnoDB: Shutdown completed; log sequence number 0 43745
Mar 21 07:47:58 ubuntubert mysqld[28981]: 080321 7:47:58 [Note] /usr/sbin/mysqld: Shutdown complete
Mar 21 07:47:58 ubuntubert mysqld[28981]:
Mar 21 07:47:58 ubuntubert mysqld_safe[29826]: ended


That's right around the time my logs get rotated, & with the exception of a missing startup sequence after that it looks just like any other log related restart.

I haven't found anything about MySQL in any other log files, at the moment it just looks like MySQL decided to take the day off.

I can understand why MySQL would want to take Friday off, but I'd still like to know what happened & what's going on. :scratchhead:

Any clues ?
I do what I outlined in the start of the post fairly often & this is the first time this has happened.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

Provide a process list.

Perhaps your having it open for edit, kept the pid alive, thus it could not restart after it was shut down, since the pid was active?

Just a stab in the dark.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

After discovery, I "restarted" MySQL so I could get back to business.
Code: [ Select ]
sudo /etc/init.d/mysql restart


That went over exactly as if MySQL was running and was being restarted.

Now that you mention having it open for edit, I did have MySQLs root logged into the MySQL server via Putty on my laptop this morning. I'm sure I left it like that.

Just now I tried logging in like that via SSH again, then restarted MySQL from another SSH session. It restarted without any issues though.


So, MySQL has been restarted twice by me between the issue & this process list. The only other things I've done is transfer files via FTP, access some web pages, & used netstat/top/etc through SSH.
Code: [ Select ]
me@box:/$ ps -A
  PID TTY          TIME CMD
    1 ?        00:00:02 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 migration/0
    4 ?        00:00:00 ksoftirqd/0
    5 ?        00:00:00 watchdog/0
    6 ?        00:00:00 events/0
    7 ?        00:00:00 khelper
   26 ?        00:00:21 kblockd/0
   27 ?        00:00:00 kacpid
   28 ?        00:00:00 kacpi_notify
   89 ?        00:00:00 kseriod
  108 ?        00:00:27 kswapd0
  160 ?        00:00:00 aio/0
 1986 ?        00:00:00 ata/0
 1987 ?        00:00:00 ata_aux
 2003 ?        00:00:00 ksuspend_usbd
 2004 ?        00:00:00 khubd
 2354 ?        00:00:15 kjournald
 2561 ?        00:00:01 udevd
 3399 ?        00:00:00 cqueue/0
 3409 ?        00:00:00 w1_control
 3416 ?        00:00:00 w1_bus_master1
 3883 tty4     00:00:00 getty
 3884 tty5     00:00:00 getty
 3886 tty2     00:00:00 getty
 3887 tty3     00:00:00 getty
 3888 tty1     00:00:00 getty
 3889 tty6     00:00:00 getty
 4064 ?        00:00:00 acpid
 4096 ?        00:00:00 kondemand/0
 4171 ?        00:00:04 syslogd
 4226 ?        00:00:00 dd
 4228 ?        00:00:00 klogd
 4249 ?        00:02:36 dbus-daemon
 4265 ?        00:00:01 NetworkManager
 4279 ?        00:00:00 NetworkManagerD
 4292 ?        00:00:00 system-tools-ba
 4293 ?        00:00:00 dbus-daemon
 4312 ?        00:01:12 hald
 4313 ?        00:00:00 hald-runner
 4354 ?        00:00:00 hald-addon-keyb
 4355 ?        00:00:00 hald-addon-keyb
 4356 ?        00:00:00 hald-addon-keyb
 4360 ?        00:00:00 hald-addon-acpi
 4415 ?        00:04:35 hald-addon-stor
 4733 ?        00:00:00 sshd
 6084 ?        00:00:00 dbus-daemon
 7003 ?        00:00:00 gnome-vfs-daemo
 7236 ?        00:00:00 master
 7695 ?        00:00:53 teamspeak-serve
 8300 ?        00:00:00 console-kit-dae
 8412 ?        00:00:01 dhcdbd
 8487 ?        00:00:00 dhclient
 8734 ?        00:00:00 proftpd
 8771 ?        00:00:00 atd
 8787 ?        00:00:02 cron
 9183 ?        00:00:00 dbus-daemon
 9221 ?        00:00:00 gnome-vfs-daemo
 9684 ?        00:00:00 qmgr
 9686 ?        00:00:43 kjournald
 9694 ?        00:00:08 kjournald
 9698 ?        00:00:00 kjournald
 9919 ?        00:00:04 apache2
18997 ?        00:00:29 pdflush
21315 ?        00:00:10 pdflush
30262 ?        00:00:00 apache2
30267 ?        00:00:02 apache2
30308 ?        00:00:00 pickup
30328 ?        00:00:00 apache2
30357 ?        00:00:00 sshd
30359 ?        00:00:00 sshd
30360 pts/1    00:00:00 bash
30453 pts/1    00:00:00 mysqld_safe
30490 pts/1    00:00:01 mysqld
30491 pts/1    00:00:00 logger
30563 ?        00:00:00 proftpd
30577 pts/1    00:00:00 ps
me@box:/$
  1. me@box:/$ ps -A
  2.   PID TTY          TIME CMD
  3.     1 ?        00:00:02 init
  4.     2 ?        00:00:00 kthreadd
  5.     3 ?        00:00:00 migration/0
  6.     4 ?        00:00:00 ksoftirqd/0
  7.     5 ?        00:00:00 watchdog/0
  8.     6 ?        00:00:00 events/0
  9.     7 ?        00:00:00 khelper
  10.    26 ?        00:00:21 kblockd/0
  11.    27 ?        00:00:00 kacpid
  12.    28 ?        00:00:00 kacpi_notify
  13.    89 ?        00:00:00 kseriod
  14.   108 ?        00:00:27 kswapd0
  15.   160 ?        00:00:00 aio/0
  16.  1986 ?        00:00:00 ata/0
  17.  1987 ?        00:00:00 ata_aux
  18.  2003 ?        00:00:00 ksuspend_usbd
  19.  2004 ?        00:00:00 khubd
  20.  2354 ?        00:00:15 kjournald
  21.  2561 ?        00:00:01 udevd
  22.  3399 ?        00:00:00 cqueue/0
  23.  3409 ?        00:00:00 w1_control
  24.  3416 ?        00:00:00 w1_bus_master1
  25.  3883 tty4     00:00:00 getty
  26.  3884 tty5     00:00:00 getty
  27.  3886 tty2     00:00:00 getty
  28.  3887 tty3     00:00:00 getty
  29.  3888 tty1     00:00:00 getty
  30.  3889 tty6     00:00:00 getty
  31.  4064 ?        00:00:00 acpid
  32.  4096 ?        00:00:00 kondemand/0
  33.  4171 ?        00:00:04 syslogd
  34.  4226 ?        00:00:00 dd
  35.  4228 ?        00:00:00 klogd
  36.  4249 ?        00:02:36 dbus-daemon
  37.  4265 ?        00:00:01 NetworkManager
  38.  4279 ?        00:00:00 NetworkManagerD
  39.  4292 ?        00:00:00 system-tools-ba
  40.  4293 ?        00:00:00 dbus-daemon
  41.  4312 ?        00:01:12 hald
  42.  4313 ?        00:00:00 hald-runner
  43.  4354 ?        00:00:00 hald-addon-keyb
  44.  4355 ?        00:00:00 hald-addon-keyb
  45.  4356 ?        00:00:00 hald-addon-keyb
  46.  4360 ?        00:00:00 hald-addon-acpi
  47.  4415 ?        00:04:35 hald-addon-stor
  48.  4733 ?        00:00:00 sshd
  49.  6084 ?        00:00:00 dbus-daemon
  50.  7003 ?        00:00:00 gnome-vfs-daemo
  51.  7236 ?        00:00:00 master
  52.  7695 ?        00:00:53 teamspeak-serve
  53.  8300 ?        00:00:00 console-kit-dae
  54.  8412 ?        00:00:01 dhcdbd
  55.  8487 ?        00:00:00 dhclient
  56.  8734 ?        00:00:00 proftpd
  57.  8771 ?        00:00:00 atd
  58.  8787 ?        00:00:02 cron
  59.  9183 ?        00:00:00 dbus-daemon
  60.  9221 ?        00:00:00 gnome-vfs-daemo
  61.  9684 ?        00:00:00 qmgr
  62.  9686 ?        00:00:43 kjournald
  63.  9694 ?        00:00:08 kjournald
  64.  9698 ?        00:00:00 kjournald
  65.  9919 ?        00:00:04 apache2
  66. 18997 ?        00:00:29 pdflush
  67. 21315 ?        00:00:10 pdflush
  68. 30262 ?        00:00:00 apache2
  69. 30267 ?        00:00:02 apache2
  70. 30308 ?        00:00:00 pickup
  71. 30328 ?        00:00:00 apache2
  72. 30357 ?        00:00:00 sshd
  73. 30359 ?        00:00:00 sshd
  74. 30360 pts/1    00:00:00 bash
  75. 30453 pts/1    00:00:00 mysqld_safe
  76. 30490 pts/1    00:00:01 mysqld
  77. 30491 pts/1    00:00:00 logger
  78. 30563 ?        00:00:00 proftpd
  79. 30577 pts/1    00:00:00 ps
  80. me@box:/$
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

I was up and at the computer for todays log rotation.
Everything appears to have went as it should.

Only obvious differences between today and yesterday are a non-root mysql account was logged in via SSH & it had been actively used not long before the rotation.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

hm..thats quite odd. can you attempt to emulate the scenario from yesterday and see if it produces the same results?
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

I'm going to leave MySQLs root account logged in through SSH before I go to bed.

Tomarrow if that doesn't cause it to happen I'll go over the commands used during log rotation & try to emulate it that way.

I've tried not to spend too much time with it since a MySQL restart got me back in business pretty quick & it didn't happen again this morning.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

lol makes sense..
dont wanna break what works to figure out why it doesn't >.< lol
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

Still haven't reproduced it or had it happen again. I've tried to leave things as they were that day every nite, I must have missed some tiny detail.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

yea, thats extremely odd. lol

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 92 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.