[Asterisk-Users] Asterisk MySQL CDR - MySQL starting too late

Dennis Gilmore dennis at ausil.us
Sun Nov 20 22:04:32 MST 2005


Once upon a time Sunday 20 November 2005 10:38 pm, JP Carballo wrote:
> JP Carballo wrote:
> > Eric Bishop wrote:
> >> I have:
> >>
> >> [root at pbx ~]# chkconfig --list | grep mysql
> >> mysqld          0:off   1:off   2:off   3:on    4:off   5:off   6:off
> >> [root at pbx ~]# chkconfig --list | grep asterisk
> >> asterisk        0:off   1:off   2:on    3:on    4:on    5:on    6:off
> >>
> >> What would you suggest I do?
> >
> > <snip>
> > <rant>
> > Holy crap, this kind of replying is getting me dizzy! Up, down, what
> > next? Left and right?
> > Why can't we just agree to delete all previous text, anyway we all
> > have threaded readers...don't we?
> > </rant>
> >
> > chkconfig --level 3 mysqld off
> > chkconfig --level 2 mysqld on
> > chkconfig --level 2 asterisk off
>
> I forgot to add that you should get this:
>
> (root at vostok:asterisk)# chkconfig --list | grep "asterisk\|mysqld"
> mysqld             0:off    1:off    2:on    3:off    4:off    5:off
> 6:off
> asterisk           0:off    1:off    2:off    3:on    4:off    5:off
> 6:off

ok a little back round on runlevels.  

Linux allows for up to 10 runlevels, 0-9, but usually only some of these are 
defined by default. Runlevel 0 is defined as ``system halt''. Runlevel 1 is 
defined as ``single user mode''. Runlevel 6 is defined as ``system reboot''. 
Other runlevels are dependent on how your particular distribution has defined 
them, and they vary significantly between distributions. Looking at the 
contents of /etc/inittab usually will give some hint what the predefined 
runlevels are and what they have been defined as.

ok so  when you turn mysqld off on run level 3 and thats what you system runs 
as mysqld  will never start. the services selected for that run level are ran 
when you enter that run level.

the order that they are run at is defined by a priority system.  so you need 
to make sure the priority of asterisk is such that is it started after 
mysqld.

on my system  mysqld  has a priority of 64 and asterisk is 99   look 
in /etc/rc3.d   the files starting with a S are for startup and K for 
shutdown.  they start with lowest number  up through highest number.  that 
last thing ran is /etc/rc.local  so you could always put in 
there /etc/init.d/asterisk restart  to make sure its the last thing done.


-- 
Dennis Gilmore,  RHCE  
<dennis AT ausil DOT us> http://www.ausil.us
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20051121/68f2ba01/attachment.pgp


More information about the asterisk-users mailing list