Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Internal Server Error" on the UI when logging in. #78

Closed
nfabas opened this issue Aug 6, 2021 · 4 comments
Closed

"Internal Server Error" on the UI when logging in. #78

nfabas opened this issue Aug 6, 2021 · 4 comments
Labels

Comments

@nfabas
Copy link

nfabas commented Aug 6, 2021

Description

I am using CKAN 2.9.2 on Ubuntu 20. I followed the instructions but cannot login as any of the user in the LDAP-Database. Instead, I get an "Internal Server Error" on the UI.

Expected Behaviour
An LDAP-User should be able to login.

Error Log
Here is from the uwsgi logs:

Traceback (most recent call last):
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/ckan/default/src/ckanext-ldap/ckanext/ldap/routes/login.py", line 35, in login_handler
    ldap_user_dict = find_ldap_user(login)
  File "/usr/lib/ckan/default/src/ckanext-ldap/ckanext/ldap/lib/search.py", line 25, in find_ldap_user
    cnx = ldap.initialize(toolkit.config['ckanext.ldap.uri'], bytes_mode=False,
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/python_ldap-3.0.0-py3.8-linux-x86_64.egg/ldap/functions.py", line 85, in initialize
    return LDAPObject(uri,trace_level,trace_file,trace_stack_limit,bytes_mode)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/python_ldap-3.0.0-py3.8-linux-x86_64.egg/ldap/ldapobject.py", line 104, in __init__
    self._l = ldap.functions._ldap_function_call(ldap._ldap_module_lock,_ldap.initialize,uri)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/python_ldap-3.0.0-py3.8-linux-x86_64.egg/ldap/functions.py", line 55, in _ldap_function_call
    result = func(*args,**kwargs)
ldap.LDAPError: (0, 'Error')

Your Setup

  • CKAN version: 2.9.2
  • Commit/version of this repo: 3.0.0
  • Browser (if relevant): Firefox
@nfabas nfabas added the bug label Aug 6, 2021
@alycejenni
Copy link
Member

Hi! This looks like an error coming from LDAP, so have you double-checked all your configuration settings?

@nfabas
Copy link
Author

nfabas commented Aug 9, 2021

Here is my config.

ckanext.ldap.uri = someuri.com
ckanext.ldap.base_dn = ou=example,ou=services,dc=comp,dc=org,dc=com
ckanext.ldap.search.filter = cn=*{login}*
ckanext.ldap.username = cn
ckanext.ldap.email = mail
ckanext.ldap.auth.password = ###
ckanext.ldap.debug_level = 255

I suspect this might have to do with this other issue #74 but I am not sure. I don't know how to debug that.

@alycejenni
Copy link
Member

You need to add the ldap:// or ldaps:// prefix to the URI :)

@nfabas
Copy link
Author

nfabas commented Aug 9, 2021

This is a fake URI but still it is missing from the real one. Thank for the tip!

@nfabas nfabas closed this as completed Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants