mysql not starting on boot

2010-01-06 Thread Rob
Since I upgraded to FreBSD 8.0, I'm noticing that mysql isn't starting 
on boot anymore.  It starts fine once the system has booted, and looking 
at the mysql log I see:


100105 17:46:56 mysqld_safe Starting mysqld daemon with databases from 
/var/db/m

ysql
100105 17:46:56 [ERROR] Can't start server: cannot resolve hostname!: 
Unknown er

ror: 0
100105 17:46:56 [ERROR] Aborting

I use dhcp and ddns in my network, so I'm guessing that mysql is 
attempting to start before the networking has stabilized.  Is there a 
way to make mysql be the last thing started at boot?


I tried adding:

# REQUIRE: NETWORKING

To the init script, but that didn't seem to have any effect.  Is there a 
tool that will run through all the init scripts and tell you the order 
of startup?


Rob
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql not starting on boot

2010-01-06 Thread Matthew Seaman

Rob wrote:
Since I upgraded to FreBSD 8.0, I'm noticing that mysql isn't starting 
on boot anymore.  It starts fine once the system has booted, and looking 
at the mysql log I see:


100105 17:46:56 mysqld_safe Starting mysqld daemon with databases from 
/var/db/m

ysql
100105 17:46:56 [ERROR] Can't start server: cannot resolve hostname!: 
Unknown er

ror: 0
100105 17:46:56 [ERROR] Aborting

I use dhcp and ddns in my network, so I'm guessing that mysql is 
attempting to start before the networking has stabilized.  Is there a 
way to make mysql be the last thing started at boot?


MySQL will be happy if it can work out what the hostname of the machine
is.  You say you're using ddns?  If that means your machines are pushing
a hostname up to the DHCP server while they ask it for an IP number, then
there should be no problem.

You can simply set the hostname in /etc/rc.conf -- it doesn't really
matter if the machine thinks its name is one thing, and the IPs on its
network interfaces resolve to something else (at least, not for the
purposes of running mysql.).  The thing you'ld have to look out for are
the host part of  usernames in grants of permissions to users.  


I tried adding:

# REQUIRE: NETWORKING

To the init script, but that didn't seem to have any effect.  Is there a 
tool that will run through all the init scripts and tell you the order 
of startup?


rcorder(8)

You might also find it beneficial to use 'SYNCDHCP' instead of plain 'DHCP'
in ifconfig_XXY lines in /etc/rc.conf -- this will cause the boot process to
block on getting an IP for the interface, rather than the default action of
backgrounding that process and trying to start everything else up.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: mysql not starting on boot

2010-01-06 Thread P.
Qua, 2010-01-06 às 16:16 +, Matthew Seaman escreveu:
 Rob wrote:
  Since I upgraded to FreBSD 8.0, I'm noticing that mysql isn't starting 
  on boot anymore.  It starts fine once the system has booted, and looking 
  at the mysql log I see:
  
  100105 17:46:56 mysqld_safe Starting mysqld daemon with databases from 
  /var/db/m
  ysql
  100105 17:46:56 [ERROR] Can't start server: cannot resolve hostname!: 
  Unknown er
  ror: 0
  100105 17:46:56 [ERROR] Aborting
  
  I use dhcp and ddns in my network, so I'm guessing that mysql is 
  attempting to start before the networking has stabilized.  Is there a 
  way to make mysql be the last thing started at boot?
 
 MySQL will be happy if it can work out what the hostname of the machine
 is.  You say you're using ddns?  If that means your machines are pushing
 a hostname up to the DHCP server while they ask it for an IP number, then
 there should be no problem.
 
 You can simply set the hostname in /etc/rc.conf -- it doesn't really
 matter if the machine thinks its name is one thing, and the IPs on its
 network interfaces resolve to something else (at least, not for the
 purposes of running mysql.).  The thing you'ld have to look out for are
 the host part of  usernames in grants of permissions to users.  

I have exactly the same problem, but with apache. It seems that the
apache try to start before the network.

  I tried adding:
  
  # REQUIRE: NETWORKING
  
  To the init script, but that didn't seem to have any effect.  Is there a 
  tool that will run through all the init scripts and tell you the order 
  of startup?
 
 rcorder(8)
 
 You might also find it beneficial to use 'SYNCDHCP' instead of plain 'DHCP'
 in ifconfig_XXY lines in /etc/rc.conf -- this will cause the boot process to
 block on getting an IP for the interface, rather than the default action of
 backgrounding that process and trying to start everything else up.

This will be useful for me too. Thank you.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql not starting on boot

2010-01-06 Thread Samuel Martín Moro
About apache, maybe it's the ServerName option that's missing.

On Wednesday, January 6, 2010, Dário P. fbsd.questions.l...@gmail.com wrote:
 Qua, 2010-01-06 às 16:16 +, Matthew Seaman escreveu:
 Rob wrote:
  Since I upgraded to FreBSD 8.0, I'm noticing that mysql isn't starting
  on boot anymore.  It starts fine once the system has booted, and looking
  at the mysql log I see:
 
  100105 17:46:56 mysqld_safe Starting mysqld daemon with databases from
  /var/db/m
  ysql
  100105 17:46:56 [ERROR] Can't start server: cannot resolve hostname!:
  Unknown er
  ror: 0
  100105 17:46:56 [ERROR] Aborting
 
  I use dhcp and ddns in my network, so I'm guessing that mysql is
  attempting to start before the networking has stabilized.  Is there a
  way to make mysql be the last thing started at boot?

 MySQL will be happy if it can work out what the hostname of the machine
 is.  You say you're using ddns?  If that means your machines are pushing
 a hostname up to the DHCP server while they ask it for an IP number, then
 there should be no problem.

 You can simply set the hostname in /etc/rc.conf -- it doesn't really
 matter if the machine thinks its name is one thing, and the IPs on its
 network interfaces resolve to something else (at least, not for the
 purposes of running mysql.).  The thing you'ld have to look out for are
 the host part of  usernames in grants of permissions to users.

 I have exactly the same problem, but with apache. It seems that the
 apache try to start before the network.

  I tried adding:
 
  # REQUIRE: NETWORKING
 
  To the init script, but that didn't seem to have any effect.  Is there a
  tool that will run through all the init scripts and tell you the order
  of startup?

 rcorder(8)

 You might also find it beneficial to use 'SYNCDHCP' instead of plain 'DHCP'
 in ifconfig_XXY lines in /etc/rc.conf -- this will cause the boot process to
 block on getting an IP for the interface, rather than the default action of
 backgrounding that process and trying to start everything else up.

 This will be useful for me too. Thank you.


 ___
 freebsd-questi...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


-- 
Samuel Martín Moro
CamTrace
{EPITECH.} tek4

Nobody wants to say how this works.
  Maybe nobody knows ...
  Xorg.conf(5)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql not starting on boot

2010-01-06 Thread P.
Qua, 2010-01-06 às 18:03 +0100, Samuel Martín Moro escreveu:
 About apache, maybe it's the ServerName option that's missing.

I don't think so, because I have it on httpd.conf.

#
# ServerName gives the name and port that the server uses to identify
itself.
# This can often be determined automatically, but we recommend you
specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address
here.
#
ServerName www.ptbox.org:80


Can it be something wrong with VirtualHost's ?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql not starting on boot

2010-01-06 Thread Matt
On Wed, Jan 6, 2010 at 11:20 AM, Dário P. fbsd.questions.l...@gmail.com wrote:
 Qua, 2010-01-06 às 18:03 +0100, Samuel Martín Moro escreveu:
 About apache, maybe it's the ServerName option that's missing.

 I don't think so, because I have it on httpd.conf.

 #
 # ServerName gives the name and port that the server uses to identify
 itself.
 # This can often be determined automatically, but we recommend you
 specify
 # it explicitly to prevent problems during startup.
 #
 # If your host doesn't have a registered DNS name, enter its IP address
 here.
 #
 ServerName www.ptbox.org:80


 Can it be something wrong with VirtualHost's ?

The only name-resolution errors I've seen with Apache startup that
resemble this situation have been related to the use of the
mod_unique_id.so module.  That one will fail if name resolution isn't
available at startup time.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql not starting on boot

2010-01-06 Thread Rob

To the mysql init script, I added:

# REQUIRE: dhclient

And to the dhclient init script I added:

# REQUIRE: NETWORKING

In addition to changing DHCP to SYNCDHCP in rc.conf, mysql now starts up 
on boot.  I would think the dhclient change should be required in the 
default setup since NETWORKING should be up before attempting to grab a 
dhcp IP, or am I misunderstanding here?


Either way, the above seems to have solved my problem.  Thanks!

Rob

Matthew Seaman wrote:

Rob wrote:
Since I upgraded to FreBSD 8.0, I'm noticing that mysql isn't starting 
on boot anymore.  It starts fine once the system has booted, and 
looking at the mysql log I see:


100105 17:46:56 mysqld_safe Starting mysqld daemon with databases from 
/var/db/m

ysql
100105 17:46:56 [ERROR] Can't start server: cannot resolve hostname!: 
Unknown er

ror: 0
100105 17:46:56 [ERROR] Aborting

I use dhcp and ddns in my network, so I'm guessing that mysql is 
attempting to start before the networking has stabilized.  Is there a 
way to make mysql be the last thing started at boot?


MySQL will be happy if it can work out what the hostname of the machine
is.  You say you're using ddns?  If that means your machines are pushing
a hostname up to the DHCP server while they ask it for an IP number, then
there should be no problem.

You can simply set the hostname in /etc/rc.conf -- it doesn't really
matter if the machine thinks its name is one thing, and the IPs on its
network interfaces resolve to something else (at least, not for the
purposes of running mysql.).  The thing you'ld have to look out for are
the host part of  usernames in grants of permissions to users. 

I tried adding:

# REQUIRE: NETWORKING

To the init script, but that didn't seem to have any effect.  Is there 
a tool that will run through all the init scripts and tell you the 
order of startup?


rcorder(8)

You might also find it beneficial to use 'SYNCDHCP' instead of plain 'DHCP'
in ifconfig_XXY lines in /etc/rc.conf -- this will cause the boot 
process to

block on getting an IP for the interface, rather than the default action of
backgrounding that process and trying to start everything else up.

Cheers,

Matthew


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org