LDAP connectivity issues on startup cause fatal initialization error when passwordDB=LDAP
Somewhat related to #1496 (closed)
Concerned version
Version: 2.0.9
Summary
What works:
- Configure Auth=UserDB=LDAP
- Stop LDAP server
- Restart LLNG
- LLNG displays the login form, but cannot login
- Start LDAP server
- LLNG can now login
What doesn't work:
- Configure passwordDB=LDAP
- stop ldap server
- restart LLNG
- LLNG fails to initialized
- Start LDAP server
- LLNG still fails
- LLNG must be restarted before it finally works
Logs
Dec 07 15:20:49 lemontest LLNG[30666]: [error] Connection refused
Dec 07 15:20:49 lemontest LLNG[30666]: [error] LDAP initialization error:
Dec 07 15:20:49 lemontest LLNG[30666]: [error]
...
Dec 07 15:20:49 lemontest LLNG[30666]: [error] Underlying object can't load conf (Lemonldap::NG::Portal::Main->reloadConf)
Dec 07 15:20:49 lemontest LLNG[30666]: [error] Initialization failed: Unable to protect this server ()
Dec 07 15:20:49 lemontest LLNG[30666]: [error] Initialization failed! Enable debug logs, reload your web server and catch main error...
Possible fixes
Call ::Lib::LDAP::init in Password/LDAP.pm instead of trying to allocate a ldap object directly