Re: Kannel not load balancing after restart and messages get stuck inqueue

2009-06-15 Thread Nikos Balkanas
No, you missunderstood. SMS are discarded only when they hit the Queue 
limit. This is the general Q, that should be left unbound, and stored in the 
spool directory.


The individual smsc's queue is living in memory. Once this limit is reached, 
the SMS is simply returned to the general Queue to be tried later on. The 
sms_router tries every 30", by which time more SMScs will be available. The 
only bad about this approach is efficiency. I.e. If you have only 1 smsc, 
with 50 msg qlimit and 2000 msgs in Queue, all 2000 msg will be submitted to 
the SMSc, only 50 will be accepted and the rest 1950 returned to the Queue 
(wasted processing).


If this becomes a problem, a patch maybe needed, once all available SMScs 
have their queues filled, to stop submitting more messages.


BTW: 50 is just a figure, better use a number that corresponds to the 
throughput of your SMSc for 2 rounds of the sms_router (2x30" = 60").


BR,
Nikos
- Original Message - 
From: "Alvaro Cornejo" 

To: "Nikos Balkanas" 
Cc: 
Sent: Tuesday, June 16, 2009 2:59 AM
Subject: Re: Kannel not load balancing after restart and messages get stuck 
inqueue



Hi Nikos

I didn't make the test since the user guide states that "... After
number of messages has hit this value, Kannel began to discard
them..."

I don't want messages to be discarded but queued...

Are they really discarded?

Regards

Alvaro




|-|
EnvΓ­e y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
en el PerΓΊ, MΓ©xico y en mas de 180 paises. Use aplicaciones 2 vias via
SMS y GPRS online
 Visitenos en www.perusms.NET www.smsglobal.com.mx y
www.pravcom.com



2009/6/15 Nikos Balkanas :

Hi Al,

What's up?

Did configuration do the trick?

BR,
Nikos
- Original Message - From: "Nikos Balkanas" 
To: "Alvaro Cornejo" ; "Alan McNatty"

Cc: 
Sent: Wednesday, June 10, 2009 10:52 AM
Subject: Re: Kannel not load balancing after restart and messages get 
stuck

inqueue



Hi Al,

Please see inline answers. Kannel load balances all available smscs 
during
operation. The only problem is that during startup, it starts sms_router 
too
soon. From the discussion, i see that a patch may not even be necessary, 
it

could be a configuration issue. Else I could always update the patch to
account for more cases.

BR,
Nikos
- Original Message - From: "Alvaro Cornejo"

To: "Alan McNatty" 
Cc: "Nikos Balkanas" ; 
Sent: Wednesday, June 10, 2009 7:56 AM
Subject: Re: Kannel not load balancing after restart and messages get
stuck inqueue



Hi Nikos



I'm still around here... I've been busy this lasts days... I wish I
was on vacations ;-)



Regarding this patch, -I didn't had time to test it- but seems to
solve the issue making kannel hold the queue assignment until all
smsc's are online. However I do agree with Alan in the fact that that
solution is not suitable since there can be many scenarios where an
smsc will not come online or might be delayed at kannel startup and
this will delay all message traffic.


If one could describe me these scenarios (when bbox will startup
succesfully, with smscs failing) I could implement them in the code.


I'll be for a solution where Kannel recalculate its queue(loadbalance)
for a given destination when a new destination for the given
route/destination is available/unavailable and not only at startup.


That's what it does all of the time. The only difference, at startup, it
starts sms_router too soon.


Another option might be to make kannel have an intermediate queue that
is not assigned to an smsc until the smsc queue is less than 5min on
the spscific smsc. This way in case of a restart, the 1st smsc to be
available will get a moderate queue and the rest of smsc's will
loadbalace the rest of messages once.



Would something like that might be possible? I fear that an approach
like this one Β will require a big remake of kannel queue/load
management and I doubt kannel team will go for it.


I can do that. No problem. But you don't need a patch for that, you can
use configuration. Have you tried setting in smsc group:

sms-outgoing-queue-limit = 50?

This will push the first 50 sms to your smsc, and then push single sms,
until your other smscs go online.


Also I stick in the opinion that kannel shouldn't panic if it can't
set active/enable an smsc on startup since there can be other smscs
that can process messages for other routes/destinations. This issue is
more important since the only workarroud Β is to edit kannel.conf
comment the offending smsc and restart kannel and once the smsc is
fixed, re-edit kannel.conf and restart kannel since so far, there is
no way to make kannel reread the config file.


We are in total agreement. I never liked this issue myself, either (both
failing to startup and not reconfiguring on the fly).


Once I test the patch I'll let you know. Probably th

Re: Kannel not load balancing after restart and messages get stuck inqueue

2009-06-15 Thread Alvaro Cornejo
Hi Nikos

I didn't make the test since the user guide states that "... After
number of messages has hit this value, Kannel began to discard
them..."

I don't want messages to be discarded but queued...

Are they really discarded?

Regards

Alvaro




|-|
Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via
SMS y GPRS online
  Visitenos en www.perusms.NET www.smsglobal.com.mx y
www.pravcom.com



2009/6/15 Nikos Balkanas :
> Hi Al,
>
> What's up?
>
> Did configuration do the trick?
>
> BR,
> Nikos
> - Original Message - From: "Nikos Balkanas" 
> To: "Alvaro Cornejo" ; "Alan McNatty"
> 
> Cc: 
> Sent: Wednesday, June 10, 2009 10:52 AM
> Subject: Re: Kannel not load balancing after restart and messages get stuck
> inqueue
>
>
>> Hi Al,
>>
>> Please see inline answers. Kannel load balances all available smscs during
>> operation. The only problem is that during startup, it starts sms_router too
>> soon. From the discussion, i see that a patch may not even be necessary, it
>> could be a configuration issue. Else I could always update the patch to
>> account for more cases.
>>
>> BR,
>> Nikos
>> - Original Message - From: "Alvaro Cornejo"
>> 
>> To: "Alan McNatty" 
>> Cc: "Nikos Balkanas" ; 
>> Sent: Wednesday, June 10, 2009 7:56 AM
>> Subject: Re: Kannel not load balancing after restart and messages get
>> stuck inqueue
>>
>>
>>> Hi Nikos
>>
>>> I'm still around here... I've been busy this lasts days... I wish I
>>> was on vacations ;-)
>>
>>> Regarding this patch, -I didn't had time to test it- but seems to
>>> solve the issue making kannel hold the queue assignment until all
>>> smsc's are online. However I do agree with Alan in the fact that that
>>> solution is not suitable since there can be many scenarios where an
>>> smsc will not come online or might be delayed at kannel startup and
>>> this will delay all message traffic.
>>
>> If one could describe me these scenarios (when bbox will startup
>> succesfully, with smscs failing) I could implement them in the code.
>>
>>> I'll be for a solution where Kannel recalculate its queue(loadbalance)
>>> for a given destination when a new destination for the given
>>> route/destination is available/unavailable and not only at startup.
>>
>> That's what it does all of the time. The only difference, at startup, it
>> starts sms_router too soon.
>>
>>> Another option might be to make kannel have an intermediate queue that
>>> is not assigned to an smsc until the smsc queue is less than 5min on
>>> the spscific smsc. This way in case of a restart, the 1st smsc to be
>>> available will get a moderate queue and the rest of smsc's will
>>> loadbalace the rest of messages once.
>>
>>> Would something like that might be possible? I fear that an approach
>>> like this one  will require a big remake of kannel queue/load
>>> management and I doubt kannel team will go for it.
>>
>> I can do that. No problem. But you don't need a patch for that, you can
>> use configuration. Have you tried setting in smsc group:
>>
>> sms-outgoing-queue-limit = 50?
>>
>> This will push the first 50 sms to your smsc, and then push single sms,
>> until your other smscs go online.
>>
>>> Also I stick in the opinion that kannel shouldn't panic if it can't
>>> set active/enable an smsc on startup since there can be other smscs
>>> that can process messages for other routes/destinations. This issue is
>>> more important since the only workarroud  is to edit kannel.conf
>>> comment the offending smsc and restart kannel and once the smsc is
>>> fixed, re-edit kannel.conf and restart kannel since so far, there is
>>> no way to make kannel reread the config file.
>>
>> We are in total agreement. I never liked this issue myself, either (both
>> failing to startup and not reconfiguring on the fly).
>>
>>> Once I test the patch I'll let you know. Probably this weekend.
>>
>> Please don't. Wait for the patch update.
>>
>>> Regards and THANKS for your time & Support.
>>
>> No pro, bro. Sorry for the delay, and for your ordeal. Mexico should be
>> beautiful this time of the year.
>>
>> Alvaro
>>
>>
>> |-|
>> EnvΓ­e y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
>> celular y Nextel
>> en el PerΓΊ, MΓ©xico y en mas de 180 paises. Use aplicaciones 2 vias via
>> SMS y GPRS online
>>             Visitenos en www.perusms.NET www.smsglobal.com.mx y
>> www.pravcom.com
>>
>>
>>
>> On Tue, Jun 9, 2009 at 10:14 PM, Alan McNatty wrote:
>>>
>>> Hi Nikos,
>>>
>>> OK, yeah I'm not about failure at start-up time. If an SMSC is off-line
>>> (SMPP timeout/retry during bind) kannel will start (simply config a
>>> bogus IP address for SMPP to test this out)

Re: Kannel not load balancing after restart and messages get stuck inqueue

2009-06-15 Thread Nikos Balkanas

Hi Al,

What's up?

Did configuration do the trick?

BR,
Nikos
- Original Message - 
From: "Nikos Balkanas" 
To: "Alvaro Cornejo" ; "Alan McNatty" 


Cc: 
Sent: Wednesday, June 10, 2009 10:52 AM
Subject: Re: Kannel not load balancing after restart and messages get stuck 
inqueue




Hi Al,

Please see inline answers. Kannel load balances all available smscs during 
operation. The only problem is that during startup, it starts sms_router 
too soon. From the discussion, i see that a patch may not even be 
necessary, it could be a configuration issue. Else I could always update 
the patch to account for more cases.


BR,
Nikos
- Original Message - 
From: "Alvaro Cornejo" 

To: "Alan McNatty" 
Cc: "Nikos Balkanas" ; 
Sent: Wednesday, June 10, 2009 7:56 AM
Subject: Re: Kannel not load balancing after restart and messages get 
stuck inqueue




Hi Nikos



I'm still around here... I've been busy this lasts days... I wish I
was on vacations ;-)



Regarding this patch, -I didn't had time to test it- but seems to
solve the issue making kannel hold the queue assignment until all
smsc's are online. However I do agree with Alan in the fact that that
solution is not suitable since there can be many scenarios where an
smsc will not come online or might be delayed at kannel startup and
this will delay all message traffic.


If one could describe me these scenarios (when bbox will startup 
succesfully, with smscs failing) I could implement them in the code.



I'll be for a solution where Kannel recalculate its queue(loadbalance)
for a given destination when a new destination for the given
route/destination is available/unavailable and not only at startup.


That's what it does all of the time. The only difference, at startup, it 
starts sms_router too soon.



Another option might be to make kannel have an intermediate queue that
is not assigned to an smsc until the smsc queue is less than 5min on
the spscific smsc. This way in case of a restart, the 1st smsc to be
available will get a moderate queue and the rest of smsc's will
loadbalace the rest of messages once.



Would something like that might be possible? I fear that an approach
like this one  will require a big remake of kannel queue/load
management and I doubt kannel team will go for it.


I can do that. No problem. But you don't need a patch for that, you can 
use configuration. Have you tried setting in smsc group:


sms-outgoing-queue-limit = 50?

This will push the first 50 sms to your smsc, and then push single sms, 
until your other smscs go online.



Also I stick in the opinion that kannel shouldn't panic if it can't
set active/enable an smsc on startup since there can be other smscs
that can process messages for other routes/destinations. This issue is
more important since the only workarroud  is to edit kannel.conf
comment the offending smsc and restart kannel and once the smsc is
fixed, re-edit kannel.conf and restart kannel since so far, there is
no way to make kannel reread the config file.


We are in total agreement. I never liked this issue myself, either (both 
failing to startup and not reconfiguring on the fly).



Once I test the patch I'll let you know. Probably this weekend.


Please don't. Wait for the patch update.


Regards and THANKS for your time & Support.


No pro, bro. Sorry for the delay, and for your ordeal. Mexico should be 
beautiful this time of the year.


Alvaro

|-|
EnvΓ­e y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
en el PerΓΊ, MΓ©xico y en mas de 180 paises. Use aplicaciones 2 vias via
SMS y GPRS online
 Visitenos en www.perusms.NET www.smsglobal.com.mx y
www.pravcom.com



On Tue, Jun 9, 2009 at 10:14 PM, Alan McNatty wrote:

Hi Nikos,

OK, yeah I'm not about failure at start-up time. If an SMSC is off-line
(SMPP timeout/retry during bind) kannel will start (simply config a
bogus IP address for SMPP to test this out). An example is lets say we
have 2 connections for load balancing. Now consider 1 smsc being taken
offline (no tcp connection) as it is upgraded, we can still send through
the other (this is also useful for DR - disaster recover, etc).

So from my example above only 1 connection would be active the other in
bind retry loop (wait X seconds, etc) - no tcp connection is established
to smsc. If we re-started kannel it wouldn't be a good idea to wait for
both links to become active before pushing messages out - this would
mean waiting for the upgraded smsc to come back online, no?

Again sorry if I'm talking at cross purposes here.

Cheers,
Alan

Nikos Balkanas wrote:

Hi Alan,

If even 1 SMSc in configuration file fails to start, bearerbox will
panic. There are several states to any SMSc, like connecting, going
down, etc. Bearerbox expects all SMScs to be available on startup. The
operative word is "available". If a configured modem 

WAP Problem

2009-06-15 Thread Nikos Balkanas
Dear Stipe,

Through my custom made benchmarking tool, I have discovered that the wtp layer 
in kannel has a very serious issue: 

Each request takes slightly longer than the previous one, with the result of 
when it reaches 32768 requests, wapbox stalls completely. The number is very 
regular, indicating relative simplicity, implicating possibly a single 
mechanism.

Would you, or anyone else know anything about it, or suggest where to start on 
looking?

Thanx,
Nikos

Re: SMSC HTTP issue on many smsc

2009-06-15 Thread Nikos Balkanas

Hi,

Alex G. has been working some http smsc patches. I don't know if they are 
submitted. Prior to that http smsc has been notoriously buggy.


BR,
Nikos
- Original Message - 
From: "Vincent CHAVANIS" 

To: 
Sent: Monday, June 15, 2009 4:59 PM
Subject: SMSC HTTP issue on many smsc



Hi,

I'm currently benchmarking kannel/cvs-20090615 with 40 http smsc type 
generic

with a host 127.0.0.1 and 40 differents ports.

The thing is that the 30 firsts smsc are working and responding normaly
like this exemple:
#) telnet 127.0.0.1 7188
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

HTTP/1.1 400 Bad Request
Server: Kannel/cvs-20090615
Date: Mon, 15 Jun 2009 13:55:22 GMT
Content-Length: 0
Connection: close

Connection closed by foreign host.


- The 10 nexts have the port open but never responds.
#) telnet 127.0.0.1 7817
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.



^C^C^C^C^C^C



Did someone have noticed this before ?

regards

Vincent.







SMSC HTTP issue on many smsc

2009-06-15 Thread Vincent CHAVANIS

Hi,

I'm currently benchmarking kannel/cvs-20090615 with 40 http smsc type generic
with a host 127.0.0.1 and 40 differents ports.

The thing is that the 30 firsts smsc are working and responding normaly
like this exemple:
#) telnet 127.0.0.1 7188
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

HTTP/1.1 400 Bad Request
Server: Kannel/cvs-20090615
Date: Mon, 15 Jun 2009 13:55:22 GMT
Content-Length: 0
Connection: close

Connection closed by foreign host.


- The 10 nexts have the port open but never responds.
#) telnet 127.0.0.1 7817
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.



^C^C^C^C^C^C



Did someone have noticed this before ?

regards

Vincent.




[PATCH] pam authentication - Attempt #2 ;)

2009-06-15 Thread Alejandro Guerrieri

Reposting, did anyone had time to check it out?

PS: I've a couple more unanswered patches, but will remind about them  
later.

--
Alejandro Guerrieri
aguerri...@kannel.org



Begin forwarded message:


From: Alejandro Guerrieri 
Date: 11 de junio de 2009 12:10:17 GMT+02:00
To: Kannel Devel 
Subject: [PATCH] pam authentication

I've made a patch to improve kannel's pam authentication:

1. It doesn't disable regular authentication, pam is only tried  
after checking regular sendsms-user's.
2. It allows for many pam configurations with different settings to  
coexist.
3. Logging reflects the pam configuration _and_ user (this required  
some additions to urltrans.c).


Having pam authentication allows kannel to authenticate using any  
pam-compatible module (passwd, ldap, radius, etc).


Another nice side effect is that new users could be added and  
passwords changed without needing to restart the service.


For details and the patch check here:

http://www.blogalex.com/archives/206

I'm working on the userguide patch as well.

Regards,
--
Alejandro Guerrieri
aguerri...@kannel.org