On Wed, Aug 8, 2012 at 12:34 PM, JR Richardson jmr.richardson@gmail.com wrote:
On Wed, Aug 8, 2012 at 12:13 PM, JR Richardson jmr.richardson@gmail.com wrote:
Hi All,
I'm running redundant kamailio 3.0.4 servers in production, have been for a long time with great success. They were installed on debian Lenny. One of my servers crashed. I can't seem to do a debian lennyy install because that version is archived now. I'm trying to install on debian squeeze but still using kamailio 3.0.4 for compatibility reasons. The install went pretty normal except during boot up, kamailio starts before mysql and networking so it starts then exists.
Once the server is fully booted, kamailio starts with the init script without error.
I have adjusted the init script to check for networking and mysql to start first and performed an 'update-rc.d kamailio defaults' but still no luck.
Any help will be appreciated.
Thanks.
JR
JR Richardson Engineering for the Masses
Yep, this is an http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot issue. Thanks Alex.
The old init scrip that ships with Kamailio 3.0.4 that I am using is not 100% compatible so I pulled a hack out of the hat and inserted 'sleep 20' before of 'check_fork ()' in the kamailio init script.
Kamailio now waits long enough for all services to start before launching, simple but effective.
After digging in a bit more, reading the directions and such. When you copy over the init script and run 'update-rd.d kamailio defaults', this doesn't actually do anything in Debian Squeeze. The new LSB init scripts use the 'insserv' command to set init priorities. Proper steps are such: Copy over squeeze init script to /etc/ini.d/kamailio Edit /etc/init.d/kamailio Add 'mysql' to 'Required-Start:' line ----snip----- ### BEGIN INIT INFO # Provides: kamailio # Required-Start: $syslog $network $local_fs $time mysql # Required-Stop: $syslog $network $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start the Kamailio SIP proxy server # Description: Start the Kamailio SIP proxy server ### END INIT INFO ----end snip------- Then run 'insserv kamailio' Check /etc/rc2.d/ and you will see kamailio set to start after mysql.
That did it for me, I took out the 'sleep 20' from my previous post.
Hope this helps
JR