Hello Niko,

After trying your script, I have a segmentation fault by launching:

Here is the script:

#!/bin/sh

# Source function library.
if [ -f /etc/init.d/kannel ] ; then
 . /etc/init.d/kannel
elif [ -f /etc/rc.d/init.d/kannel ] ; then
 . /etc/rc.d/init.d/kannel
else
 exit 1
fi
user="kannel"

umask 0022

case "$1" in
'start')
       echo 'Starting Kannel daemons...'
       su $user -c "/usr/sbin/bearerbox -P -v 4 -d /etc/kannel/kannel.conf"
       sleep 2
       su $user -c "/usr/sbin/smsbox -P -v 4 -d /etc/kannel/kannel.conf"
       echo "/tmp/cores/core.%e" > /proc/sys/kernel/core_pattern
       touch /var/lock/subsys/Kannel
       ;;
'stop')
       echo 'Stopping Kannel daemons...'
       killproc bearerbox
       rm -f /var/lock/subsys/Kannel
       ;;
'restart')
       echo 'Restarting Kannel daemons...'
       $0 stop
       $0 start
       ;;
'status')
       pgrep -fl box
       ;;
*)
       echo "Usage: $0 { start | stop | restart | status }"
       ;;
esac
exit 0

----- Original Message ----- From: "Nikos Balkanas" <nbalka...@gmail.com>
To: "CHRONIS, N." <ni...@chronis.be>
Cc: <users@kannel.org>
Sent: Tuesday, January 26, 2010 6:28 AM
Subject: Re: Problem launching with /etc/init.d/kannel


Small correction to script:

'status')
       pgrep -fl kannel | grep local
       ;;

'status')
       pgrep -fl box | grep local
      ;;

Nikos
----- Original Message ----- From: "Nikos Balkanas" <nbalka...@gmail.com>
To: "CHRONIS, N." <ni...@chronis.be>
Cc: <users@kannel.org>
Sent: Tuesday, January 26, 2010 6:12 AM
Subject: Re: Problem launching with /etc/init.d/kannel


No. If in doubt check from terminal:

gw/bearerbox -d <conffile>

You get no output, though.

I can see 2 problems:

1) You are using a very old outdated kannel version. Please upgrade to latest CVS. 2) Do NOT use start-stop-daemon. Use an init script. The folowing will setup a corefile environment for the Linux kernel. Make sure you create a 777 /tmp/cores directory for the cores.

BR,
Nikos

#!/bin/sh

# Source function library.
if [ -f /etc/init.d/functions ] ; then
 . /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
 . /etc/rc.d/init.d/functions
else
 exit 1
fi
user="kannel"

umask 0022

case "$1" in
'start')
       echo 'Starting Kannel daemons...'
       su $user -c "/usr/local/sbin/bearerbox -P -v 4 -d /etc/hlr.conf"
       sleep 2
       su $user -c "/usr/local/sbin/smsbox -P -v 4 -d /etc/hlr.conf"
       echo "/tmp/cores/core.%e" > /proc/sys/kernel/core_pattern
       touch /var/lock/subsys/Kannel
       ;;
'stop')
       echo 'Stopping Kannel daemons...'
       killproc bearerbox
       rm -f /var/lock/subsys/Kannel
       ;;
'restart')
       echo 'Restarting Kannel daemons...'
       $0 stop
       $0 start
       ;;
'status')
       pgrep -fl kannel | grep local
       ;;
*)
       echo "Usage: $0 { start | stop | restart | status }"
       ;;
esac
exit 0


----- Original Message ----- From: "CHRONIS, N." <ni...@chronis.be>
To: "Nikos Balkanas" <nbalka...@gmail.com>
Cc: <users@kannel.org>
Sent: Tuesday, January 26, 2010 4:12 AM
Subject: Re: Problem launching with /etc/init.d/kannel


Hi Niko,

I just achieve a test:
And when i launch the processes from console

root 27442 0.0 0.0 272488 4348 pts/2 Sl 03:09 0:00 /usr/sbin/bearerbox /etc/kannel/kannel.conf root 27563 0.0 0.0 116340 3596 pts/2 Sl 03:09 0:00 /usr/sbin/smsbox /etc/kannel/kannel.conf

This is working, I can send SMS, and everything is working properly.
I think there is a problem with the launch as daemon ?

Any Idea?
Nikos

----- Original Message ----- From: "Nikos Balkanas" <nbalka...@gmail.com> To: "CHRONIS, N." <ni...@chronis.be>; "Jovan Kostovski" <chomb...@gmail.com>
Cc: <users@kannel.org>
Sent: Monday, January 25, 2010 11:15 PM
Subject: Re: Problem launching with /etc/init.d/kannel


Hi Niko,

From a console type:

gw/bearerbox <conffile>

And post output. If not output is created check /var/log/messages for any segfaults. If that fails try:

ldd gw/bearerbox

to see if you are linking to a wrong (32bit) library.

BR,
Nikos
----- Original Message ----- From: "CHRONIS, N." <ni...@chronis.be>
To: "Jovan Kostovski" <chomb...@gmail.com>
Cc: <users@kannel.org>
Sent: Monday, January 25, 2010 11:27 PM
Subject: Re: Problem launching with /etc/init.d/kannel


Hello Jovan,

The startup script is the same also.
Nothing has been changed. Strange error.

Kannel is started by start-stop-daemon. No error, processes launched, but log file not recording with the old kannel.conf
I really don't know how to fix this. I tryed so much things...

If anyone can help me, it would be really nice.

Best regards,
Nikos

----- Original Message ----- From: "Jovan Kostovski" <chomb...@gmail.com>
To: "CHRONIS, N." <ni...@chronis.be>
Sent: Monday, January 25, 2010 10:08 PM
Subject: Re: Problem launching with /etc/init.d/kannel


On Mon, Jan 25, 2010 at 5:14 PM, CHRONIS, N. <ni...@chronis.be> wrote:
Hello everybody,

I migrated my server to a 64 bits server.
Server is Debian stable.
Kannel is 1.4.1

After an apt-get install kannel, the services is launched properly, but after I enter my "old" (working) config, nothing happend, and no log files
appear, eithe no error.

check the startup script.

If the only thing that was changed was the system and the startup script
check to see how kannel is started

But if I launch it manually (without the start-stop-daemon) i can see log
file in console.

check the user with which the script is run, and see if it has write permissions
in the folder where the logs should be created.

BR, Jovan

__________ Information provenant d'ESET NOD32 Antivirus, version de la base des signatures de virus 4026 (20090421) __________

Le message a οΏ½tοΏ½ vοΏ½rifiοΏ½ par ESET NOD32 Antivirus.

http://www.eset.com







__________ Information provenant d'ESET NOD32 Antivirus, version de la base des signatures de virus 4026 (20090421) __________

Le message a ιtι vιrifiι par ESET NOD32 Antivirus.

http://www.eset.com







__________ Information provenant d'ESET NOD32 Antivirus, version de la base des signatures de virus 4026 (20090421) __________

Le message a ιtι vιrifiι par ESET NOD32 Antivirus.

http://www.eset.com





Reply via email to