Hello Friend, You have three options.
1. Try my below provided init script which works on Centos 6.6. 2. You can remove init script and can use supervisor. Check supervisor for their configuration. 3. You can give your machine ssh access to me and i will resolve it for you. :-) (It will be free don't worry) --------------------------------Remove this line #!/bin/sh # # gateway This shell script takes care of starting and stopping # the Kannel WAP gateway (bearer/wapbox) # # chkconfig: 2345 97 03 # description: Start and stop the Kannel WAP gateway used to fetch \ # some WML content from a Web server & compile it \ # into WMLC mobile phone bytecode. # probe: true # Use start-stop-daemon ver=1.5 BBOX=/home/kannel/kannel/sbin/bearerbox SBOX=/home/kannel/kannel/sbin/smsbox START="/home/kannel/kannel/sbin/start-stop-daemon --start --chuid kannel:kannel --background --quiet --exec" STOP="/home/kannel/kannel/sbin/start-stop-daemon --stop --user kannel --quiet --oknodo --exec" CONF=/home/kannel/kannel/etc/kannel.conf LEVEL=-v\ 1 [ $# -eq 2 ] && ver=$2 # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -x $BBOX ] || exit 0 [ -x $SBOX ] || exit 0 [ -f $CONF ] || exit 0 RETVAL=0 # See how we were called. case "$1" in start) # Start daemons. echo -n "Starting bearer service (gateway kannel $ver): " $START $BBOX -- $LEVEL $CONF RETVAL1=$? sleep 1 # Sleep for a while before we try to start smsbox echo echo -n "Starting smsbox service (gateway kannel $ver): " $START $SBOX -- $CONF RETVAL2=$? echo echo [ $RETVAL1 -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/gateway ||\ RETVAL=1 ;; stop) # Stop daemons. echo -n "Shutting down smsbox (kannel $ver): " $STOP $SBOX RETVAL2=$? echo echo -n "Shutting down bearerbox (kannel $ver): " $STOP $BBOX RETVAL1=$? echo [ $RETVAL1 -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/gateway echo "" ;; status) status bearerbox status smsbox exit $? ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: named {start|stop|status|restart}" exit 1 esac exit $RETVAL ---------------------------------------------------------Remove this line Thanks & Regards Tapan Thapa On Mon, Mar 2, 2015 at 4:05 PM, Vedat Coskun <vedat.cos...@lebara.com> wrote: > Hi Olu, > > Thanks for your e-mail. I tried creating the kannel folder manually and > giving rw permission to kannel but that didn’t seem to do the trick.. > > On another note, I tried to run the service with kannel user and I got > this error. > > sudo -u kannel service kannel start > Starting kannel bearer box: /usr/sbin/start-stop-kannel: Unable to set > initgroups() with gid 494 > [FAILED] > > Googled it a bit but no luck. I realised if I removed —chuid > kannel:kannel from args="--start --background --chuid kannel:kannel --exec > “ it just works fine > > Thanks, > Vedat > > From: Olu IT <t...@chethsoft.com> > Date: Saturday, 28 February 2015 07:19 > To: Vedat Coskun <vedat.cos...@lebara.com>, "users@kannel.org" < > users@kannel.org> > Subject: Re: Kannel doesn't start on CentOS > > Since you could get kannel to work by manually starting the apps from > /usr/bin then kannel installed/compiled properly. And if the manual start > is also using same config, then at the least, the config is fine for the > functionalities you specified. The problem the seemed to point to your init > script. > > Check your init script. Does kannel have permission to write to the PID > files location? On one of my installations (if I remember well, using > Ubuntu), I had to modify the init script to check if the pid folder exists, > if not, create it, and set permissions for kannel to write to it by chown > to kannel preferably to chmoding to 777. That solved the problem for me in > that case. > > You might want to test that this is the case for you first by manually > creating the pid folder, in my case it was /var/run/kannel. Then, chown > kannel /var/run/kannel. Then, service kannel start. > > If this doesn't work, you may want to share your > /var/log/kannel/bearerbox.log & smsbox.log content. It will reveal more, > provided your init is starting the services with enough verbosity to reveal > more info. > > Hope this helps? > > BR, > Olu > > Vedat Coskun <vedat.cos...@lebara.com> wrote: > > Hi All, > > I think I’m having a bit of a problem with the Kannel start-up script. > When I manually start the bearerbox and smsbox from /usr/sbin, both seem to > work and I can send SMS. However when I use the init.d script even though > the output says both bearerbox and sms box has started, ‘service kannel > status’ tells me neither are working. There are no logs printed either. > > I installed Kannel using yum on a CentOS 6.5 virtual machine. The latest > available version of it is Version: 1.4.3 Release: 5.el6. I’m also pasting > the config file below and would appreciate if anyone can help. > > Thanks > > > # Lebara Talk kannel configuration file > group = core > admin-port = 13000 > admin-password = *** > status-password = *** > admin-deny-ip = "*.*.*.*" > admin-allow-ip = "127.0.0.1" > smsbox-port = 13001 > #wapbox-port = 13002 > box-deny-ip = "*.*.*.*" > box-allow-ip = "127.0.0.1" > wdp-interface-name = "*" > log-file = "/var/log/kannel/bearerbox.log" > log-level = 5 > > # SMSC Configuration > group = smsc > smsc = smpp > smsc-id = “RHEL" > host = ip > port = port > transceiver-mode = yes > smsc-username = “****" > smsc-password = “***" > system-type = "RHEL" > interface-version = 0x34 > source-addr-ton = 1 > source-addr-npi = 1 > dest-addr-ton = 1 > dest-addr-npi = 1 > > # SMS Box Configuration > group = smsbox > bearerbox-host = 127.0.0.1 > sendsms-port = 13013 > global-sender = 13013 > sendsms-chars = "0123456789 +-" > log-file = "/var/log/kannel/smsbox.log" > log-level = 5 > access-log = "/var/log/kannel/access.log" > > # SMS API Configuration > group = sendsms-user > username = username > password = *** > default-smsc = "RHEL" > This email is confidential and may be subject to privilege. If you are > not the intended recipient, please do not copy or disclose its content but > contact the sender immediately upon receipt. > This email is confidential and may be subject to privilege. If you are > not the intended recipient, please do not copy or disclose its content but > contact the sender immediately upon receipt. >