Send SMS from PWM

689 views
Skip to first unread message

Martin

unread,
Oct 17, 2011, 9:23:07 AM10/17/11
to pwm-general
Hi,

I'm trying to send (password recovery) SMS's from PWM but I don't seem
to be able to.
I've tested the SMS soap gateway using curl which works. PWM says it's
queuing the SMS when I click the forgotten password link and provide
my (test) account:

2011-10-17 15:20:03, DEBUG, servlet.ForgottenPasswordServlet, {o}
token SMS added to send queue for +316xxxxxxxx [xxx.xx.xx.xx/
srvxxx.xxxx.xx]

Then, nothing happens and I don't see any activity on the configured
host/port for the SMS gateway using tcpdump (which I do, when testing
the gateway with curl).

Am I missing any (global) SMS setting? I couldn't find the global SMS
enable toggle that is described in the manual in SVN revision 269.

Regards,
Martin

Menno Pieters

unread,
Oct 17, 2011, 9:56:09 AM10/17/11
to pwm-g...@googlegroups.com
Martin,

On Mon, Oct 17, 2011 at 3:23 PM, Martin <mrv...@gmail.com> wrote:
Hi,

I'm trying to send (password recovery) SMS's from PWM but I don't seem
to be able to.
I've tested the SMS soap gateway using curl which works. PWM says it's
queuing the SMS when I click the forgotten password link and provide
my (test) account:

2011-10-17 15:20:03, DEBUG, servlet.ForgottenPasswordServlet, {o}
token SMS added to send queue for +316xxxxxxxx [xxx.xx.xx.xx/
srvxxx.xxxx.xx]

Then, nothing happens and I don't see any activity on the configured
host/port for the SMS gateway using tcpdump (which I do, when testing
the gateway with curl).

Can PWM/you_application_server reach the SMS server? In other words: did you check with curl form the server? And, is your application server/java allowed to make outgoing connections (Java security manager)? Have you configured a proxy for HTTP (copied old config, left proxy in...?)?

You should see something like:

2011-10-17 15:44:32, TRACE, util.SmsQueueManager, SMS data: user=exampleuser&pass=test&to=0031612345678&msg=Your+activation+token+is+C8YJ5QAP7N7GSDDG.+http%3A%2F%2Ftinyurl.com%2F4o8vk+test
2011-10-17 15:44:32, INFO , util.SmsQueueManager, SMS sent

(data depends on service configuration). The message is put in a queue mechanism, just like email. A separate thread will periodically try to send the message, until it succeeds or the message expires. If you see the message being queued, SMS is enabled.

If in doubt, you might want to try my dummy SMS service: http://tools.pieters.cx/sms. That will only answer "OK".
 
Am I missing any (global) SMS setting? I couldn't find the global SMS
enable toggle that is described in the manual in SVN revision 269.

That seems to have been removed...

Regards,

Menno

Martin van Es

unread,
Oct 17, 2011, 10:26:19 AM10/17/11
to pwm-g...@googlegroups.com
Menno!

Thx for your timely reply!

On Mon, Oct 17, 2011 at 15:56, Menno Pieters <menno....@gmail.com> wrote:
>
> Can PWM/you_application_server reach the SMS server?

Yes, I test the curl command on the same server as PWM runs on.

> And, is your application server/java
> allowed to make outgoing connections (Java security manager)?

This, I don't know and will look into it. Thx!

> Have you configured a proxy for HTTP (copied old config, left proxy in...?)?

What does this have to do with PWM reaching the SMS gateway?

> You should see something like:
>
> 2011-10-17 15:44:32, TRACE, util.SmsQueueManager, SMS data:
> user=exampleuser&pass=test&to=0031612345678&msg=Your+activation+token+is+C8YJ5QAP7N7GSDDG.+http%3A%2F%2Ftinyurl.com%2F4o8vk+test
> 2011-10-17 15:44:32, INFO , util.SmsQueueManager, SMS sent

I don't. There is no output in catalina out after the queuing debug
message I supplied.


Regards,
Martin
--
If 'but' was any useful, it would be a logic operator

Menno Pieters

unread,
Oct 17, 2011, 10:28:09 AM10/17/11
to pwm-g...@googlegroups.com

----- Original Message -----
> > Have you configured a proxy for HTTP (copied old config, left proxy
> > in...?)?
>
> What does this have to do with PWM reaching the SMS gateway?

If PWM uses a proxy for outgoing HTTP and the proxy is unreachable.... Get it?


Martin van Es

unread,
Oct 17, 2011, 11:13:02 AM10/17/11
to pwm-g...@googlegroups.com
Found the problem I guess:

DEBUG, util.SmsQueueManager, discarding sms send event (no SMS gateway
user configured) from: , to: +316xxxxxxx

It's not quite obvious I have to supply what I don't use or need...

Regards,
Martin

> --
> You received this message because you are subscribed to the Google Groups "pwm-general" group.
> To post to this group, send email to pwm-g...@googlegroups.com.
> To unsubscribe from this group, send email to pwm-general...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pwm-general?hl=en.

Martin van Es

unread,
Oct 17, 2011, 11:22:11 AM10/17/11
to pwm-g...@googlegroups.com
Hi,

Although I found the reason for not correctly queuing the SMS, I'm now
hitting issue 120, even if I add 'en;;;' as a knownLocale, like
suggested in the report.

2011-10-17 17:21:04, ERROR, util.SmsQueueManager, unexpected exception
while processing sms queue: The JsonDeserializer LocaleTypeAdapter
failed to deserialize json object "" given the type class
java.util.Locale
com.google.gson.JsonParseException: The JsonDeserializer
LocaleTypeAdapter failed to deserialize json object "" given the type
class java.util.Locale

Regards,
Martin

Reply all
Reply to author
Forward
0 new messages