Hi all!
After installation and configuration of privacyIdea in Apache Server, when i try to log as admin at webUI, the application returns:
500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
I followed this guide for installation: guide
When I read privacyidea.log i saw this:
[2022-04-07 08:29:57,250][17740][140490512025344][ERROR][privacyidea.app:1892] Exception on /auth [POST]
Traceback (most recent call last):
File "/opt/privacyidea/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/opt/privacyidea/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/privacyidea/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/opt/privacyidea/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/opt/privacyidea/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/privacyidea/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/api/lib/prepolicy.py", line 155, in policy_wrapper
return wrapped_function(*args, **kwds)
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/api/lib/prepolicy.py", line 155, in policy_wrapper
return wrapped_function(*args, **kwds)
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/api/lib/prepolicy.py", line 155, in policy_wrapper
return wrapped_function(*args, **kwds)
[Previous line repeated 1 more time]
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/api/lib/postpolicy.py", line 109, in policy_wrapper
response = wrapped_function(*args, **kwds)
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/api/lib/postpolicy.py", line 109, in policy_wrapper
response = wrapped_function(*args, **kwds)
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/api/lib/postpolicy.py", line 109, in policy_wrapper
response = wrapped_function(*args, **kwds)
[Previous line repeated 3 more times]
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/lib/event.py", line 100, in event_wrapper
f_result = func(*args, **kwds)
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/api/auth.py", line 351, in get_auth_token
g.client_ip)
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/lib/log.py", line 155, in log_wrapper
return func(*args, **kwds)
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/lib/policy.py", line 1196, in ui_get_rights
rights = get_static_policy_definitions(scope)
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/lib/log.py", line 155, in log_wrapper
return func(*args, **kwds)
File "/opt/privacyidea/lib/python3.7/site-packages/privacyidea/lib/policy.py", line 2285, in get_static_policy_definitions
"the authentication of the user will be denied.").format(AUTHORIZED.DENY),
ValueError: expected ':' after conversion specifier
If I use Postman or Curl, the response is 200 OK.
Files:
/etc/privacyidea/privacyideaapp.wsgi:
import sys
sys.stdout = sys.stderr
from privacyidea.app import create_app
# Now we can select the config file:
application = create_app(config_name="production", config_file="/etc/privacyidea/pi.cfg")
Thanks all!!!