You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation, a connection to an existing ( working) LDAP server (tested with OpenLDAP and LLDAP) was set up.
When trying to log in a new user from the LDAP directory, the error message “Something went wrong” appears.
I have attached the corresponding logs.
At the same time, the LDAP server log shows that no connection attempt was made by the Mealie instance. No attempt was made to query the user in LDAP.
The behavior also occurs if the user is previously created via the Mealie user administration and the authentication method is manually set to “LDAP”.
Steps to Reproduce
Set up a connection to an LDAP server
Try to log in to Mealie with an authorized user from the LDAP directory
Notice that there is an error message
Please provide relevant logs
[INFO|httptools_impl|L468] 2024-10-24T20:23:32: 127.0.0.1:51388 - "GET /api/app/about HTTP/1.1" 200
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_begin with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_field with data[59:78]
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_value with data[80:106]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_header_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_headers_finished with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_part_data with data[110:125]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_begin with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_field with data[186:205]
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_value with data[207:233]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_header_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_headers_finished with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_part_data with data[237:249]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_begin with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_field with data[310:329]
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_value with data[331:360]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_header_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_headers_finished with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_part_data with data[364:369]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_end with no data
[INFO|httptools_impl|L468] 2024-10-24T20:23:52: 10.80.80.102:52138 - "POST /api/auth/token HTTP/1.1" 500
[ERROR|httptools_impl|L406] 2024-10-24T20:23:52: Exception in ASGI application
Traceback (most recent call last):
File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call
return await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/applications.py", line 113, in call
await self.middleware_stack(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 187, in call
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 165, in call
await self.app(scope, receive, _send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/sessions.py", line 85, in call
await self.app(scope, receive, send_wrapper)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 20, in call
await responder(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 39, in call
await self.app(scope, receive, self.send_with_gzip)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 715, in call
await self.middleware_stack(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 735, in app
await route.handle(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 73, in app
response = await f(request)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 301, in app
raw_response = await run_endpoint_function(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/app/mealie/routes/auth/auth.py", line 69, in get_token
auth = auth_provider.authenticate()
File "/app/mealie/core/security/providers/ldap_provider.py", line 33, in authenticate
user = self.get_user()
File "/app/mealie/core/security/providers/ldap_provider.py", line 120, in get_user
conn.set_option(ldap.OPT_X_TLS_NEWCTX, 0)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/ldap/ldapobject.py", line 698, in set_option
return self._ldap_call(self._l.set_option,option,invalue)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/ldap/ldapobject.py", line 128, in _ldap_call
result = func(*args,**kwargs)
ValueError: option error
Mealie Version
Details
Version: nightly
Build: b5643a9
Anwendungsmodus: Produktivumgebung
Demostatus: Keine Demo
API-Port: 9000
API Dokumentation: Aktiviert
Datenbanktyp: postgres
Standardhaushalt: Family
Rezept Scraper Version: 15.2.1
Checks
Sichere Website: Nein
Serverseitige Basis-URL: Ja
LDAP bereit: Ja
OIDC bereit: Nein
OpenAI bereit: Nein
E-Mail konfiguriert: Ja
First Check
What is the issue you are experiencing?
According to the documentation, a connection to an existing ( working) LDAP server (tested with OpenLDAP and LLDAP) was set up.
When trying to log in a new user from the LDAP directory, the error message “Something went wrong” appears.
I have attached the corresponding logs.
At the same time, the LDAP server log shows that no connection attempt was made by the Mealie instance. No attempt was made to query the user in LDAP.
The behavior also occurs if the user is previously created via the Mealie user administration and the authentication method is manually set to “LDAP”.
Steps to Reproduce
Please provide relevant logs
[INFO|httptools_impl|L468] 2024-10-24T20:23:32: 127.0.0.1:51388 - "GET /api/app/about HTTP/1.1" 200
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_begin with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_field with data[59:78]
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_value with data[80:106]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_header_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_headers_finished with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_part_data with data[110:125]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_begin with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_field with data[186:205]
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_value with data[207:233]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_header_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_headers_finished with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_part_data with data[237:249]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_begin with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_field with data[310:329]
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_header_value with data[331:360]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_header_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_headers_finished with no data
[DEBUG|multipart|L624] 2024-10-24T20:23:52: Calling on_part_data with data[364:369]
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_part_end with no data
[DEBUG|multipart|L627] 2024-10-24T20:23:52: Calling on_end with no data
[INFO|httptools_impl|L468] 2024-10-24T20:23:52: 10.80.80.102:52138 - "POST /api/auth/token HTTP/1.1" 500
[ERROR|httptools_impl|L406] 2024-10-24T20:23:52: Exception in ASGI application
Traceback (most recent call last):
File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call
return await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/applications.py", line 113, in call
await self.middleware_stack(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 187, in call
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 165, in call
await self.app(scope, receive, _send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/sessions.py", line 85, in call
await self.app(scope, receive, send_wrapper)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 20, in call
await responder(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 39, in call
await self.app(scope, receive, self.send_with_gzip)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 715, in call
await self.middleware_stack(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 735, in app
await route.handle(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 73, in app
response = await f(request)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 301, in app
raw_response = await run_endpoint_function(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/app/mealie/routes/auth/auth.py", line 69, in get_token
auth = auth_provider.authenticate()
File "/app/mealie/core/security/providers/ldap_provider.py", line 33, in authenticate
user = self.get_user()
File "/app/mealie/core/security/providers/ldap_provider.py", line 120, in get_user
conn.set_option(ldap.OPT_X_TLS_NEWCTX, 0)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/ldap/ldapobject.py", line 698, in set_option
return self._ldap_call(self._l.set_option,option,invalue)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/ldap/ldapobject.py", line 128, in _ldap_call
result = func(*args,**kwargs)
ValueError: option error
Mealie Version
Details
Version: nightly
Build: b5643a9
Anwendungsmodus: Produktivumgebung
Demostatus: Keine Demo
API-Port: 9000
API Dokumentation: Aktiviert
Datenbanktyp: postgres
Standardhaushalt: Family
Rezept Scraper Version: 15.2.1
Checks
Sichere Website: Nein
Serverseitige Basis-URL: Ja
LDAP bereit: Ja
OIDC bereit: Nein
OpenAI bereit: Nein
E-Mail konfiguriert: Ja
Deployment
Unraid
Additional Deployment Details
docker run
-d
--name='Mealie'
--net='br0'
--ip='10.10.10.47'
--pids-limit 2048
-e TZ="Europe/Berlin"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="HOSTNAME"
-e HOST_CONTAINERNAME="Mealie"
-e 'TCP_PORT_9000'='3000'
-e 'ALLOW_SIGNUP'='false'
-e 'DEFAULT_EMAIL'='mealie@example.com'
-e 'SMTP_FROM_EMAIL'='mail@example.com'
-e 'SMTP_HOST'='mail.example.com'
-e 'SMTP_USER'='mail@example.com'
-e 'SMTP_PASSWORD'='EMAILPASSWORD'
-e 'SMTP_PORT'='587'
-e 'BASE_URL'='https://mealie.example.com'
-e 'LDAP_AUTH_ENABLED'='true'
-e 'LDAP_SERVER_URL'='ldap://10.10.10.49:3890'
-e 'LDAP_TLS_INSECURE'='true'
-e 'LDAP_TLS_CACERTFILE'='none'
-e 'LDAP_ENABLE_STARTTLS'='false'
-e 'LDAP_BASE_DN'='ou=people,dc=example,dc=com'
-e 'LDAP_QUERY_BIND'='cn=mealie_bind_user,ou=people,dc=example,dc=com'
-e 'LDAP_QUERY_PASSWORD'='LDAPPASSWORD'
-e 'LDAP_USER_FILTER'='(memberof=cn=mealie_users,ou=groups,dc=example,dc=com)'
-e 'LDAP_ADMIN_FILTER'='(memberof=cn=mealie_admins,ou=groups,dc=example,dc=com)'
-e 'LDAP_ID_ATTRIBUTE'='uid'
-e 'LDAP_NAME_ATTRIBUTE'='displayName'
-e 'LDAP_MAIL_ATTRIBUTE'='mail'
-e 'DEFAULT_GROUP'='Home'
-e 'PUID'='99'
-e 'PGID'='100'
-e 'WEB_CONCURRENCY'='1'
-e 'MAX_WORKERS'='1'
-e 'DB_ENGINE'='postgres'
-e 'POSTGRES_USER'='mealie'
-e 'POSTGRES_PASSWORD'='POSTGRESPASSWORD'
-e 'POSTGRES_SERVER'='10.10.10.46'
-e 'POSTGRES_PORT'='5432'
-e 'POSTGRES_DB'='mealie'
-e 'SMTP_AUTH_STRATEGY'='TLS'
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.webui='http://[IP]:[PORT:9000]'
-l net.unraid.docker.icon='https://raw.githubusercontent.com/selfhosters/unRAID-CA-templates/master/templates/img/mealiev1.png'
-v '/mnt/user/appdata/mealie':'/app/data':'rw' 'ghcr.io/mealie-recipes/mealie:nightly'
The text was updated successfully, but these errors were encountered: