wolfd / pwm

PWM is an open source password self service application for LDAP directories. - exported from code.google.com/p/pwm
http://pwmdemo.weisberg.net/
0 stars 1 forks source link

SMS queue is always null and no SMS is sent #523

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Properly setup SMS gateway
2. Try to send a token to reset a forgotten password
3. No SMS will be sent.

What is the expected output? What do you see instead?
I expected the SMS to receive instantly, however, nothing is sent at all. Error 
messages occur only in log file (see below).

What version of PWM are you using?
1.7.0 b1227

What ldap directory and version are you using?
Novell eDirectory 8.8.6

Please paste any error log messages below:
Tue Jan 14 14:51:37 CET 2014, ERROR, password.pwm.util.queue.SmsQueueManager, 
unexpected exception while processing queue: null
Tue Jan 14 14:51:37 CET 2014, ERROR, password.pwm.util.queue.SmsQueueManager, 
unable to process queue successfully; sleeping for 1m

I set log level to TRACE, but all I receive when trying to send SMS are the two 
messages above.

Original issue reported on code.google.com by nils.rekow on 14 Jan 2014 at 1:59

GoogleCodeExporter commented 9 years ago
Please do check the log level. If you set the log level to TRACE, you should be 
seeing a lot more logging.

Original comment by menno.pi...@gmail.com on 14 Jan 2014 at 2:11

GoogleCodeExporter commented 9 years ago
You were totally right about the log level. Now, the log level is really set to 
TRACE and I get a lot more logging. However, I don't see what's wrong. Here's 
the log:

Wed Jan 15 08:27:10 CET 2014, ERROR, password.pwm.util.queue.SmsQueueManager, 
unable to process queue successfully; sleeping for 1m
Wed Jan 15 08:27:10 CET 2014, ERROR, password.pwm.util.queue.SmsQueueManager, 
unexpected exception while processing queue: null
Wed Jan 15 08:27:10 CET 2014, TRACE, password.pwm.util.queue.SmsQueueManager, 
preparing to send SMS data: 
username=testPWM&password=testPWM&recipients=49**removed**&encoding=8&splitmsg=t
rue&msgtext=Your activation token is 765489.
Wed Jan 15 08:26:10 CET 2014, TRACE, password.pwm.util.queue.SmsQueueManager, 
preparing to send SMS data: 
username=testPWM&password=testPWM&recipients=49**removed**&encoding=8&splitmsg=t
rue&msgtext=Your activation token is 765489.
Wed Jan 15 08:26:10 CET 2014, ERROR, password.pwm.util.queue.SmsQueueManager, 
unexpected exception while processing queue: null
Wed Jan 15 08:26:10 CET 2014, ERROR, password.pwm.util.queue.SmsQueueManager, 
unable to process queue successfully; sleeping for 1m
Wed Jan 15 08:26:10 CET 2014, DEBUG, password.pwm.ws.server.RestServerHelper, 
REST WebService Request: GET request for: /pwm/public/rest/app-data/client (no 
params)  [213.160.7.130/port-213-160-7-130.static.qsc.de]
Wed Jan 15 08:26:10 CET 2014, DEBUG, password.pwm.util.Helper, token SMS added 
to send queue for +49**removed**
Wed Jan 15 08:26:10 CET 2014, TRACE, password.pwm.util.MacroMachine, replaced 
Macro @SiteURL@ with value: https://pwm-test.tld/pwm/
Wed Jan 15 08:26:10 CET 2014, TRACE, 
password.pwm.servlet.ForgottenPasswordServlet, SMS number: +49**removed** <-- 
correct sms number is shown in log
Wed Jan 15 08:26:10 CET 2014, TRACE, 
password.pwm.servlet.ForgottenPasswordServlet, reading setting 
SMS_USER_PHONE_ATTRIBUTE
Wed Jan 15 08:26:10 CET 2014, DEBUG, 
password.pwm.servlet.ForgottenPasswordServlet, generated token code for session 
[213.160.7.130/port-213-160-7-130.static.qsc.de]
Wed Jan 15 08:26:10 CET 2014, TRACE, 
password.pwm.servlet.ForgottenPasswordServlet, Token: 765489

Original comment by nils.rekow on 15 Jan 2014 at 7:39

GoogleCodeExporter commented 9 years ago
I managed to solve the problem. To my mind the cause was spaces in the SMS text 
while using GET. I changed these to plus signs and now it works. I also had to 
change the "Request ID Length" to five in order to not get the value from 
pwmToken as it is stored in LDAP, but as the real human-readable token.

Original comment by nils.rekow on 17 Jan 2014 at 8:47

GoogleCodeExporter commented 9 years ago
Great. Congratulations.

Original comment by menno.pi...@gmail.com on 17 Jan 2014 at 10:48

GoogleCodeExporter commented 9 years ago
Sorry, to bother again, but starting with revision 674 and also the current 
revision in the trunk (rev. 679) do not seem to be able to send SMS anymore. :(

The configuration is still the same as mentioned above, but a new PWM revision.

The log says:

2014-01-29T13:33:12Z, DEBUG, password.pwm.ws.server.RestServerHelper, REST 
WebService Request: GET request for: /pwm/public/rest/health 
  dojo.preventCache='1391002411015' [192.168.101.45]
2014-01-29T13:33:11Z, ERROR, password.pwm.util.queue.AbstractQueueManager, 
unexpected exception while processing EmailQueueManager queue: setting value is 
not readable as string
2014-01-29T13:33:11Z, DEBUG, password.pwm.util.Helper, token SMS added to send 
queue for +49**removed**
2014-01-29T13:33:10Z, TRACE, password.pwm.util.intruder.IntruderManager, 
delaying response 1722ms due to intruder record: 
{"type":"TOKEN_DEST","subject":"+49**removed**","timeStamp":"2014-01-29T13:33:10
Z","attemptCount":1,"alerted":false}
2014-01-29T13:33:09Z, DEBUG, password.pwm.util.Helper, token email added to 
send queue for nils.rekow@**removed**
2014-01-29T13:33:09Z, TRACE, password.pwm.util.macro.MacroMachine, replaced 
Macro @SiteURL@ with value: https://192.168.101.147:8443/pwm/
2014-01-29T13:33:07Z, TRACE, password.pwm.util.intruder.IntruderManager, 
delaying response 2778ms due to intruder record: 
{"type":"TOKEN_DEST","subject":"nils.rekow@**removed**","timeStamp":"2014-01-29T
13:33:07Z","attemptCount":1,"alerted":false}
2014-01-29T13:33:07Z, TRACE, null, finish id=9,op#23 result: 
"NOVELL_EDIRECTORY" (0ms)
2014-01-29T13:33:07Z, TRACE, null, begin id=9,op#23 method getDirectoryVendor()
2014-01-29T13:33:07Z, DEBUG, password.pwm.servlet.ForgottenPasswordServlet, 
generated token code for session [192.168.101.45]

Original comment by nils.rekow on 29 Jan 2014 at 1:46

GoogleCodeExporter commented 9 years ago
Should be fixed with issue 529.

Original comment by menno.pi...@gmail.com on 29 Jan 2014 at 8:42