I tested it [stop, start, restart] and it worked
First I commented the line below in the kamctlrc scrip to make sure that it was working
because of the change you suggested on the kamctl script and not because my workaround
STARTOPTIONS=" -f /usr/local/kamailio-3.1/etc/kamailio/kamailio.cfg"
Then I found these lines and made it like this:
if [ $SYSLOG = 1 ] ; then
#$OSERBIN -P $PID_FILE $STARTOPTIONS 1>/dev/null 2>/dev/null
$OSERBIN -P $PID_FILE -f $ETCDIR/kamailio.cfg $STARTOPTIONS
1>/dev/null 2>/dev/null
else
#$OSERBIN -P $PID_FILE -E $STARTOPTIONS
$OSERBIN -P $PID_FILE -E -f $ETCDIR/kamailio.cfg $STARTOPTIONS
fi
sleep 3
if [ ! -s $PID_FILE ] ; then
I stoppped, started and restarted kamailio several times and it works now.
Thank you very much
fborot
From: fborot(a)hotmail.com
To: henning.westerholt(a)1und1.de; sr-users(a)lists.sip-router.org
Subject: RE: [SR-Users] kamailio fails to start with kamctl start
Date: Tue, 5 Jul 2011 14:10:09 -0400
thank you Henning, I will replace the lines on the kamctl script and report back the
results
From: henning.westerholt(a)1und1.de
To: sr-users(a)lists.sip-router.org
Subject: Re: [SR-Users] kamailio fails to start with kamctl start
Date: Tue, 5 Jul 2011 18:19:10 +0200
CC: fborot(a)hotmail.com
On Monday 27 June 2011, Fabian Borot wrote:
I fixed the problem but I would like somebody to
shed some light into this
issue.
I noticed that when I run kamailio w/o telling where to load the
kamailio.cfg file is when it failed. So I went to the kamctl script and
notice that in the section where "kamctl start" happens the variable
$STARTOPTIONS was empty. I went to the etc/kamailio/kamctlrc, un-commented
the line with $STARTOPTIONS and made it like this:
STARTOPTIONS=" -f /usr/local/kamailio-3.1/etc/kamailio/kamailio.cfg" ->
this points to the config file which is in a custom path
So, it seems that when one installs kamailio in a directory other than the
default path with the prefix option ['make prefix="new path here" all'
and
'make prefix="new path here" install'] you have to explicitly tell it
somehow to load the config file from somewhere else. Or I did not do it
correctly. Can somebody please confirm?. I thought that the initialization
scripts would also take care of that. I have installed kamailio 1.4.3
1.5.0, 1.5.2 using the prefix option at 'make' time several times and
never had this issue.
Hi Fabian,
I've just tested it in master branch and could reproduce it. It seems the
kamctl command misses a variable inclusion in the start cmd. Not sure why it
worked in 1.5 and earlier, did not tried it.
Can you please try the attached patch for the kamctl in your checkout? If you
don't want to compile and install again, you could also do the changes in the
installed version manually.
Best regards,
Henning