Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th July 2012, 10:13
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 150 Times in 130 Posts
Default Squeeze at boot: mydns ... failed!

Not sure what caused this (maybe the update to Squeeze), buthen I re-boot the Debian Squeeze server I get the following error(s)

Code:
Starting DNS server: mydnsmydns[1395]: Error connecting to MySQL server at localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (errno=2)
Starting MySQL database server: mysqld . ..
..
..
..
startpar: service(s) returned failure: mydns ... failed!
I need to login after this and start the mydns by hand.
Code:
/etc/init.d/mydns start
Anyone here who might know what could cause this?
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
Sponsored Links
  #2  
Old 10th July 2012, 12:38
rosehosting rosehosting is offline
Member
 
Join Date: Jun 2012
Posts: 39
Thanks: 0
Thanked 7 Times in 6 Posts
Default

Quote:
Originally Posted by edge View Post
Not sure what caused this (maybe the update to Squeeze), buthen I re-boot the Debian Squeeze server I get the following error(s)

Code:
Starting DNS server: mydnsmydns[1395]: Error connecting to MySQL server at localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (errno=2)
Starting MySQL database server: mysqld . ..
..
..
..
startpar: service(s) returned failure: mydns ... failed!
I need to login after this and start the mydns by hand.
Code:
/etc/init.d/mydns start
Anyone here who might know what could cause this?

Looks like 'mydns' is started before your 'mysql' server and it depends on mysql so that's why it's failing to start on boot. anyhow, can you post the output of:

Code:
# ls -la /etc/rc3.d/ | grep S
thanks,
Reply With Quote
  #3  
Old 10th July 2012, 12:51
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 150 Times in 130 Posts
Default

Hi,

Re: Looks like 'mydns' is started before your 'mysql' server ..
Yes. Thats what it looks like..

Anyway. Here is the requested output.

Code:
host:~# ls -la /etc/rc3.d/ | grep S
lrwxrwxrwx   1 root root    18 May 21 16:40 S01bootlogs -> ../init.d/bootlogs
lrwxrwxrwx   1 root root    31 May 21 16:40 S01xe-linux-distribution -> ../init.d/xe-linux-distribution
lrwxrwxrwx   1 root root    17 May 21 16:40 S14portmap -> ../init.d/portmap
lrwxrwxrwx   1 root root    20 May 21 16:40 S15nfs-common -> ../init.d/nfs-common
lrwxrwxrwx   1 root root    13 May 21 16:40 S17fam -> ../init.d/fam
lrwxrwxrwx   1 root root    19 May 21 16:40 S17mailgraph -> ../init.d/mailgraph
lrwxrwxrwx   1 root root    17 May 21 16:40 S17rsyslog -> ../init.d/rsyslog
lrwxrwxrwx   1 root root    19 May 21 16:40 S17saslauthd -> ../init.d/saslauthd
lrwxrwxrwx   1 root root    14 May 26 14:18 S17sudo -> ../init.d/sudo
lrwxrwxrwx   1 root root    17 May 21 16:40 S18apache2 -> ../init.d/apache2
lrwxrwxrwx   1 root root    16 Sep 16  2010 S19amavis -> ../init.d/amavis
lrwxrwxrwx   1 root root    13 May 21 16:40 S19atd -> ../init.d/atd
lrwxrwxrwx   1 root root    23 May 21 16:40 S19clamav-daemon -> ../init.d/clamav-daemon
lrwxrwxrwx   1 root root    28 May 21 16:40 S19courier-authdaemon -> ../init.d/courier-authdaemon
lrwxrwxrwx   1 root root    22 May 21 16:40 S19courier-imap -> ../init.d/courier-imap
lrwxrwxrwx   1 root root    26 May 21 16:40 S19courier-imap-ssl -> ../init.d/courier-imap-ssl
lrwxrwxrwx   1 root root    21 May 21 16:40 S19courier-pop -> ../init.d/courier-pop
lrwxrwxrwx   1 root root    25 May 21 16:40 S19courier-pop-ssl -> ../init.d/courier-pop-ssl
lrwxrwxrwx   1 root root    14 May 21 16:40 S19cron -> ../init.d/cron
lrwxrwxrwx   1 root root    14 May 21 16:40 S19dbus -> ../init.d/dbus
lrwxrwxrwx   1 root root    18 May 21 16:40 S19fail2ban -> ../init.d/fail2ban
lrwxrwxrwx   1 root root    15 May 21 16:40 S19mydns -> ../init.d/mydns
lrwxrwxrwx   1 root root    15 Sep 16  2010 S19mysql -> ../init.d/mysql
lrwxrwxrwx   1 root root    23 May 21 16:40 S19mysql-ndb-mgm -> ../init.d/mysql-ndb-mgm
lrwxrwxrwx   1 root root    13 May 21 16:40 S19ntp -> ../init.d/ntp
lrwxrwxrwx   1 root root    23 May 21 16:40 S19openbsd-inetd -> ../init.d/openbsd-inetd
lrwxrwxrwx   1 root root    18 Oct  1  2010 S19postgrey -> ../init.d/postgrey
lrwxrwxrwx   1 root root    18 May 21 16:40 S19quotarpc -> ../init.d/quotarpc
lrwxrwxrwx   1 root root    22 Sep 16  2010 S19spamassassin -> ../init.d/spamassassin
lrwxrwxrwx   1 root root    13 May 21 16:40 S19ssh -> ../init.d/ssh
lrwxrwxrwx   1 root root    16 May 21 16:40 S19webmin -> ../init.d/webmin
lrwxrwxrwx   1 root root    26 Sep 16  2010 S20clamav-freshclam -> ../init.d/clamav-freshclam
lrwxrwxrwx   1 root root    15 Sep 16  2010 S20exim4 -> ../init.d/exim4
lrwxrwxrwx   1 root root    19 May 21 16:40 S20mysql-ndb -> ../init.d/mysql-ndb
lrwxrwxrwx   1 root root    17 Sep 16  2010 S20postfix -> ../init.d/postfix
lrwxrwxrwx   1 root root    25 Sep 16  2010 S20pure-ftpd-mysql -> ../init.d/pure-ftpd-mysql
lrwxrwxrwx   1 root root    20 May 21 16:40 S21munin-node -> ../init.d/munin-node
lrwxrwxrwx   1 root root    18 May 21 16:40 S21rc.local -> ../init.d/rc.local
lrwxrwxrwx   1 root root    19 May 21 16:40 S21rmnologin -> ../init.d/rmnologin
lrwxrwxrwx   1 root root    23 May 21 16:40 S21stop-bootlogd -> ../init.d/stop-bootlogd
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
  #4  
Old 10th July 2012, 12:54
rosehosting rosehosting is offline
Member
 
Join Date: Jun 2012
Posts: 39
Thanks: 0
Thanked 7 Times in 6 Posts
Default

Quote:
.....
lrwxrwxrwx 1 root root 15 May 21 16:40 S19mydns -> ../init.d/mydns
lrwxrwxrwx 1 root root 15 Sep 16 2010 S19mysql -> ../init.d/mysql
.....
yes, there's the problem. a quick fix is to rename the S19mydns symlink to something like S99mydns for example.
Reply With Quote
  #5  
Old 10th July 2012, 13:38
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 150 Times in 130 Posts
Default

Done as you suggested, but still same problem.

Code:
Starting DNS server: mydnsmydns[1438]: Error connecting to MySQL server at localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (errno=2)
..
..
..
startpar: service(s) returned failure: mydns ... failed!

Code:
host:~# ls -la /etc/rc3.d/ | grep S
lrwxrwxrwx   1 root root    18 May 21 16:40 S01bootlogs -> ../init.d/bootlogs
lrwxrwxrwx   1 root root    31 May 21 16:40 S01xe-linux-distribution -> ../init.d/xe-linux-distribution
lrwxrwxrwx   1 root root    17 May 21 16:40 S14portmap -> ../init.d/portmap
lrwxrwxrwx   1 root root    20 May 21 16:40 S15nfs-common -> ../init.d/nfs-common
lrwxrwxrwx   1 root root    13 May 21 16:40 S17fam -> ../init.d/fam
lrwxrwxrwx   1 root root    19 May 21 16:40 S17mailgraph -> ../init.d/mailgraph
lrwxrwxrwx   1 root root    17 May 21 16:40 S17rsyslog -> ../init.d/rsyslog
lrwxrwxrwx   1 root root    19 May 21 16:40 S17saslauthd -> ../init.d/saslauthd
lrwxrwxrwx   1 root root    14 May 26 14:18 S17sudo -> ../init.d/sudo
lrwxrwxrwx   1 root root    17 May 21 16:40 S18apache2 -> ../init.d/apache2
lrwxrwxrwx   1 root root    16 Sep 16  2010 S19amavis -> ../init.d/amavis
lrwxrwxrwx   1 root root    13 May 21 16:40 S19atd -> ../init.d/atd
lrwxrwxrwx   1 root root    23 May 21 16:40 S19clamav-daemon -> ../init.d/clamav-daemon
lrwxrwxrwx   1 root root    28 May 21 16:40 S19courier-authdaemon -> ../init.d/courier-authdaemon
lrwxrwxrwx   1 root root    22 May 21 16:40 S19courier-imap -> ../init.d/courier-imap
lrwxrwxrwx   1 root root    26 May 21 16:40 S19courier-imap-ssl -> ../init.d/courier-imap-ssl
lrwxrwxrwx   1 root root    21 May 21 16:40 S19courier-pop -> ../init.d/courier-pop
lrwxrwxrwx   1 root root    25 May 21 16:40 S19courier-pop-ssl -> ../init.d/courier-pop-ssl
lrwxrwxrwx   1 root root    14 May 21 16:40 S19cron -> ../init.d/cron
lrwxrwxrwx   1 root root    14 May 21 16:40 S19dbus -> ../init.d/dbus
lrwxrwxrwx   1 root root    18 May 21 16:40 S19fail2ban -> ../init.d/fail2ban
lrwxrwxrwx   1 root root    15 Sep 16  2010 S19mysql -> ../init.d/mysql
lrwxrwxrwx   1 root root    23 May 21 16:40 S19mysql-ndb-mgm -> ../init.d/mysql-ndb-mgm
lrwxrwxrwx   1 root root    13 May 21 16:40 S19ntp -> ../init.d/ntp
lrwxrwxrwx   1 root root    23 May 21 16:40 S19openbsd-inetd -> ../init.d/openbsd-inetd
lrwxrwxrwx   1 root root    18 Oct  1  2010 S19postgrey -> ../init.d/postgrey
lrwxrwxrwx   1 root root    18 May 21 16:40 S19quotarpc -> ../init.d/quotarpc
lrwxrwxrwx   1 root root    22 Sep 16  2010 S19spamassassin -> ../init.d/spamassassin
lrwxrwxrwx   1 root root    13 May 21 16:40 S19ssh -> ../init.d/ssh
lrwxrwxrwx   1 root root    16 May 21 16:40 S19webmin -> ../init.d/webmin
lrwxrwxrwx   1 root root    26 Sep 16  2010 S20clamav-freshclam -> ../init.d/clamav-freshclam
lrwxrwxrwx   1 root root    15 Sep 16  2010 S20exim4 -> ../init.d/exim4
lrwxrwxrwx   1 root root    19 May 21 16:40 S20mysql-ndb -> ../init.d/mysql-ndb
lrwxrwxrwx   1 root root    17 Sep 16  2010 S20postfix -> ../init.d/postfix
lrwxrwxrwx   1 root root    25 Sep 16  2010 S20pure-ftpd-mysql -> ../init.d/pure-ftpd-mysql
lrwxrwxrwx   1 root root    20 May 21 16:40 S21munin-node -> ../init.d/munin-node
lrwxrwxrwx   1 root root    18 May 21 16:40 S21rc.local -> ../init.d/rc.local
lrwxrwxrwx   1 root root    19 May 21 16:40 S21rmnologin -> ../init.d/rmnologin
lrwxrwxrwx   1 root root    23 May 21 16:40 S21stop-bootlogd -> ../init.d/stop-bootlogd
lrwxrwxrwx   1 root root    17 Jul 10 13:18 S99mydns -> /etc/init.d/mydns
host:~#
__________________
Never execute code written on a Friday or a Monday.

Last edited by edge; 10th July 2012 at 13:40.
Reply With Quote
  #6  
Old 10th July 2012, 14:09
TiTex TiTex is offline
Senior Member
 
Join Date: Aug 2011
Location: Cluj-Napoca,Romania
Posts: 125
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via Skype™ to TiTex
Default

when mysql server is started is there an unix socket mysqld.sock in the location specified by the error /var/run/mysqld/mysqld.sock ?
Reply With Quote
  #7  
Old 10th July 2012, 15:04
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 150 Times in 130 Posts
Default

At the moment I do not know (and can not reboot the server again...)
I will reboot again tonight, and report back.

Thank you for your help.
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
  #8  
Old 10th July 2012, 15:55
TiTex TiTex is offline
Senior Member
 
Join Date: Aug 2011
Location: Cluj-Napoca,Romania
Posts: 125
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via Skype™ to TiTex
Default

you don't need to reboot the server to see if there is or not mysqld.sock
Reply With Quote
  #9  
Old 10th July 2012, 16:34
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 150 Times in 130 Posts
Default

My misstake

Code:
host:/var/run/mysqld# ls -l
total 4
-rw-rw---- 1 mysql mysql 5 Jul 10 13:23 mysqld.pid
srwxrwxrwx 1 mysql mysql 0 Jul 10 13:23 mysqld.sock
And
Code:
host:/var/run/mysqld# ls
mysqld.pid  mysqld.sock
host:/var/run/mysqld#
So yes... mysqld.sock does exists
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
  #10  
Old 10th July 2012, 17:07
TiTex TiTex is offline
Senior Member
 
Join Date: Aug 2011
Location: Cluj-Napoca,Romania
Posts: 125
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via Skype™ to TiTex
 
Default

that's strange ... mysqld seems that is starting fine
try also runing mysql_upgrade script and see if that's working , it should fix the tables after upgrading
Reply With Quote
The Following User Says Thank You to TiTex For This Useful Post:
edge (10th July 2012)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
error.log is full of notices mod_fcgid 007007 Installation/Configuration 13 8th September 2012 11:29
Need help with ISPConfig Mail and Squirrelmail m.xander Installation/Configuration 109 3rd February 2012 00:15
Failed during pvmove, howto: set up software raid 1 on running LVM system sbh77 HOWTO-Related Questions 2 8th October 2010 00:11
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 17:17
How to install BFD (Brute Force Detection) domino Tips/Tricks/Mods 9 31st March 2006 22:40


All times are GMT +2. The time now is 16:20.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.