Fedora Linux Support Community & Resources Center
  #1  
Old 29th June 2012, 06:31 PM
Muckleroy Offline
Registered User
 
Join Date: Jun 2012
Location: Houston Area
Posts: 2
windows_7firefox
Changing Service Start Order on Reboot

I've done quite a bit of searching and I cannot find the answer to this. Perhaps I am looking at the problem incorrectly.

I recently installed Fedora Core 16 on my server. I was running Fedora Core 6 on it previously. I installed all the necessary software and got it all configured and running, however the new DoveCot was a really PITA

Thankfully the server doesn't restart very often but a recent UPS issue has been causing shutdowns and restarts. The UPS solution is simple (replace the battery) but there are several services that are not starting on their own.

Dovecot being one of them.

It seems that the services are trying to start before other required services are running. Zoneminder fails to start because mysqld isn't running. Dovecot fails because the network isn't running for example.

In researching this I see that /etc/rcd.5/Snnmysqld used to be the way mysqld was started after a system restart. It's not there now. The old way (if I understand this correctly) I could just change the nn to a higher number and it would start sooner. I could change zoneminder, for example, to a lower number and it would start later. Actually zoneminder is in this directory as S99zoneminder

So I can probably write something that starts these services after the system is up to resolve this issue, but I'd like to fix it right, again if I am understanding the problem correctly.
Reply With Quote
  #2  
Old 29th June 2012, 06:52 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,867
linuxfirefox
Re: Changing Service Start Order on Reboot

One problem you may get hitting is that unless you take special care, the network is not guaranteed to be available when a service starts.

F16 uses systemd, and it starts everything in a thundering herd manner limited only by some restrictions on dependencies. Unfortunately, it gets some of them wrong.

If you are using NetworkManager to start your networks (the default), then systemd only waits for NetworkManager to start... Not for the network to be ready. to do that you have to "sysctl enable NetworkManager-wait-online.service". Usually, this is sufficient.

To wait for mysqld requires there to be a requirement that it be completed before your service starts. Now because mysqld requires a network, the previous fix MAY cover this as well, but I'm not sure.

Forgot: Try putting the service startup in /etc/rc3.d. I believe this waits for the network to be ready (and should fix the mysqld problem too). I believe it tries to wait for the network, though without the "... wait-online.service" it doesn't necessarily wait.

One last thing. I gave up on NetworkManager - it seems to work acceptably for a single network interface or wireless. I've had problems with it for VMs and multiple wired networks and disabled it entirely, then enabled network - which starts things normally, and you can schedule things appropriately in rc3.d.

Last edited by jpollard; 29th June 2012 at 06:57 PM.
Reply With Quote
  #3  
Old 29th June 2012, 06:56 PM
Muckleroy Offline
Registered User
 
Join Date: Jun 2012
Location: Houston Area
Posts: 2
windows_7firefox
Re: Changing Service Start Order on Reboot

Quote:
Originally Posted by jpollard View Post
One problem you may get hitting is that unless you take special care, the network is not guaranteed to be available when a service starts.

F16 uses systemd, and it starts everything in a thundering herd manner limited only by some restrictions on dependencies. Unfortunately, it gets some of them wrong.

If you are using NetworkManager to start your networks (the default), then systemd only waits for NetworkManager to start... Not for the network to be ready. to do that you have to "sysctl enable NetworkManager-wait-online.service". Usually, this is sufficient.

To wait for mysqld requires there to be a requirement that it be completed before your service starts. Now because mysqld requires a network, the previous fix MAY cover this as well, but I'm not sure.

Forgot: Try putting the service startup in /etc/rc3.d. I believe this waits for the network to be ready (and should fix the mysqld problem too). I believe it tries to wait for the network, though without the "... wait-online.service" it doesn't necessarily wait.
Thanks!

NetworkManager-wait-online.service loaded inactive dead Network Manager Wait Online

The plot thickens...
Reply With Quote
  #4  
Old 29th June 2012, 07:41 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,062
linuxfirefox
Re: Changing Service Start Order on Reboot

Quote:
Originally Posted by jpollard View Post
Not for the network to be ready. to do that you have to
"sysctl enable NetworkManager-wait-online.service". Usually, this is sufficient.

If someone has a problem with using that, the command should be spelled systemctl and not sysctl
Reply With Quote
  #5  
Old 29th June 2012, 11:36 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,867
linuxfirefox
Re: Changing Service Start Order on Reboot

Coulda sworn I put the "tem" when I typed...
Reply With Quote
Reply

Tags
changing, order, reboot, service, start

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
[SOLVED] A init.d service script works with `service XX start` but not `systemctl start XX` lovetide Using Fedora 1 13th February 2014 02:28 PM
change service order linuxquest Using Fedora 1 6th November 2010 06:49 PM
dhcpd wont start at reboot but runs fine when service dhcpd restart fireater Servers & Networking 0 8th June 2010 07:44 PM
Service start order kojak Servers & Networking 2 26th February 2007 05:38 PM
changing start order of services during boot ? remi_2 Installation, Upgrades and Live Media 10 8th December 2005 03:02 PM


Current GMT-time: 11:12 (Saturday, 25-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Ceyhan Photos - West Kelowna Travel Photos - Balta Travel Photos