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

ldap_write_support not working with nextcloud 29.0.0.19 #740

Open
mrdrmmn opened this issue May 19, 2024 · 5 comments
Open

ldap_write_support not working with nextcloud 29.0.0.19 #740

mrdrmmn opened this issue May 19, 2024 · 5 comments

Comments

@mrdrmmn
Copy link

mrdrmmn commented May 19, 2024

I'm new to nextcloud and have a fresh install of 29.0.0.19 with and ldap backend for users. authentication is working as expected and verified to be coming from LDAP. When I enable ldap_write_support, I immediately start seeing the following errors in my logs:

{"reqId":"pS4lTGpVaUwGwesjMBNL","level":4,"time":"2024-05-19T18:52:26+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"--","app":"no app in context","method":"GET","url":"/remote.php/dav/","message":"Could not boot user_ldap: No LDAP provider is available","userAgent":"Nextcloud Server Crawler","version":"29.0.0.19","exception":{"Exception":"Exception","Message":"No LDAP provider is available","Code":0,"Trace":[{"file":"/mnt/data/var/nextcloud/html/lib/private/Server.php","line":1083,"function":"getLDAPProvider","class":"OC\\LDAP\\NullLDAPProviderFactory","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":175,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/data/var/nextcloud/html/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"offsetGet","class":"Pimple\\Container","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/ServerContainer.php","line":173,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":445,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":96,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":120,"function":"array_map"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":128,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":470,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":442,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":96,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":120,"function":"array_map"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":128,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":470,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/ServerContainer.php","line":155,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/EventDispatcher/ServiceEventListener.php","line":70,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/mnt/data/var/nextcloud/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/mnt/data/var/nextcloud/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/EventDispatcher/EventDispatcher.php","line":98,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/mnt/data/var/nextcloud/html/apps/user_ldap/lib/AppInfo/Application.php","line":143,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":66,"function":"OCA\\User_LDAP\\AppInfo\\{closure}","class":"OCA\\User_LDAP\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Bootstrap/BootContext.php","line":50,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->"},{"file":"/mnt/data/var/nextcloud/html/apps/user_ldap/lib/AppInfo/Application.php","line":147,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\BootContext","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":200,"function":"boot","class":"OCA\\User_LDAP\\AppInfo\\Application","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/App/AppManager.php","line":437,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/App/AppManager.php","line":216,"function":"loadApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/mnt/data/var/nextcloud/html/lib/private/legacy/OC_App.php","line":128,"function":"loadApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/mnt/data/var/nextcloud/html/remote.php","line":155,"function":"loadApps","class":"OC_App","type":"::"}],"File":"/mnt/data/var/nextcloud/html/lib/private/LDAP/NullLDAPProviderFactory.php","Line":36,"message":"Could not boot user_ldap: No LDAP provider is available","exception":{},"CustomMessage":"Could not boot user_ldap: No LDAP provider is available"}}

But I do in fact have an LDAP provider configured and working.

I've been digging into the code and have not been able to determine what the exact problem is. I suspect maybe things have changed in nextcloud that have caused this to become an issue as I am sure others have been working just fine.

I'll continue to poke and it and if I can find a solution, I will update this.

@mrdrmmn
Copy link
Author

mrdrmmn commented May 19, 2024

This demonstrates a valid config:

# sudo -u www-data php occ ldap:test-config s01
The configuration is valid and the connection could be established!
# sudo -u www-data php occ ldap:check-user test
The user is still available on LDAP.

But any attempts to modify the password of an ldap user (sudo -u www-data php occ user:resetpassword test) generates the same error as provided in the initial report.

Let me know if there is anything I can do to provide better/more helpful detail.

@Beerlesklopfer
Copy link

Beerlesklopfer commented Jul 7, 2024

I can confirm this with 29.0.3. The log is flooded with these errors, although there are no functional restrictions. It affects those users that are created as SQL/local.

{"reqId":"68bdmL8tuep3bqFHtZ1E","level":4,"time":"2024-07-08T00:16:41+02:00","remoteAddr":"2003:c8:9710:4200:64:77de:1605:1ca8","user":"PC-TECHNIK","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Could not boot user_ldap: No LDAP provider is available","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0","version":"29.0.3.4","exception":{"Exception":"Exception","Message":"No LDAP provider is available","Code":0,"Trace":[{"file":"/[...]/nextcloud-29.0.0/lib/private/Server.php","line":1086,"function":"getLDAPProvider","class":"OC\\LDAP\\NullLDAPProviderFactory","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Utility/SimpleContainer.php","line":175,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/[...]/nextcloud-29.0.0/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"offsetGet","class":"Pimple\\Container","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/ServerContainer.php","line":173,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":446,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Utility/SimpleContainer.php","line":96,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Utility/SimpleContainer.php","line":83,"function":"array_map"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Utility/SimpleContainer.php","line":128,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":471,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":443,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Utility/SimpleContainer.php","line":96,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Utility/SimpleContainer.php","line":83,"function":"array_map"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Utility/SimpleContainer.php","line":128,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":471,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/ServerContainer.php","line":155,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/EventDispatcher/ServiceEventListener.php","line":70,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/[...]/nextcloud-29.0.0/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/[...]/nextcloud-29.0.0/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/EventDispatcher/EventDispatcher.php","line":98,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/[...]/nextcloud-29.0.0/apps/user_ldap/lib/AppInfo/Application.php","line":143,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":45,"function":"OCA\\User_LDAP\\AppInfo\\{closure}","class":"OCA\\User_LDAP\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Bootstrap/BootContext.php","line":50,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->"},{"file":"/[...]/nextcloud-29.0.0/apps/user_ldap/lib/AppInfo/Application.php","line":124,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\BootContext","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/AppFramework/Bootstrap/Coordinator.php","line":200,"function":"boot","class":"OCA\\User_LDAP\\AppInfo\\Application","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/App/AppManager.php","line":437,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/App/AppManager.php","line":216,"function":"loadApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/[...]/nextcloud-29.0.0/lib/private/legacy/OC_App.php","line":128,"function":"loadApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/[...]/nextcloud-29.0.0/ocs/v1.php","line":54,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/[...]/nextcloud-29.0.0/ocs/v2.php","line":23,"args":["/[...]/nextcloud-29.0.0/ocs/v1.php"],"function":"require_once"}],"File":"/[...]/nextcloud-29.0.0/lib/private/LDAP/NullLDAPProviderFactory.php","Line":36,"message":"Could not boot user_ldap: No LDAP provider is available","exception":[],"CustomMessage":"Could not boot user_ldap: No LDAP provider is available"},"id":"668b13cf8771a"}

@susnux
Copy link
Contributor

susnux commented Aug 19, 2024

What is the value of ldapProviderFactory in your config?

@come-nc
Copy link
Collaborator

come-nc commented Aug 19, 2024

I cannot reproduce on latest main branch with server master. Did not test on 29.

@come-nc
Copy link
Collaborator

come-nc commented Sep 17, 2024

@mrdrmmn @Beerlesklopfer We need details on the situation to find the source of the problem because we are not able to reproduce it.
Without answers I will close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants