Results 1 to 6 of 6

Thread: start mysql before jabber

  1. #1
    Join Date
    Apr 2005
    Location
    St. Paul, MN
    Beans
    63
    Distro
    Ubuntu Development Release

    start mysql before jabber

    Currently when the system boots, It boots jabberd2 before mysql. So jabber fails. Then, later mysql is loaded. I either want to force jabber to load mysql first, or make the system boot mysql first. I've tried changing /etc/init.d/jabberd2 to say "# Required-Start: mysql $network $named $remote_fs"... however, insserv says that mysql service has to be enabled... so I assume that's an issue because mysql is an upstart script. Any ideas?

  2. #2

    Re: start mysql before jabber

    Manually, does it work ? If you start first mysql then jabber ?

    If yes, you can simply add a delay to the jabber script.
    You can add: sleep xx &
    xx for xx seconds
    Freedif.org, news & tutorials on self-hosting services.
    Idipops, the social network for the services

  3. #3
    Join Date
    May 2006
    Location
    Iowa
    Beans
    Hidden!

    Re: start mysql before jabber

    Actually it would be better to adjust the init scripts sequence value. If you check update-rc.d documentation you will find that you can provide an "NN" value. This value specifies the order in which the service is started when init loads the run level. Adjust those so mysql is lower then jabber for starting and higher for stopping so that mysql isn't stopped out from under jabber and it can shutdown clean.
    Xipher

  4. #4
    Join Date
    Jan 2005
    Location
    South Africa
    Beans
    2,098
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: start mysql before jabber

    Quote Originally Posted by dudumomo View Post
    Manually, does it work ? If you start first mysql then jabber ?

    If yes, you can simply add a delay to the jabber script.
    You can add: sleep xx &
    xx for xx seconds
    That's bad practice (in general); today it might need one sec delay, tomorrow 20 sec delay.
    It would be better to let the script check if mysql is running.

    I'm not familiar with Ubuntu server setups (I use Slackware servers), but I think that Xipher has the correct solution in the post above.
    If you don't make backups of your important data, your data is obviously not important to you.

  5. #5

    Re: start mysql before jabber

    Indeed, seems far better !
    Freedif.org, news & tutorials on self-hosting services.
    Idipops, the social network for the services

  6. #6
    Join Date
    Apr 2005
    Location
    St. Paul, MN
    Beans
    63
    Distro
    Ubuntu Development Release

    Re: start mysql before jabber

    Quote Originally Posted by Xipher View Post
    Actually it would be better to adjust the init scripts sequence value. If you check update-rc.d documentation you will find that you can provide an "NN" value. This value specifies the order in which the service is started when init loads the run level. Adjust those so mysql is lower then jabber for starting and higher for stopping so that mysql isn't stopped out from under jabber and it can shutdown clean.
    So, I believe that this worked on jaunty, when mysql wasn't converted to upstart. However, now there is no mysql process listed in any of the /etc/rcRUNLEVEL.d/ directories. I have tried creating my own symlink for /etc/rc2.d/S10mysql to the mysql init script, since that would make it start before /etc/rc2.d/S20jabberd2, however this still didn't work. My assumption is that since upstart is supposed to init processes asynchronously, that making the symlink to it, in fact just starts running upstart. Especially since when I read the /etc/init.d/mysql init file, it seems to just makes upstart calls.
    Last edited by outdooricon; May 4th, 2010 at 02:47 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •