Re: SMSBOX not starting with PANIC
Am 15.12.21, 20:07, schrieb Norbert Kwizera: Hey All, We run a kannel instances with multiple connections and to increase the throughput for each we found that we can set multiple instances for each connection We have no issue when we set the instances to 5 however we have an issue when we set that to 10, starting kannel service fails with the error below 2021-12-14 10:39:14 [4089406] [0] ERROR: connect to <127.0.0.1> failed 2021-12-14 10:39:14 [4089406] [0] ERROR: System error 111: Connection refused 2021-12-14 10:39:14 [4089406] [0] ERROR: error connecting to server `localhost' at port `13001' 2021-12-14 10:39:14 [4089406] [0] PANIC: Couldn't connect to the bearerbox. 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(gw_backtrace+0xf0) [0x5557e89e6fc0] 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(gw_panic+0x167) [0x5557e89e7137] 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(main+0xead) [0x5557e89b4b8d] 2021-12-14 10:39:14 [4089406] [0] PANIC: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7ffb41e3e0b3] 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(_start+0x2e) [0x5557e89b560e] Hi, the error of smsbox is unrelated to the fact that you use 'instances = x' in the corresponding 'group = smsc'. In fact it even doesn't have any configuration relation, since smsbox daemon never looks into the config of 'group = smsc' values, these are only relevant for bearerbox. At the time you are trying to start smsbox, bearerbox's smsbox-port is not available, and this is why smsbox PANICs. -- Best Regards, Stipe --- Düsseldorf, NRW, Germany tolj.org system architecture Kannel Software Foundation (KSF) http://www.tolj.org/ http://www.kannel.org/ mailto:st_{at}_tolj.org mailto:stolj_{at}_kannel.org ---
Re: SMSBOX not starting with PANIC
The bearerbox is being started before. Here below is the init script we use to start the service ``` #!/bin/sh # Start/stop the Kannel boxes: One bearer box and one WAP box. # This is the default init.d script for Kannel. Its configuration is # appropriate for a small site running Kannel on one machine. # Make sure that the Kannel binaries can be found in $BOXPATH or somewhere # else along $PATH. run_kannel_box has to be in $BOXPATH. ### BEGIN INIT INFO # Provides: kannel # Required-Start:$local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Should-Start: $network $named # Should-Stop: $network $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: SMS and WAP gateway # Description: Kannel is a gateway for connecting WAP phones to the # Internet. It also works as an SMS gateway. ### END INIT INFO . /lib/lsb/init-functions BOXPATH=/usr/local/sbin PIDFILES=/var/run/kannel CONF=/etc/kannel/kannel.conf START_SMSBOX=1 PATH=$BOXPATH:$PATH # On Debian, the most likely reason for the bearerbox not being available # is that the package is in the "removed" or "unconfigured" state, and the # init.d script is still around because it's a conffile. This is normal, # so don't generate any output. test -x $BOXPATH/bearerbox || exit 0 test -r /etc/default/kannel && . /etc/default/kannel if [ ! -d $PIDFILES ] then mkdir $PIDFILES chown kannel:root $PIDFILES fi case "$1" in start) log_daemon_msg "Starting WAP gateway" log_progress_msg "bearerbox" ulimit -n 32000 start-stop-daemon --start --quiet \ --pidfile $PIDFILES/kannel_bearerbox.pid \ --chuid kannel \ --exec $BOXPATH/run_kannel_box \ -- \ --pidfile $PIDFILES/kannel_bearerbox.pid \ --no-extra-args \ $BOXPATH/bearerbox -v 4 -- $CONF sleep 1 # Wait for bearerbox test ! -z $START_WAPBOX && ( log_progress_msg "wapbox" ulimit -n 32000 start-stop-daemon --start --quiet \ --pidfile $PIDFILES/kannel_wapbox.pid \ --chuid kannel \ --exec $BOXPATH/run_kannel_box \ -- \ --pidfile $PIDFILES/kannel_wapbox.pid \ --no-extra-args \ $BOXPATH/wapbox -v 4 -- $CONF ) test ! -z $START_SMSBOX && ( log_daemon_msg "Starting SMSBOX" log_progress_msg "smsbox" ulimit -n 32000 start-stop-daemon --start --quiet \ --pidfile $PIDFILES/kannel_smsbox.pid \ --chuid kannel \ --exec $BOXPATH/run_kannel_box \ -- \ --pidfile $PIDFILES/kannel_smsbox.pid \ --no-extra-args \ $BOXPATH/smsbox -v 4 -- $CONF ) log_end_msg 0 ;; stop) log_daemon_msg "Stopping Kannel Processes" test ! -z $START_SMSBOX && ( log_progress_msg "smsbox" start-stop-daemon --stop --retry TERM/30/KILL/60 --quiet \ --pidfile $PIDFILES/kannel_smsbox.pid \ --exec $BOXPATH/run_kannel_box ) test ! -z $START_WAPBOX && ( log_progress_msg "wapbox" start-stop-daemon --stop --retry TERM/30/KILL/60 --quiet \ --pidfile $PIDFILES/kannel_wapbox.pid \ --exec $BOXPATH/run_kannel_box ) log_progress_msg "bearerbox" start-stop-daemon --stop --retry TERM/30/KILL/60 --quiet \ --pidfile $PIDFILES/kannel_bearerbox.pid \ --exec $BOXPATH/run_kannel_box log_daemon_msg "Waiting for stop" start-stop-daemon --stop --retry TERM/30/KILL/60 --quiet \ --exec $BOXPATH/bearerbox \ --oknodo start-stop-daemon --stop --retry TERM/30/KILL/60 --quiet \ --exec $BOXPATH/smsbox \ --oknodo log_end_msg 0 ;; reload) # We don't have support for this yet. exit 1 ;; restart|force-reload) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|restart|force-reload}" exit 1 esac exit 0 ``` Regards, On Thu, Dec 16, 2021 at 11:01 AM Vangelis Typaldos wrote: > You need first to start bearerbox before starting smsbox. > > Best Regards, > > Αποκτήστε το Outlook για Android <https://aka.ms/AAb9ysg> > ------ > *From:* users on behalf of Norbert Kwizera < > norka...@gmail.com> > *Sent:* Wednesday, December 15, 2021 9:07:33 PM > *To:* users@kannel.org > *Subject:* SMSBOX not starting with PANIC > > Hey All, > > We run a kannel instances with multiple connections and to increase the > throughput for each we found that we can set multiple instances for each > connection > > We have no issue when we set the instances to 5 however > we have an issue when we set that to 10, starting kannel service fails > with the error below > > 2021-12-14 10:39:14 [4089406] [0] ERROR: connect to <127.0.0.1> failed > 2021-12-14 10:39:14 [4089406] [0] ERROR: System error 111: Connection > refused > 2021-12-14 10:39:14 [4089406] [0] ERROR: error connecting to server >
Re: SMSBOX not starting with PANIC
You need first to start bearerbox before starting smsbox. Best Regards, Αποκτήστε το Outlook για Android<https://aka.ms/AAb9ysg> From: users on behalf of Norbert Kwizera Sent: Wednesday, December 15, 2021 9:07:33 PM To: users@kannel.org Subject: SMSBOX not starting with PANIC Hey All, We run a kannel instances with multiple connections and to increase the throughput for each we found that we can set multiple instances for each connection We have no issue when we set the instances to 5 however we have an issue when we set that to 10, starting kannel service fails with the error below 2021-12-14 10:39:14 [4089406] [0] ERROR: connect to <127.0.0.1> failed 2021-12-14 10:39:14 [4089406] [0] ERROR: System error 111: Connection refused 2021-12-14 10:39:14 [4089406] [0] ERROR: error connecting to server `localhost' at port `13001' 2021-12-14 10:39:14 [4089406] [0] PANIC: Couldn't connect to the bearerbox. 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(gw_backtrace+0xf0) [0x5557e89e6fc0] 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(gw_panic+0x167) [0x5557e89e7137] 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(main+0xead) [0x5557e89b4b8d] 2021-12-14 10:39:14 [4089406] [0] PANIC: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7ffb41e3e0b3] 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(_start+0x2e) [0x5557e89b560e] The kannel.conf is #* # Core Config #* group = core admin-port = 13000 smsbox-port = 13001 admin-password = X admin-deny-ip = "*.*.*.*" admin-allow-ip = "127.0.0.1" wdp-interface-name = "*" log-file = "/var/log/kannel/kannel.log" log-level = 1 store-type = spool store-location = "/var/kannel/spooled" sms-resend-retry = 10 sms-outgoing-queue-limit = 1000 box-allow-ip = "127.0.0.1" box-deny-ip = "*.*.*.*" #* # SMS Box Config #* group = smsbox bearerbox-host = localhost sendsms-port = 13013 log-file = "/var/log/kannel/smsbox.log" log-level = 1 mo-recode = true include = "/etc/kannel.d/" And each connection has config such as below ## # operator X ## group = smsc smsc= smpp host = 192.168.14.14 port = 9000 smsc-username = FOO smsc-password = BAR transceiver-mode = true window = 1 throughput = 40 system-type = "SMPP" smsc-id = operator_x allowed-smsc-id = operator_x log-level = 0 log-file = "/var/log/kannel/operator_x.log" address-range = "" interface-version = "34" instances = 10 Is there a maximum number of connections we can have at the same at the same time? Thanks
SMSBOX not starting with PANIC
Hey All, We run a kannel instances with multiple connections and to increase the throughput for each we found that we can set multiple instances for each connection We have no issue when we set the instances to 5 however we have an issue when we set that to 10, starting kannel service fails with the error below 2021-12-14 10:39:14 [4089406] [0] ERROR: connect to <127.0.0.1> failed 2021-12-14 10:39:14 [4089406] [0] ERROR: System error 111: Connection refused 2021-12-14 10:39:14 [4089406] [0] ERROR: error connecting to server `localhost' at port `13001' 2021-12-14 10:39:14 [4089406] [0] PANIC: Couldn't connect to the bearerbox. 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(gw_backtrace+0xf0) [0x5557e89e6fc0] 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(gw_panic+0x167) [0x5557e89e7137] 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(main+0xead) [0x5557e89b4b8d] 2021-12-14 10:39:14 [4089406] [0] PANIC: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7ffb41e3e0b3] 2021-12-14 10:39:14 [4089406] [0] PANIC: /usr/local/sbin/smsbox(_start+0x2e) [0x5557e89b560e] The kannel.conf is #* # Core Config #* group = core admin-port = 13000 smsbox-port = 13001 admin-password = X admin-deny-ip = "*.*.*.*" admin-allow-ip = "127.0.0.1" wdp-interface-name = "*" log-file = "/var/log/kannel/kannel.log" log-level = 1 store-type = spool store-location = "/var/kannel/spooled" sms-resend-retry = 10 sms-outgoing-queue-limit = 1000 box-allow-ip = "127.0.0.1" box-deny-ip = "*.*.*.*" #* # SMS Box Config #* group = smsbox bearerbox-host = localhost sendsms-port = 13013 log-file = "/var/log/kannel/smsbox.log" log-level = 1 mo-recode = true include = "/etc/kannel.d/" And each connection has config such as below ## # operator X ## group = smsc smsc= smpp host = 192.168.14.14 port = 9000 smsc-username = FOO smsc-password = BAR transceiver-mode = true window = 1 throughput = 40 system-type = "SMPP" smsc-id = operator_x allowed-smsc-id = operator_x log-level = 0 log-file = "/var/log/kannel/operator_x.log" address-range = "" interface-version = "34" instances = 10 Is there a maximum number of connections we can have at the same at the same time? Thanks