Sms Gateway not working

sms

#1

Hi all,
Im having some issues sms gateway config. i have attached my config below.
Logs show the following errors.

Log:
[2018-06-14 10:06:54,670][1110][140198793021184][INFO][privacyidea.lib.smsprovider.SMSProvider:224] We can not filter for smsgateway undefined

[2018-06-14 10:18:09,699][1110][140198793021184][WARNING][privacyidea.lib.tokens.smstoken:301] The PIN was correct, but the SMS could not be sent: SMSError(error_id=-1, description=‘No URL specified i n the provider config.’)
image

May be im missing some configurations. Please help to resolve this. Thankyou.


#2

Please see:


#3

cornelinux Thanks for the reply. i worked with traceback logs but i cudnt find a solutions. Im pasted the logs bellow.
Logs includes 1. Validy Check logs
2. SMS GATEWAY logs

Validty Check
-------------------
https://SERVER/validate/check?user=mliushan&pass=1234

[2018-06-18 13:49:10,282][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:185] Entering _get_sms_timeout with arguments () and keywords {}
[2018-06-18 13:49:10,282][1117][139837171013376][DEBUG][privacyidea.lib.config:185] Entering get_from_config with arguments (‘sms.providerTimeout’, 300) and keywords {}
[2018-06-18 13:49:10,282][1117][139837171013376][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:49:10,283][1117][139837171013376][DEBUG][privacyidea.lib.config:197] Exiting get_from_config with result 300
[2018-06-18 13:49:10,283][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:197] Exiting _get_sms_timeout with result 300
[2018-06-18 13:49:10,284][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:280] counter=7L
[2018-06-18 13:49:10,284][1117][139837171013376][DEBUG][privacyidea.lib.tokenclass:185] Entering inc_otp_counter with arguments (<<class ‘privacyidea.lib.tokens.smstoken.SmsTokenClass’> {"‘token’": ‘<<class ‘privacyidea.models.Token’> {"‘active’": ‘True’, “‘info_list’”: ‘[<privacyidea.models.TokenInfo object at 0x7f2e31951b50>, <privacyidea.models.TokenInfo object at 0x7f2e3188bcd0>, <privacyidea.models.TokenInfo object at 0x7f2e3188be10>, <privacyidea.models.TokenInfo object at 0x7f2e3188b310>, <privacyidea.models.TokenInfo object at 0x7f2e319a9110>, <privacyidea.models.TokenInfo object at 0x7f2e318cf190>]’, “‘count_window’”: ‘10L’, “‘key_enc’”: "u’6746823913ef551e702478a1385133c8fc4064a7177081d9fd6367ce11ea42f47678f0699f4905b310d026c9266157e553b88c4e1923548f6b5a1f059c5d1463c9e4164a3af6c7b2280d3b20304c495a7c199f4e5451ca937a1d6928ed86aa67’", “‘pin_hash’”: “u’5975ac053cf9b6ddd220c9c2c440c22e96fc16a1302cc5fe0af62cf3ad0e11fe’”, “‘so_pin’”: “u’’”, “‘user_id’”: “u’3’”, “‘otplen’”: ‘6L’, “‘so_pin_iv’”: “u’’”, “‘serial’”: “u’PISM0000DAA5’”, “‘revoked’”: ‘False’, “‘locked’”: ‘False’, “‘maxfail’”: ‘10L’, “‘realm_list’”: ‘[<privacyidea.models.TokenRealm object at 0x7f2e31a151d0>]’, “‘count’”: ‘7L’, “‘pin_seed’”: “u’337577ade9acedad8caa0d6c8fb23e54’”, “‘sync_window’”: ‘1000L’, “‘description’”: “u’Testing SMS to liu’”, “‘resolver_type’”: “u’sqlresolver’”, “‘user_pin_iv’”: “u’’”, “‘user_pin’”: “u’’”, “‘rollout_state’”: “u’’”, “‘failcount’”: ‘0L’, “’_sa_instance_state’”: ‘<sqlalchemy.orm.state.InstanceState object at 0x7f2e31a12f50>’, “‘id’”: ‘8L’, “‘resolver’”: “u’sql1’”, “‘key_iv’”: “u’858935becdc8ea209607de439c617faf’”, “‘tokentype’”: “u’sms’”}>’, “‘mode’”: “[‘challenge’]”, “‘init_details’”: ‘{}’, “‘auth_details’”: ‘{}’, “‘type’”: “u’sms’”, “‘hKeyRequired’”: ‘True’}>, 7L) and keywords {‘reset’: False}
[2018-06-18 13:49:10,291][1117][139837171013376][DEBUG][privacyidea.lib.tokenclass:197] Exiting inc_otp_counter with result 8
[2018-06-18 13:49:10,292][1117][139837171013376][DEBUG][privacyidea.lib.policy:185] Entering get_action_values with arguments (<privacyidea.lib.policy.PolicyClass object at 0x7f2e495a7e90>,) and keywords {‘realm’: u’realm2’, ‘allow_white_space_in_action’: True, ‘client’: ‘10.10.2.4’, ‘user’: u’mliushan’, ‘action’: ‘smstext’, ‘scope’: ‘authentication’, ‘unique’: True}
[2018-06-18 13:49:10,293][1117][139837171013376][DEBUG][privacyidea.lib.policy:185] Entering get_policies with arguments (<privacyidea.lib.policy.PolicyClass object at 0x7f2e495a7e90>,) and keywords {‘realm’: u’realm2’, ‘active’: True, ‘client’: ‘10.10.2.4’, ‘user’: u’mliushan’, ‘resolver’: None, ‘action’: ‘smstext’, ‘scope’: ‘authentication’, ‘adminrealm’: None}
[2018-06-18 13:49:10,293][1117][139837171013376][DEBUG][privacyidea.lib.policy:481] Policies after matching time: []
[2018-06-18 13:49:10,293][1117][139837171013376][DEBUG][privacyidea.lib.policy:491] Policies after matching active: []
[2018-06-18 13:49:10,293][1117][139837171013376][DEBUG][privacyidea.lib.policy:491] Policies after matching scope: []
[2018-06-18 13:49:10,293][1117][139837171013376][DEBUG][privacyidea.lib.policy:515] Policies after matching action: []
[2018-06-18 13:49:10,293][1117][139837171013376][DEBUG][privacyidea.lib.policy:515] Policies after matching user: []
[2018-06-18 13:49:10,294][1117][139837171013376][DEBUG][privacyidea.lib.policy:515] Policies after matching realm: []
[2018-06-18 13:49:10,294][1117][139837171013376][DEBUG][privacyidea.lib.policy:587] Policies after matching client
[2018-06-18 13:49:10,294][1117][139837171013376][DEBUG][privacyidea.lib.policy:197] Exiting get_policies with result []
[2018-06-18 13:49:10,294][1117][139837171013376][DEBUG][privacyidea.lib.policy:197] Exiting get_action_values with result []
[2018-06-18 13:49:10,294][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:185] Entering _send_sms with arguments (<<class ‘privacyidea.lib.tokens.smstoken.SmsTokenClass’> {"‘token’": ‘<<class ‘privacyidea.models.Token’> {"‘active’": ‘True’, “‘count_window’”: ‘10L’, “‘key_enc’”: "u’6746823913ef551e702478a1385133c8fc4064a7177081d9fd6367ce11ea42f47678f0699f4905b310d026c9266157e553b88c4e1923548f6b5a1f059c5d1463c9e4164a3af6c7b2280d3b20304c495a7c199f4e5451ca937a1d6928ed86aa67’", “‘pin_hash’”: “u’5975ac053cf9b6ddd220c9c2c440c22e96fc16a1302cc5fe0af62cf3ad0e11fe’”, “‘so_pin’”: “u’’”, “‘user_id’”: “u’3’”, “‘otplen’”: ‘6L’, “‘so_pin_iv’”: “u’’”, “‘serial’”: “u’PISM0000DAA5’”, “‘revoked’”: ‘False’, “‘locked’”: ‘False’, “‘maxfail’”: ‘10L’, “‘count’”: ‘8L’, “‘pin_seed’”: “u’337577ade9acedad8caa0d6c8fb23e54’”, “‘sync_window’”: ‘1000L’, “‘description’”: “u’Testing SMS to liu’”, “‘resolver_type’”: “u’sqlresolver’”, “‘user_pin_iv’”: “u’’”, “‘user_pin’”: “u’’”, “‘rollout_state’”: “u’’”, “‘failcount’”: ‘0L’, “’_sa_instance_state’”: ‘<sqlalchemy.orm.state.InstanceState object at 0x7f2e31a12f50>’, “‘id’”: ‘8L’, “‘resolver’”: “u’sql1’”, “‘key_iv’”: “u’858935becdc8ea209607de439c617faf’”, “‘tokentype’”: “u’sms’”}>’, “‘mode’”: “[‘challenge’]”, “‘init_details’”: ‘{}’, “‘auth_details’”: ‘{}’, “‘type’”: “u’sms’”, “‘hKeyRequired’”: ‘True’}>,) and keywords {‘message’: ‘’}
[2018-06-18 13:49:10,296][1117][139837171013376][DEBUG][privacyidea.lib.tokens.hotptoken:185] Entering get_otp with arguments (<<class ‘privacyidea.lib.tokens.smstoken.SmsTokenClass’> {"‘token’": ‘<<class ‘privacyidea.models.Token’> {"‘active’": ‘True’, “‘info_list’”: ‘[<privacyidea.models.TokenInfo object at 0x7f2e319f8b90>, <privacyidea.models.TokenInfo object at 0x7f2e318cf190>, <privacyidea.models.TokenInfo object at 0x7f2e319dce90>, <privacyidea.models.TokenInfo object at 0x7f2e31a15ad0>, <privacyidea.models.TokenInfo object at 0x7f2e31a151d0>, <privacyidea.models.TokenInfo object at 0x7f2e31a76410>]’, “‘count_window’”: ‘10L’, “‘key_enc’”: "u’6746823913ef551e702478a1385133c8fc4064a7177081d9fd6367ce11ea42f47678f0699f4905b310d026c9266157e553b88c4e1923548f6b5a1f059c5d1463c9e4164a3af6c7b2280d3b20304c495a7c199f4e5451ca937a1d6928ed86aa67’", “‘pin_hash’”: “u’5975ac053cf9b6ddd220c9c2c440c22e96fc16a1302cc5fe0af62cf3ad0e11fe’”, “‘so_pin’”: “u’’”, “‘user_id’”: “u’3’”, “‘otplen’”: ‘6L’, “‘so_pin_iv’”: “u’’”, “‘serial’”: “u’PISM0000DAA5’”, “‘revoked’”: ‘False’, “‘locked’”: ‘False’, “‘maxfail’”: ‘10L’, “‘count’”: ‘8L’, “‘pin_seed’”: “u’337577ade9acedad8caa0d6c8fb23e54’”, “‘sync_window’”: ‘1000L’, “‘description’”: “u’Testing SMS to liu’”, “‘resolver_type’”: “u’sqlresolver’”, “‘user_pin_iv’”: “u’’”, “‘user_pin’”: “u’’”, “‘rollout_state’”: “u’’”, “‘failcount’”: ‘0L’, “’_sa_instance_state’”: ‘<sqlalchemy.orm.state.InstanceState object at 0x7f2e31a12f50>’, “‘id’”: ‘8L’, “‘resolver’”: “u’sql1’”, “‘key_iv’”: “u’858935becdc8ea209607de439c617faf’”, “‘tokentype’”: “u’sms’”}>’, “‘mode’”: “[‘challenge’]”, “‘init_details’”: ‘{}’, “‘auth_details’”: ‘{}’, “‘type’”: “u’sms’”, “‘hKeyRequired’”: ‘True’}>,) and keywords {}
[2018-06-18 13:49:10,296][1117][139837171013376][DEBUG][privacyidea.models:185] Entering get_otpkey with arguments (<<class ‘privacyidea.models.Token’> {"‘active’": ‘True’, “‘info_list’”: ‘[<privacyidea.models.TokenInfo object at 0x7f2e319f8b90>, <privacyidea.models.TokenInfo object at 0x7f2e318cf190>, <privacyidea.models.TokenInfo object at 0x7f2e319dce90>, <privacyidea.models.TokenInfo object at 0x7f2e31a15ad0>, <privacyidea.models.TokenInfo object at 0x7f2e31a151d0>, <privacyidea.models.TokenInfo object at 0x7f2e31a76410>]’, “‘count_window’”: ‘10L’, “‘key_enc’”: “u’6746823913ef551e702478a1385133c8fc4064a7177081d9fd6367ce11ea42f47678f0699f4905b310d026c9266157e553b88c4e1923548f6b5a1f059c5d1463c9e4164a3af6c7b2280d3b20304c495a7c199f4e5451ca937a1d6928ed86aa67’”, “‘pin_hash’”: “u’5975ac053cf9b6ddd220c9c2c440c22e96fc16a1302cc5fe0af62cf3ad0e11fe’”, “‘so_pin’”: “u’’”, “‘user_id’”: “u’3’”, “‘otplen’”: ‘6L’, “‘so_pin_iv’”: “u’’”, “‘serial’”: “u’PISM0000DAA5’”, “‘revoked’”: ‘False’, “‘locked’”: ‘False’, “‘maxfail’”: ‘10L’, “‘count’”: ‘8L’, “‘pin_seed’”: “u’337577ade9acedad8caa0d6c8fb23e54’”, “‘sync_window’”: ‘1000L’, “‘description’”: “u’Testing SMS to liu’”, “‘resolver_type’”: “u’sqlresolver’”, “‘user_pin_iv’”: “u’’”, “‘user_pin’”: “u’’”, “‘rollout_state’”: “u’’”, “‘failcount’”: ‘0L’, “’_sa_instance_state’”: ‘<sqlalchemy.orm.state.InstanceState object at 0x7f2e31a12f50>’, “‘id’”: ‘8L’, “‘resolver’”: “u’sql1’”, “‘key_iv’”: “u’858935becdc8ea209607de439c617faf’”, “‘tokentype’”: “u’sms’”}>,) and keywords {}
[2018-06-18 13:49:10,297][1117][139837171013376][DEBUG][privacyidea.models:197] Exiting get_otpkey with result <privacyidea.lib.crypto.SecretObj object at 0x7f2e3192dd10>
[2018-06-18 13:49:10,297][1117][139837171013376][DEBUG][privacyidea.lib.crypto:185] Entering decrypt with arguments (‘gF\x829\x13\xefU\x1ep$x\xa18Q3\xc8\xfc@d\xa7\x17p\x81\xd9\xfdcg\xce\x11\xeaB\xf4vx\xf0i\x9fI\x05\xb3\x10\xd0&\xc9&aW\xe5S\xb8\x8cN\x19#T\x8fkZ\x1f\x05\x9c]\x14c\xc9\xe4\x16J:\xf6\xc7\xb2(\r; 0LIZ|\x19\x9fNTQ\xca\x93z\x1di(\xed\x86\xaag’, ‘\x85\x895\xbe\xcd\xc8\xea \x96\x07\xdeC\x9ca\x7f\xaf’) and keywords {}
[2018-06-18 13:49:10,298][1117][139837171013376][DEBUG][privacyidea.lib.crypto:199] Exiting decrypt with result HIDDEN
[2018-06-18 13:49:10,298][1117][139837171013376][DEBUG][privacyidea.lib.config:185] Entering get_from_config with arguments (‘PrependPin’,) and keywords {}
[2018-06-18 13:49:10,298][1117][139837171013376][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:49:10,299][1117][139837171013376][DEBUG][privacyidea.lib.config:197] Exiting get_from_config with result True
[2018-06-18 13:49:10,299][1117][139837171013376][DEBUG][privacyidea.lib.tokens.hotptoken:197] Exiting get_otp with result (1, -1, ‘587804’, ‘-1587804’)
[2018-06-18 13:49:10,299][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:360] sending SMS to phone number PHONENUMBER
[2018-06-18 13:49:10,300][1117][139837171013376][DEBUG][privacyidea.lib.config:185] Entering get_from_config with arguments (‘sms.identifier’,) and keywords {}
[2018-06-18 13:49:10,300][1117][139837171013376][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:49:10,301][1117][139837171013376][DEBUG][privacyidea.lib.config:197] Exiting get_from_config with result None
[2018-06-18 13:49:10,301][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:185] Entering _get_sms_provider with arguments () and keywords {}
[2018-06-18 13:49:10,301][1117][139837171013376][DEBUG][privacyidea.lib.config:185] Entering get_from_config with arguments (‘sms.provider’,) and keywords {‘default’: ‘privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider’}
[2018-06-18 13:49:10,302][1117][139837171013376][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:49:10,303][1117][139837171013376][DEBUG][privacyidea.lib.config:197] Exiting get_from_config with result privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider
[2018-06-18 13:49:10,303][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:197] Exiting _get_sms_provider with result (‘privacyidea.lib.smsprovider.HttpSMSProvider’, ‘HttpSMSProvider’)
[2018-06-18 13:49:10,304][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:373] smsprovider: privacyidea.lib.smsprovider.HttpSMSProvider, class: HttpSMSProvider
[2018-06-18 13:49:10,304][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:384] loading SMS configuration for class <privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider object at 0x7f2e318dff10>
[2018-06-18 13:49:10,304][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:185] Entering _get_sms_provider_config with arguments () and keywords {}
[2018-06-18 13:49:10,304][1117][139837171013376][DEBUG][privacyidea.lib.config:185] Entering get_from_config with arguments (‘sms.providerConfig’, ‘{}’) and keywords {}
[2018-06-18 13:49:10,305][1117][139837171013376][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:49:10,306][1117][139837171013376][DEBUG][privacyidea.lib.config:197] Exiting get_from_config with result {}
[2018-06-18 13:49:10,306][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:197] Exiting _get_sms_provider_config with result {}
[2018-06-18 13:49:10,306][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:386] config: {}
[2018-06-18 13:49:10,307][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:393] submitMessage: u’587804’, to phone u’PHONENUMBER’
[2018-06-18 13:49:10,307][1117][139837171013376][DEBUG][privacyidea.lib.smsprovider.HttpSMSProvider:64] submitting message u’587804’ to PHONENUMBER
[2018-06-18 13:49:10,308][1117][139837171013376][DEBUG][privacyidea.lib.smsprovider.HttpSMSProvider:161] [getParameters] urldata: {‘phone’: u’PHONENUMBER’, ‘sms’: u’587804’}
[2018-06-18 13:49:10,308][1117][139837171013376][WARNING][privacyidea.lib.smsprovider.HttpSMSProvider:96] can not submit message. URL is missing.
[2018-06-18 13:49:10,309][1117][139837171013376][WARNING][privacyidea.lib.tokens.smstoken:301] The PIN was correct, but the SMS could not be sent: SMSError(error_id=-1, description=‘No URL specified in the provider config.’)
[2018-06-18 13:49:10,309][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:302] Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/tokens/smstoken.py”, line 288, in create_challenge
message=message_template)
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/log.py”, line 193, in log_wrapper
f_result = func(*args, **kwds)
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/tokens/smstoken.py”, line 394, in _send_sms
ret = sms.submit_message(phone, message)
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/smsprovider/HttpSMSProvider.py”, line 97, in submit_message
raise SMSError(-1, “No URL specified in the provider config.”)
SMSError: No URL specified in the provider config.

[2018-06-18 13:49:10,309][1117][139837171013376][DEBUG][privacyidea.lib.tokens.smstoken:197] Exiting create_challenge with result (False, “The PIN was correct, but the SMS could not be sent: SMSError(error_id=-1, description=‘No URL specified in the provider config.’)”, None, {‘valid_until’: ‘2018-06-18 13:54:10.309874’, ‘state’: None})
[2018-06-18 13:49:10,310][1117][139837171013376][DEBUG][privacyidea.lib.token:197] Exiting check_token_list with result (False, {‘multi_challenge’: [], ‘message’: “The PIN was correct, but the SMS could not be sent: SMSError(error_id=-1, description=‘No URL specified in the provider config.’)”})
[2018-06-18 13:49:10,310][1117][139837171013376][DEBUG][privacyidea.lib.token:197] Exiting check_user_pass with result (False, {‘multi_challenge’: [], ‘message’: “The PIN was correct, but the SMS could not be sent: SMSError(error_id=-1, description=‘No URL specified in the provider config.’)”})
[2018-06-18 13:49:10,310][1117][139837171013376][DEBUG][privacyidea.lib.policy:185] Entering get_action_values with arguments (<privacyidea.lib.policy.PolicyClass object at 0x7f2e495a7e90>,) and keywords {‘realm’: u’realm2’, ‘client’: ‘10.10.2.4’, ‘user’: u’mliushan’, ‘resolver’: u’sql1’, ‘action’: ‘auth_max_success’, ‘scope’: ‘authorization’}
[2018-06-18 13:49:10,311][1117][139837171013376][DEBUG][privacyidea.lib.policy:185] Entering get_policies with arguments (<privacyidea.lib.policy.PolicyClass object at 0x7f2e495a7e90>,) and keywords {‘realm’: u’realm2’, ‘active’: True, ‘client’: ‘10.10.2.4’, ‘user’: u’mliushan’, ‘resolver’: u’sql1’, ‘action’: ‘auth_max_success’, ‘scope’: ‘authorization’, ‘adminrealm’: None}

SMS GATEWAY Logs
------------------------------

[2018-06-18 13:55:09,083][1117][139837112264448][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:55:09,086][1117][139837112264448][DEBUG][privacyidea.lib.user:185] Entering get_user_from_param with arguments ({u’option.text’: u’{otp}’, u’option.RETURN_SUCCESS’: u’’, u’option.to’: u’{phone}’, u’name’: u’MIBSMS’, u’providermodule’: u’privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider’, u’option.CHECK_SSL’: u’no’, u’module’: u’privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider’, u’option.HTTP_PROXY’: u’’, u’option.URL’: u’http://10.10.6.14:80/sms/index.php’, u’option.HTTP_METHOD’: u’GET’, u’option.PROXY’: u’’, u’options’: {u’URL’: u’http://10.10.6.14:80/sms/index.php’, u’text’: u’{otp}’, u’HTTP_PROXY’: u’’, u’RETURN_SUCCESS’: u’’, u’to’: u’{phone}’, u’HTTP_METHOD’: u’GET’, u’PROXY’: u’’, u’CHECK_SSL’: u’no’}, u’id’: u’2’, u’description’: u’http://10.10.6.14:80/sms/index.php’},) and keywords {}
[2018-06-18 13:55:09,087][1117][139837112264448][DEBUG][privacyidea.lib.user:185] Entering User with arguments () and keywords {‘login’: ‘’, ‘realm’: ‘’, ‘resolver’: None}
[2018-06-18 13:55:09,087][1117][139837112264448][DEBUG][privacyidea.lib.user:197] Exiting User with result
[2018-06-18 13:55:09,087][1117][139837112264448][DEBUG][privacyidea.lib.user:197] Exiting get_user_from_param with result
[2018-06-18 13:55:09,088][1117][139837112264448][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.policy.PolicyClass’> already exists.
[2018-06-18 13:55:09,089][1117][139837112264448][DEBUG][privacyidea.lib.audit:185] Entering getAudit with arguments (<Config {‘JSON_AS_ASCII’: True, ‘PI_HSM’: ‘default’, ‘PI_LOGFILE’: ‘/var/log/privacyidea/privacyidea.log’, ‘pi_hsm’: {‘obj’: <privacyidea.lib.security.default.DefaultSecurityModule object at 0x7f2e483e2f90>}, ‘PI_AUDIT_KEY_PUBLIC’: ‘/etc/privacyidea/public.pem’, ‘SQLALCHEMY_POOL_RECYCLE’: None, ‘SQLALCHEMY_ECHO’: False, ‘PI_PEPPER’: ‘pK4t7PayhmAycHVxGawsT61y’, ‘SQLALCHEMY_TRACK_MODIFICATIONS’: True, ‘SQLALCHEMY_POOL_TIMEOUT’: None, ‘SQLALCHEMY_RECORD_QUERIES’: None, ‘PI_ENCFILE’: ‘/etc/privacyidea/enckey’, ‘SESSION_COOKIE_DOMAIN’: None, ‘SESSION_COOKIE_NAME’: ‘session’, ‘pi_token_types’: [‘registration’, ‘hotp’, ‘pw’, ‘spass’, ‘paper’, ‘sms’, ‘email’, ‘sshkey’, ‘radius’, ‘yubico’, ‘motp’, ‘daplug’, ‘vasco’, ‘remote’, ‘certificate’, ‘tiqr’, ‘ocra’, ‘4eyes’, ‘totp’, ‘u2f’, ‘yubikey’, ‘question’], ‘PI_EXTERNAL_LINKS’: True, ‘SQLALCHEMY_NATIVE_UNICODE’: None, ‘MAX_CONTENT_LENGTH’: None, ‘PERMANENT_SESSION_LIFETIME’: datetime.timedelta(31), ‘SQLALCHEMY_POOL_SIZE’: None, ‘SQLALCHEMY_MAX_OVERFLOW’: None, ‘TRAP_HTTP_EXCEPTIONS’: False, ‘PRESERVE_CONTEXT_ON_EXCEPTION’: None, ‘SESSION_COOKIE_PATH’: None, ‘SQLALCHEMY_DATABASE_URI’: ‘mysql://pi:qWZs7chEnwkh@localhost/pi’, ‘LOGGER_NAME’: ‘privacyidea.app’, ‘SECRET_KEY’: ‘JqXyYjkhRgLbaTxNlm0hz6Ym’, ‘APPLICATION_ROOT’: None, ‘SERVER_NAME’: None, ‘BABEL_DEFAULT_LOCALE’: ‘en’, ‘PREFERRED_URL_SCHEME’: ‘http’, ‘TESTING’: False, ‘BABEL_DEFAULT_TIMEZONE’: ‘UTC’, ‘PI_VASCO_LIBRARY’: None, ‘USE_X_SENDFILE’: False, ‘PI_AUDIT_MODULE’: ‘privacyidea.lib.auditmodules.sqlaudit’, ‘SESSION_COOKIE_SECURE’: False, ‘SQLALCHEMY_BINDS’: None, ‘DEBUG’: False, ‘SQLALCHEMY_COMMIT_ON_TEARDOWN’: False, ‘CACHE_TYPE’: ‘simple’, ‘JSONIFY_PRETTYPRINT_REGULAR’: True, ‘PROPAGATE_EXCEPTIONS’: None, ‘PI_LOGLEVEL’: 10, ‘TRAP_BAD_REQUEST_ERRORS’: False, ‘JSON_SORT_KEYS’: True, ‘SESSION_COOKIE_HTTPONLY’: True, ‘SEND_FILE_MAX_AGE_DEFAULT’: 43200, ‘PI_AUDIT_KEY_PRIVATE’: ‘/etc/privacyidea/private.pem’, ‘SUPERUSER_REALM’: [‘super’]}>,) and keywords {}
[2018-06-18 13:55:09,090][1117][139837112264448][DEBUG][privacyidea.lib.audit:185] Entering getAuditClass with arguments (‘privacyidea.lib.auditmodules.sqlaudit’, ‘Audit’) and keywords {}
[2018-06-18 13:55:09,091][1117][139837112264448][DEBUG][privacyidea.lib.audit:76] klass: <class ‘privacyidea.lib.auditmodules.sqlaudit.Audit’>
[2018-06-18 13:55:09,092][1117][139837112264448][DEBUG][privacyidea.lib.audit:197] Exiting getAuditClass with result <class ‘privacyidea.lib.auditmodules.sqlaudit.Audit’>
[2018-06-18 13:55:09,092][1117][139837112264448][DEBUG][privacyidea.lib.auditmodules.sqlaudit:92] using the connect string mysql://pi:qWZs7chEnwkh@localhost/pi
[2018-06-18 13:55:09,093][1117][139837112264448][DEBUG][privacyidea.lib.auditmodules.sqlaudit:99] Using SQL pool_size of 20
[2018-06-18 13:55:09,094][1117][139837112264448][DEBUG][privacyidea.lib.audit:197] Exiting getAudit with result <privacyidea.lib.auditmodules.sqlaudit.Audit object at 0x7f2e318cfc50>
[2018-06-18 13:55:09,095][1117][139837112264448][DEBUG][privacyidea.lib.config:185] Entering get_from_config with arguments (‘OverrideAuthorizationClient’,) and keywords {}
[2018-06-18 13:55:09,096][1117][139837112264448][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:55:09,099][1117][139837112264448][DEBUG][privacyidea.lib.config:197] Exiting get_from_config with result None
[2018-06-18 13:55:09,100][1117][139837112264448][DEBUG][privacyidea.api.smsgateway:185] Entering set_gateway with arguments () and keywords {}
[2018-06-18 13:55:09,100][1117][139837112264448][DEBUG][privacyidea.lib.policy:185] Entering get_policies with arguments (<privacyidea.lib.policy.PolicyClass object at 0x7f2e495a7e90>,) and keywords {‘realm’: None, ‘active’: True, ‘client’: ‘10.10.2.4’, ‘user’: u’admin’, ‘resolver’: None, ‘action’: ‘smsgateway_write’, ‘scope’: ‘admin’, ‘adminrealm’: u’’}

[2018-06-18 13:55:09,213][1117][139837112264448][DEBUG][privacyidea.api.smsgateway:197] Exiting set_gateway with result <Response 180 bytes [200 OK]>
[2018-06-18 13:55:09,222][1117][139837120657152][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:55:09,225][1117][139837120657152][DEBUG][privacyidea.api.lib.utils:245] Can not get param: No JSON object could be decoded
[2018-06-18 13:55:09,225][1117][139837120657152][DEBUG][privacyidea.lib.user:185] Entering get_user_from_param with arguments ({},) and keywords {}
[2018-06-18 13:55:09,228][1117][139837120657152][DEBUG][privacyidea.lib.user:185] Entering User with arguments () and keywords {‘login’: ‘’, ‘realm’: ‘’, ‘resolver’: None}
[2018-06-18 13:55:09,229][1117][139837120657152][DEBUG][privacyidea.lib.user:197] Exiting User with result
[2018-06-18 13:55:09,230][1117][139837120657152][DEBUG][privacyidea.lib.user:197] Exiting get_user_from_param with result
[2018-06-18 13:55:09,230][1117][139837120657152][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.policy.PolicyClass’> already exists.
[2018-06-18 13:55:09,228][1117][139837112264448][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:55:09,235][1117][139837120657152][DEBUG][privacyidea.lib.audit:185] Entering getAudit with arguments (<Config {‘JSON_AS_ASCII’: True, ‘PI_HSM’: ‘default’, ‘PI_LOGFILE’: ‘/var/log/privacyidea/privacyidea.log’, ‘pi_hsm’: {‘obj’: <privacyidea.lib.security.default.DefaultSecurityModule object at 0x7f2e483e2f90>}, ‘PI_AUDIT_KEY_PUBLIC’: ‘/etc/privacyidea/public.pem’, ‘SQLALCHEMY_POOL_RECYCLE’: None, ‘SQLALCHEMY_ECHO’: False, ‘PI_PEPPER’: ‘pK4t7PayhmAycHVxGawsT61y’, ‘SQLALCHEMY_TRACK_MODIFICATIONS’: True, ‘SQLALCHEMY_POOL_TIMEOUT’: None, ‘SQLALCHEMY_RECORD_QUERIES’: None, ‘PI_ENCFILE’: ‘/etc/privacyidea/enckey’, ‘SESSION_COOKIE_DOMAIN’: None, ‘SESSION_COOKIE_NAME’: ‘session’, ‘pi_token_types’: [‘registration’, ‘hotp’, ‘pw’, ‘spass’, ‘paper’, ‘sms’, ‘email’, ‘sshkey’, ‘radius’, ‘yubico’, ‘motp’, ‘daplug’, ‘vasco’, ‘remote’, ‘certificate’, ‘tiqr’, ‘ocra’, ‘4eyes’, ‘totp’, ‘u2f’, ‘yubikey’, ‘question’], ‘PI_EXTERNAL_LINKS’: True, ‘SQLALCHEMY_NATIVE_UNICODE’: None, ‘MAX_CONTENT_LENGTH’: None, ‘PERMANENT_SESSION_LIFETIME’: datetime.timedelta(31), ‘SQLALCHEMY_POOL_SIZE’: None, ‘SQLALCHEMY_MAX_OVERFLOW’: None, ‘TRAP_HTTP_EXCEPTIONS’: False, ‘PRESERVE_CONTEXT_ON_EXCEPTION’: None, ‘SESSION_COOKIE_PATH’: None, ‘SQLALCHEMY_DATABASE_URI’: ‘mysql://pi:qWZs7chEnwkh@localhost/pi’, ‘LOGGER_NAME’: ‘privacyidea.app’, ‘SECRET_KEY’: ‘JqXyYjkhRgLbaTxNlm0hz6Ym’, ‘APPLICATION_ROOT’: None, ‘SERVER_NAME’: None, ‘BABEL_DEFAULT_LOCALE’: ‘en’, ‘PREFERRED_URL_SCHEME’: ‘http’, ‘TESTING’: False, ‘BABEL_DEFAULT_TIMEZONE’: ‘UTC’, ‘PI_VASCO_LIBRARY’: None, ‘USE_X_SENDFILE’: False, ‘PI_AUDIT_MODULE’: ‘privacyidea.lib.auditmodules.sqlaudit’, ‘SESSION_COOKIE_SECURE’: False, ‘SQLALCHEMY_BINDS’: None, ‘DEBUG’: False, ‘SQLALCHEMY_COMMIT_ON_TEARDOWN’: False, ‘CACHE_TYPE’: ‘simple’, ‘JSONIFY_PRETTYPRINT_REGULAR’: True, ‘PROPAGATE_EXCEPTIONS’: None, ‘PI_LOGLEVEL’: 10, ‘TRAP_BAD_REQUEST_ERRORS’: False, ‘JSON_SORT_KEYS’: True, ‘SESSION_COOKIE_HTTPONLY’: True, ‘SEND_FILE_MAX_AGE_DEFAULT’: 43200, ‘PI_AUDIT_KEY_PRIVATE’: ‘/etc/privacyidea/private.pem’, ‘SUPERUSER_REALM’: [‘super’]}>,) and keywords {}
[2018-06-18 13:55:09,236][1117][139837120657152][DEBUG][privacyidea.lib.audit:185] Entering getAuditClass with arguments (‘privacyidea.lib.auditmodules.sqlaudit’, ‘Audit’) and keywords {}
[2018-06-18 13:55:09,236][1117][139837120657152][DEBUG][privacyidea.lib.audit:76] klass: <class ‘privacyidea.lib.auditmodules.sqlaudit.Audit’>
[2018-06-18 13:55:09,237][1117][139837120657152][DEBUG][privacyidea.lib.audit:197] Exiting getAuditClass with result <class ‘privacyidea.lib.auditmodules.sqlaudit.Audit’>
[2018-06-18 13:55:09,238][1117][139837120657152][DEBUG][privacyidea.lib.auditmodules.sqlaudit:92] using the connect string mysql://pi:qWZs7chEnwkh@localhost/pi
[2018-06-18 13:55:09,239][1117][139837120657152][DEBUG][privacyidea.lib.auditmodules.sqlaudit:99] Using SQL pool_size of 20
[2018-06-18 13:55:09,239][1117][139837120657152][DEBUG][privacyidea.lib.audit:197] Exiting getAudit with result <privacyidea.lib.auditmodules.sqlaudit.Audit object at 0x7f2e3182f450>
[2018-06-18 13:55:09,237][1117][139837112264448][DEBUG][privacyidea.api.lib.utils:245] Can not get param: No JSON object could be decoded
[2018-06-18 13:55:09,242][1117][139837112264448][DEBUG][privacyidea.lib.user:185] Entering get_user_from_param with arguments ({},) and keywords {}
[2018-06-18 13:55:09,243][1117][139837112264448][DEBUG][privacyidea.lib.user:185] Entering User with arguments () and keywords {‘login’: ‘’, ‘realm’: ‘’, ‘resolver’: None}
[2018-06-18 13:55:09,244][1117][139837112264448][DEBUG][privacyidea.lib.user:197] Exiting User with result
[2018-06-18 13:55:09,245][1117][139837112264448][DEBUG][privacyidea.lib.user:197] Exiting get_user_from_param with result
[2018-06-18 13:55:09,244][1117][139837120657152][DEBUG][privacyidea.lib.config:185] Entering get_from_config with arguments (‘OverrideAuthorizationClient’,) and keywords {}
[2018-06-18 13:55:09,246][1117][139837120657152][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:55:09,245][1117][139837112264448][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.policy.PolicyClass’> already exists.
[2018-06-18 13:55:09,250][1117][139837112264448][DEBUG][privacyidea.lib.audit:185] Entering getAudit with arguments (<Config {‘JSON_AS_ASCII’: True, ‘PI_HSM’: ‘default’, ‘PI_LOGFILE’: ‘/var/log/privacyidea/privacyidea.log’, ‘pi_hsm’: {‘obj’: <privacyidea.lib.security.default.DefaultSecurityModule object at 0x7f2e483e2f90>}, ‘PI_AUDIT_KEY_PUBLIC’: ‘/etc/privacyidea/public.pem’, ‘SQLALCHEMY_POOL_RECYCLE’: None, ‘SQLALCHEMY_ECHO’: False, ‘PI_PEPPER’: ‘pK4t7PayhmAycHVxGawsT61y’, ‘SQLALCHEMY_TRACK_MODIFICATIONS’: True, ‘SQLALCHEMY_POOL_TIMEOUT’: None, ‘SQLALCHEMY_RECORD_QUERIES’: None, ‘PI_ENCFILE’: ‘/etc/privacyidea/enckey’, ‘SESSION_COOKIE_DOMAIN’: None, ‘SESSION_COOKIE_NAME’: ‘session’, ‘pi_token_types’: [‘registration’, ‘hotp’, ‘pw’, ‘spass’, ‘paper’, ‘sms’, ‘email’, ‘sshkey’, ‘radius’, ‘yubico’, ‘motp’, ‘daplug’, ‘vasco’, ‘remote’, ‘certificate’, ‘tiqr’, ‘ocra’, ‘4eyes’, ‘totp’, ‘u2f’, ‘yubikey’, ‘question’], ‘PI_EXTERNAL_LINKS’: True, ‘SQLALCHEMY_NATIVE_UNICODE’: None, ‘MAX_CONTENT_LENGTH’: None, ‘PERMANENT_SESSION_LIFETIME’: datetime.timedelta(31), ‘SQLALCHEMY_POOL_SIZE’: None, ‘SQLALCHEMY_MAX_OVERFLOW’: None, ‘TRAP_HTTP_EXCEPTIONS’: False, ‘PRESERVE_CONTEXT_ON_EXCEPTION’: None, ‘SESSION_COOKIE_PATH’: None, ‘SQLALCHEMY_DATABASE_URI’: ‘mysql://pi:qWZs7chEnwkh@localhost/pi’, ‘LOGGER_NAME’: ‘privacyidea.app’, ‘SECRET_KEY’: ‘JqXyYjkhRgLbaTxNlm0hz6Ym’, ‘APPLICATION_ROOT’: None, ‘SERVER_NAME’: None, ‘BABEL_DEFAULT_LOCALE’: ‘en’, ‘PREFERRED_URL_SCHEME’: ‘http’, ‘TESTING’: False, ‘BABEL_DEFAULT_TIMEZONE’: ‘UTC’, ‘PI_VASCO_LIBRARY’: None, ‘USE_X_SENDFILE’: False, ‘PI_AUDIT_MODULE’: ‘privacyidea.lib.auditmodules.sqlaudit’, ‘SESSION_COOKIE_SECURE’: False, ‘SQLALCHEMY_BINDS’: None, ‘DEBUG’: False, ‘SQLALCHEMY_COMMIT_ON_TEARDOWN’: False, ‘CACHE_TYPE’: ‘simple’, ‘JSONIFY_PRETTYPRINT_REGULAR’: True, ‘PROPAGATE_EXCEPTIONS’: None, ‘PI_LOGLEVEL’: 10, ‘TRAP_BAD_REQUEST_ERRORS’: False, ‘JSON_SORT_KEYS’: True, ‘SESSION_COOKIE_HTTPONLY’: True, ‘SEND_FILE_MAX_AGE_DEFAULT’: 43200, ‘PI_AUDIT_KEY_PRIVATE’: ‘/etc/privacyidea/private.pem’, ‘SUPERUSER_REALM’: [‘super’]}>,) and keywords {}

[2018-06-18 13:55:09,257][1117][139837112264448][DEBUG][privacyidea.lib.config:185] Entering get_from_config with arguments (‘OverrideAuthorizationClient’,) and keywords {}
[2018-06-18 13:55:09,258][1117][139837112264448][DEBUG][privacyidea.lib.config:72] The singleton <class ‘privacyidea.lib.config.ConfigClass’> already exists.
[2018-06-18 13:55:09,256][1117][139837120657152][DEBUG][privacyidea.lib.smtpserver:197] Exiting get_smtpservers with result [<privacyidea.lib.smtpserver.SMTPServer object at 0x7f2e3187e210>]
[2018-06-18 13:55:09,262][1117][139837120657152][DEBUG][privacyidea.api.smsgateway:197] Exiting get_gateway with result <Response 4261 bytes [200 OK]>
[2018-06-18 13:55:09,265][1117][139837112264448][DEBUG][privacyidea.lib.config:197] Exiting get_from_config with result None
[2018-06-18 13:55:09,265][1117][139837112264448][DEBUG][privacyidea.api.smsgateway:185] Entering get_gateway with arguments () and keywords {‘gwid’: u’undefined’}


#4

You have no url!

File “/usr/lib/python2.7/dist-packages/privacyidea/lib/smsprovider/HttpSMSProvider.py”, line 97, in submit_message
raise SMSError(-1, “No URL specified in the provider config.”)
SMSError: No URL specified in the provider config.

See here: https://github.com/privacyidea/privacyidea/blob/v2.22.2/privacyidea/lib/smsprovider/HttpSMSProvider.py#L97

You probably configured an SMS Gateway but you did not go to Config->Token->SMS and tell privacyIDEA which SMS config to use for SMS tokens.
This is why you get this error message:

[2018-06-18 13:55:09,265][1117][139837112264448][DEBUG][privacyidea.api.smsgateway:185] Entering get_gateway with arguments () and keywords {‘gwid’: u’undefined’}

Background: You can define several SMS gateways. BUt you also need to define, which SMS gateway you want to use for SMS tokens. SMS gateways can also be used for other purposes like notification.


#5

wow … That worked like a charm… thanks alot…