crhume / pwm

Automatically exported from code.google.com/p/pwm
0 stars 0 forks source link

SMS token sent multiple times #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure PWM SMS tokens
2. Enable trace
3. Recover Password

What is the expected output?
Log shows SMS is added to send queue
Log shows SmsQueueManager sends one message
One message received

What do you see instead?
Log shows SMS is added to send queue
Log shows SmsQueueManager sends message multiple times
Multiple SMS received

Email tokens work as expected, just one mail.

What version of PWM are you using?
1.5.4

What ldap directory and version are you using?

Please paste any error log messages below:

Original issue reported on code.google.com by alessand...@gmail.com on 6 Jul 2011 at 3:42

GoogleCodeExporter commented 9 years ago
Hi,

This could be normal behaviour if:
* You have set up expected responses (regular expressions), and
* The server response does not match the configured responses.

That means that no "OK" message is received, in which case PWM will retry to 
send the message until it expires (default 5 minutes).

Could you check whether the expected responses are configured correctly?
Otherwise, remove the responses. In that case PWM will simply assume that the 
message is sent successfully and remove it from the queue.

Original comment by menno.pi...@gmail.com on 6 Jul 2011 at 4:01

GoogleCodeExporter commented 9 years ago
Hi Menno,
no expected responses set:
    <setting key="sms.responseOkRegex" syntax="STRING_ARRAY">
      <label>Response Regular Expressions</label>
      <default />
    </setting>

Original comment by alessand...@gmail.com on 6 Jul 2011 at 4:18

GoogleCodeExporter commented 9 years ago
That's weird. As far as I know, the code hasn't changed in a while. At least, 
didn't do it and I haven't noticed any relevant changes. Somehow, the queue 
object probably decides that the message couldn't be sent and retries.

Could you increase the log level to trace and send the output?

Original comment by menno.pi...@gmail.com on 6 Jul 2011 at 7:53

GoogleCodeExporter commented 9 years ago

Original comment by jrivard on 7 Jul 2011 at 12:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry for the wait.
Please see attached trace log, SMS has been received 5 times.

Original comment by alessand...@gmail.com on 8 Jul 2011 at 4:46

Attachments:

GoogleCodeExporter commented 9 years ago
OK, thank you. I'll have to look into that. I recently changed jobs, and I have 
to set up a new dev environment, so it could take a couple of days...

For testing, I've created a dummy SMS service, that actually does nothing:

https://tools.pieters.cx/sms/

Could you check with this service whether the message is still sent 5 times if 
you check for a response:

^OK message sent$

If that helps, you might want to check (as a workaround) for ^.*$ in your 
setup. Otherwise, set the expiration time to < 60 seconds.

Original comment by menno.pi...@gmail.com on 8 Jul 2011 at 9:16

GoogleCodeExporter commented 9 years ago
With regex on dummy service message is still sent 5 times, tried ^OK message 
sent$ and ^.*$ with http to avoid certificate issues.
This message is logged:
2011-07-09 09:29:04, TRACE, util.SmsQueueManager, Matching string "OK message 
sent
" against pattern "^OK message sent$"
Reducing expiration time works.

In my setup, setting regex ^.*$ works, just one message.

Original comment by alessand...@gmail.com on 9 Jul 2011 at 8:13

GoogleCodeExporter commented 9 years ago
Should be fixed in r191.

...sorry for the inconvenience.

Original comment by menno.pi...@gmail.com on 9 Jul 2011 at 3:32

GoogleCodeExporter commented 9 years ago
Thank you very much

Original comment by alessand...@gmail.com on 11 Jul 2011 at 9:29