Re: Can't stop bearerbox?

2010-06-08 Thread Peter Valdemar Mørch (Lists)

Nikos Balkanas nbalkanas-at-gmail.com |Lists/Send to lists| wrote:
Please read user guide before addressing this list. If there are a lot 
of pending SMS, bb will try to send them before dying. This may take a 
few minutes.


This is not the case. This particular installation sends maybe one or 
two SMSs an hour, and I've now tried waiting for 6 minutes. It still 
didn't exit. I'm quite certain there are no SMSs waiting to be sent.


In fact, the user guide says in:
http://kannel.org/download/1.4.3/userguide-1.4.3/userguide.html#AEN364


To stop the gateway just run the same script with the stop parameter.

/etc/init.d/kannel stop


You write:
 With a second kill you force it to die, regardless of its

state. Not recommended.


What I don't understand is: What *is* recommended? Assuming it is 
reasonable to expect a low-traffic installation to terminate within 5 
minutes.


Peter
--
Peter Valdemar Mørch
http://www.morch.com



Re: Can't stop bearerbox?

2010-06-08 Thread Nikos Balkanas

Hi,

Recommended state means bb takes care of all its affairs before exiting. By 
forcing it you do not let it do it.
To see how many SMS you have left behind, check your queue from HTTP admin. 
If you don't see any pending SMS as you state, post detailed bb logs of 
shutting down, indicating the step that sticks, along with configuration.


Bb doesn't not normally stick on exit more than 2-3.

BR,
Nikos

- Original Message - 
From: Peter Valdemar Morch (Lists) 4ux6as...@sneakemail.com

To: users@kannel.org
Sent: Tuesday, June 08, 2010 11:15 AM
Subject: Re: Can't stop bearerbox?



Nikos Balkanas nbalkanas-at-gmail.com |Lists/Send to lists| wrote:
Please read user guide before addressing this list. If there are a lot of 
pending SMS, bb will try to send them before dying. This may take a few 
minutes.


This is not the case. This particular installation sends maybe one or two 
SMSs an hour, and I've now tried waiting for 6 minutes. It still didn't 
exit. I'm quite certain there are no SMSs waiting to be sent.


In fact, the user guide says in:
http://kannel.org/download/1.4.3/userguide-1.4.3/userguide.html#AEN364


To stop the gateway just run the same script with the stop parameter.

/etc/init.d/kannel stop


You write:
 With a second kill you force it to die, regardless of its

state. Not recommended.


What I don't understand is: What *is* recommended? Assuming it is 
reasonable to expect a low-traffic installation to terminate within 5 
minutes.


Peter
--
Peter Valdemar MΓΈrch
http://www.morch.com






Can't stop bearerbox?

2010-06-07 Thread Peter Valdemar Mørch (Lists)
We have bearerbox running fine. All works as it should. Several clients 
are connecting to it.


But when we try to stop by sending a kill signal (via start-stop-daemon 
on debian), the process doesn't terminate. Two more kill signals are 
required to terminate the process and we get PANIC: Cannot die by its 
own will in bearerbox.log


The attached bearerbox.log is a complete run from startup, over first 
kill (at 15:44:21) to second kill (which didn't log anything) to the 
third kill (at 15:45:06) which PANIC-ed.


Because of this,
# /etc/init.d/kannel stop
and
# /etc/init.d/kannel restart
both fail - which we're hoping to remedy.

What can we do to get bearerbox to terminate gracefully? Is this a known 
problem?


I don't think it is
http://redmine.kannel.org/issues/517
because all is working fine just before we try to close it down.

Any hints?

Peter
--
Peter Valdemar Mørch
http://www.morch.com
2010-06-07 15:43:30 [31784] [0] INFO: Added logfile `/var/log/kannel/bearerbox.log' with level `1'.
2010-06-07 15:43:30 [31784] [0] INFO: HTTP: Opening server at port 13000.
2010-06-07 15:43:30 [31784] [0] INFO: BOXC: 'smsbox-max-pending' not set, using default (100).
2010-06-07 15:43:30 [31784] [0] INFO: Set SMS resend frequency to 60 seconds.
2010-06-07 15:43:30 [31784] [0] INFO: SMS resend retry set to unlimited.
2010-06-07 15:43:30 [31784] [0] INFO: DLR rerouting for smsc id modem disabled.
2010-06-07 15:43:30 [31784] [0] INFO: AT2[modem]: configuration doesn't show modemtype. will autodetect
2010-06-07 15:43:30 [31784] [0] INFO: Adding interface *
2010-06-07 15:43:30 [31784] [6] INFO: AT2[modem]: opening device
2010-06-07 15:43:30 [31784] [0] INFO: 
2010-06-07 15:43:30 [31784] [0] INFO: Kannel bearerbox II version 1.4.3 starting
2010-06-07 15:43:30 [31784] [0] INFO: MAIN: Start-up done, entering mainloop
2010-06-07 15:43:31 [31784] [13] INFO: Client connected from 127.0.0.1 
2010-06-07 15:43:31 [31784] [5] INFO: Client connected from 127.0.0.1 
2010-06-07 15:43:31 [31784] [6] INFO: AT2[modem]: speed set to 9600
2010-06-07 15:43:33 [31784] [6] INFO: AT2[modem]: Phase 2+ is supported
2010-06-07 15:43:33 [31784] [6] INFO: AT2[modem]: Closing device
2010-06-07 15:43:33 [31784] [6] INFO: AT2[modem]: opening device
2010-06-07 15:43:34 [31784] [6] INFO: AT2[modem]: Logging in
2010-06-07 15:43:35 [31784] [6] INFO: AT2[modem]: init device
2010-06-07 15:43:35 [31784] [6] INFO: AT2[modem]: speed set to 9600
2010-06-07 15:43:36 [31784] [6] INFO: AT2[modem]: Phase 2+ is supported
2010-06-07 15:43:36 [31784] [6] INFO: AT2[modem]: AT SMSC successfully opened.
2010-06-07 15:43:52 [31784] [13] INFO: Client connected from 172.22.225.91 
2010-06-07 15:43:53 [31784] [5] INFO: Client connected from 172.22.225.91 
2010-06-07 15:43:53 [31784] [13] INFO: Client connected from 172.22.216.158 
2010-06-07 15:43:54 [31784] [5] INFO: Client connected from 172.22.216.158 
2010-06-07 15:43:54 [31784] [13] INFO: Client connected from 172.22.216.69 
2010-06-07 15:43:55 [31784] [5] INFO: Client connected from 172.22.225.40 
2010-06-07 15:43:55 [31784] [13] INFO: Client connected from 172.22.225.40 
2010-06-07 15:43:56 [31784] [5] INFO: Client connected from 172.22.216.69 
2010-06-07 15:44:21 [31784] [17] INFO: Connection closed by the box 127.0.0.1
2010-06-07 15:44:21 [31784] [15] INFO: Connection closed by the box 127.0.0.1
2010-06-07 15:44:21 [31784] [0] WARNING: Killing signal or HTTP admin command received, shutting down...
2010-06-07 15:44:21 [31784] [13] INFO: Client connected from 172.22.216.158 
2010-06-07 15:44:22 [31784] [6] INFO: AT2[modem]: Closing device
2010-06-07 15:44:22 [31784] [33] INFO: Connection closed by the box 172.22.216.69
2010-06-07 15:44:22 [31784] [25] INFO: Connection closed by the box 172.22.216.158
2010-06-07 15:44:22 [31784] [21] INFO: Connection closed by the box 172.22.225.91
2010-06-07 15:44:22 [31784] [29] INFO: Connection closed by the box 172.22.225.40
2010-06-07 15:44:22 [31784] [5] INFO: Client connected from 172.22.216.158 
2010-06-07 15:45:06 [31784] [0] PANIC: Cannot die by its own will
2010-06-07 15:45:06 [31784] [0] PANIC: /usr/sbin/bearerbox(gw_panic+0xbc) [0x80cf8ec]
2010-06-07 15:45:06 [31784] [0] PANIC: /usr/sbin/bearerbox [0x8054248]
2010-06-07 15:45:06 [31784] [0] PANIC: [0xb7ef0400]
2010-06-07 15:45:06 [31784] [0] PANIC: /usr/sbin/bearerbox(main+0xa1d) [0x8054dbd]
2010-06-07 15:45:06 [31784] [0] PANIC: /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7a48455]
2010-06-07 15:45:06 [31784] [0] PANIC: /usr/sbin/bearerbox [0x8053881]
group = core
admin-port = 13000
admin-password = bar
admin-deny-ip = *.*.*.*
admin-allow-ip = 127.0.0.1
wapbox-port = 13002
smsbox-port = 13003
wdp-interface-name = *
log-file = /var/log/kannel/bearerbox.log
log-level = 1
box-deny-ip = *.*.*.*
box-allow-ip = 
127.0.0.1;172.22.225.91;172.22.225.40;172.22.216.69;172.22.216.158
dlr-storage = internal

group = wapbox
bearerbox-host = 127.0.0.1
log-file = 

Re: Can't stop bearerbox?

2010-06-07 Thread Nikos Balkanas

Hi,

Please read user guide before addressing this list. If there are a lot of 
pending SMS, bb will try to send them before dying. This may take a few 
minutes. With a second kill you force it to die, regardless of its state. 
Not recommended.


BR,
Nikos
- Original Message - 
From: Peter Valdemar Morch (Lists) 4ux6as...@sneakemail.com

To: users@kannel.org
Sent: Monday, June 07, 2010 5:14 PM
Subject: Can't stop bearerbox?



We have bearerbox running fine. All works as it should. Several clients
are connecting to it.

But when we try to stop by sending a kill signal (via start-stop-daemon
on debian), the process doesn't terminate. Two more kill signals are
required to terminate the process and we get PANIC: Cannot die by its
own will in bearerbox.log

The attached bearerbox.log is a complete run from startup, over first
kill (at 15:44:21) to second kill (which didn't log anything) to the
third kill (at 15:45:06) which PANIC-ed.

Because of this,
# /etc/init.d/kannel stop
and
# /etc/init.d/kannel restart
both fail - which we're hoping to remedy.

What can we do to get bearerbox to terminate gracefully? Is this a known
problem?

I don't think it is
http://redmine.kannel.org/issues/517
because all is working fine just before we try to close it down.

Any hints?

Peter
--
Peter Valdemar MΓΈrch
http://www.morch.com







2010-06-07 15:43:30 [31784] [0] INFO: Added logfile 
`/var/log/kannel/bearerbox.log' with level `1'.

2010-06-07 15:43:30 [31784] [0] INFO: HTTP: Opening server at port 13000.
2010-06-07 15:43:30 [31784] [0] INFO: BOXC: 'smsbox-max-pending' not set, 
using default (100).
2010-06-07 15:43:30 [31784] [0] INFO: Set SMS resend frequency to 60 
seconds.

2010-06-07 15:43:30 [31784] [0] INFO: SMS resend retry set to unlimited.
2010-06-07 15:43:30 [31784] [0] INFO: DLR rerouting for smsc id modem 
disabled.
2010-06-07 15:43:30 [31784] [0] INFO: AT2[modem]: configuration doesn't 
show modemtype. will autodetect

2010-06-07 15:43:30 [31784] [0] INFO: Adding interface *
2010-06-07 15:43:30 [31784] [6] INFO: AT2[modem]: opening device
2010-06-07 15:43:30 [31784] [0] 
INFO: 
2010-06-07 15:43:30 [31784] [0] INFO: Kannel bearerbox II version 1.4.3 
starting
2010-06-07 15:43:30 [31784] [0] INFO: MAIN: Start-up done, entering 
mainloop

2010-06-07 15:43:31 [31784] [13] INFO: Client connected from 127.0.0.1
2010-06-07 15:43:31 [31784] [5] INFO: Client connected from 127.0.0.1
2010-06-07 15:43:31 [31784] [6] INFO: AT2[modem]: speed set to 9600
2010-06-07 15:43:33 [31784] [6] INFO: AT2[modem]: Phase 2+ is supported
2010-06-07 15:43:33 [31784] [6] INFO: AT2[modem]: Closing device
2010-06-07 15:43:33 [31784] [6] INFO: AT2[modem]: opening device
2010-06-07 15:43:34 [31784] [6] INFO: AT2[modem]: Logging in
2010-06-07 15:43:35 [31784] [6] INFO: AT2[modem]: init device
2010-06-07 15:43:35 [31784] [6] INFO: AT2[modem]: speed set to 9600
2010-06-07 15:43:36 [31784] [6] INFO: AT2[modem]: Phase 2+ is supported
2010-06-07 15:43:36 [31784] [6] INFO: AT2[modem]: AT SMSC successfully 
opened.
2010-06-07 15:43:52 [31784] [13] INFO: Client connected from 
172.22.225.91
2010-06-07 15:43:53 [31784] [5] INFO: Client connected from 
172.22.225.91
2010-06-07 15:43:53 [31784] [13] INFO: Client connected from 
172.22.216.158
2010-06-07 15:43:54 [31784] [5] INFO: Client connected from 
172.22.216.158
2010-06-07 15:43:54 [31784] [13] INFO: Client connected from 
172.22.216.69
2010-06-07 15:43:55 [31784] [5] INFO: Client connected from 
172.22.225.40
2010-06-07 15:43:55 [31784] [13] INFO: Client connected from 
172.22.225.40
2010-06-07 15:43:56 [31784] [5] INFO: Client connected from 
172.22.216.69
2010-06-07 15:44:21 [31784] [17] INFO: Connection closed by the box 
127.0.0.1
2010-06-07 15:44:21 [31784] [15] INFO: Connection closed by the box 
127.0.0.1
2010-06-07 15:44:21 [31784] [0] WARNING: Killing signal or HTTP admin 
command received, shutting down...
2010-06-07 15:44:21 [31784] [13] INFO: Client connected from 
172.22.216.158

2010-06-07 15:44:22 [31784] [6] INFO: AT2[modem]: Closing device
2010-06-07 15:44:22 [31784] [33] INFO: Connection closed by the box 
172.22.216.69
2010-06-07 15:44:22 [31784] [25] INFO: Connection closed by the box 
172.22.216.158
2010-06-07 15:44:22 [31784] [21] INFO: Connection closed by the box 
172.22.225.91
2010-06-07 15:44:22 [31784] [29] INFO: Connection closed by the box 
172.22.225.40
2010-06-07 15:44:22 [31784] [5] INFO: Client connected from 
172.22.216.158

2010-06-07 15:45:06 [31784] [0] PANIC: Cannot die by its own will
2010-06-07 15:45:06 [31784] [0] PANIC: /usr/sbin/bearerbox(gw_panic+0xbc) 
[0x80cf8ec]

2010-06-07 15:45:06 [31784] [0] PANIC: /usr/sbin/bearerbox [0x8054248]
2010-06-07 15:45:06 [31784] [0] PANIC: [0xb7ef0400]
2010-06-07 15:45:06 [31784] [0] PANIC: /usr/sbin/bearerbox(main+0xa1d) 
[0x8054dbd]
2010-06-07 15:45:06 [31784] [0] PANIC: 
/lib/i686/cmov