LemonLdap Bricked: Server error

I am getting the error Initialization failed! Enable debug logs, reload your web server and catch main error… on my new LemonLdap Instance.

Before this occured, i was trying to figure out where to change logo, then later on began setting the sso auth keys on the server.

Removing and re-installing LLNG does not seem to fix the issue. i cant access the web manager.

Yeah, I did that a few times myself. Try rolling back to an earlier LLNG config file–they’re in /var/lib/lemonldap-ng/conf/. Just delete (or move out of that directory) the highest-numbered one (or however many there are since you started messing with the settings), restart Apache, and you should be set.

glad you faced similar challenges, was starting to wonder.

now am getting this after removing those files

 Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.

Hopefully not all the config files. If Apache’s failing to start, check its error log and the system log for errors.

oh boy… i deleted all the files in that folder…

Not sure what would have made you think that was the way ahead, but that’s the reason Apache won’t start. You’ll need to recover at least the lmConf-1.json file, and then re-run the lemon_config.sh script. If you don’t have a saved copy of that file, reinstalling LLNG is the only way I know of to get it.

yum removing and yum installing llng results in

[root@nethserver-ad opc]# /root/lemon_config.sh
sed: can't read /var/lib/lemonldap-ng/conf/lmConf-1.json: No such file or directory
sed: can't read /var/lib/lemonldap-ng/conf/lmConf-1.json: No such file or directory
sed: can't read /var/lib/lemonldap-ng/conf/lmConf-1.json: No such file or directory
grep: /var/lib/lemonldap-ng/conf/lmConf-1.json: No such file or directory
Adding cfgDate property to lmConf-1.json
sed: can't read /var/lib/lemonldap-ng/conf/lmConf-1.json: No such file or directory
Unable to build Lemonldap::NG::Common::Conf Directory "/var/lib/lemonldap-ng/conf" does not exis      t !
Unable to build Lemonldap::NG::Common::Conf Directory "/var/lib/lemonldap-ng/conf" does not exis      t !
Unable to build Lemonldap::NG::Common::Conf Directory "/var/lib/lemonldap-ng/conf" does not exis      t !
Unable to build Lemonldap::NG::Common::Conf Directory "/var/lib/lemonldap-ng/conf" does not exis      t !
Unable to build Lemonldap::NG::Common::Conf Directory "/var/lib/lemonldap-ng/conf" does not exis      t !
Unable to build Lemonldap::NG::Common::Conf Directory "/var/lib/lemonldap-ng/conf" does not exis      t !
Unable to build Lemonldap::NG::Common::Conf Directory "/var/lib/lemonldap-ng/conf" does not exis      t !
Unable to build Lemonldap::NG::Common::Conf Directory "/var/lib/lemonldap-ng/conf" does not exis      t !
Job for httpd.service invalid.

Why does it say no File or Directory. and yet its a new installation?

You need to give a lot more specifics about what, exactly, you’ve done. How, for example, did you install it in the first place? If you’d followed the instructions on the wiki, you wouldn’t have had the problem with the yum repo. If you’d followed my instructions to remove the highest-numbered config file, Apache would likely start just fine. And now you say you’ve removed and reinstalled llng–what, exactly, did you remove and reinstall? Using what commands, exactly? Is the /var/lib/lemonldap-ng/conf/ directory present at all?

No, it isn’t–it’s an installation with who-knows-what residual cruft from whatever you’ve done previously with it. And since I know you haven’t been following the docs, I have no idea what that cruft might be.

I restored the server to before llng was installed.
which means to a snaphost of 2 days back. installed llng,
and now when i load the manager page, we are back to the begining. i went to the directy you mentioned, and removed the highest number config, restarted httpd, but same thing.

[root@nethserver-ad opc]# ls /var/lib/lemonldap-ng/conf/
lmConf-10.json  lmConf-13.json  lmConf-16.json  lmConf-2.json  lmConf-5.json  lmConf-8.json
lmConf-11.json  lmConf-14.json  lmConf-17.json  lmConf-3.json  lmConf-6.json  lmConf-9.json
lmConf-12.json  lmConf-15.json  lmConf-1.json   lmConf-4.json  lmConf-7.json
[root@nethserver-ad opc]# rm -rf lmConf-17.json
[root@nethserver-ad opc]# systemctl restart httpd
[root@nethserver-ad opc]#

Since this command is being run in whatever the opc directory is, rather than in /var/lib/lemonldap-ng/conf/, it won’t have any effect on the files there.

so, solution being?

I don’t know, maybe try deleting the file from the directory in which it actually exists?

but why would it re-occur yet it was a new installation? from a snaphost that llng was not even installed

I don’t have any idea what “it” would be here. I’m pretty sure the default installation method doesn’t generate 17 versions of the config file, which would mean that you’ve made further edits to it.

I have managed to figure out how to remove the items. so there is only suppsoed to be one file right

the multiple file copied appeared due to initiating this script more than once

/root/lemon_config.sh

Now its much better.

[opc@nethserver-ad ~]$ sudo ls /var/lib/lemonldap-ng/conf/
lmConf-1.json  lmConf-3.json  lmConf-5.json  lmConf-7.json  lmConf-9.json
lmConf-2.json  lmConf-4.json  lmConf-6.json  lmConf-8.json

but now am getting redirect error

A new copy of the config file is saved every time you save config changes. The lemon_config.sh script saves four times, so the “normal” result of a fresh installation would be to have five config files. But any further changes you make, either through the manager or through the LLNG CLI, will result in a new file. On my “production” LLNG box, I have 24. I could delete some of the old ones, but there doesn’t seem to be much point.

Ok, thats understood.

Now what causes the redirect error

I don’t know, space aliens maybe? What settings have you changed? What are you trying to do when you get that error?

Hello @danb35 i managed to install using the enw script you sent.
i am however getting this error on the dashboard page.
Abnormal error from LDAP server

how can this be resolved?

Starting with a lot more information about your setup. For a few suggestions:

  • Have you ever been able to log in to this LLNG instance?
  • If so, what changes have you made to its configuration since that time?
  • What is the account provider on this system?
  • Are there any relevant errors in the logs? I’d expect them in Apache’s error.log.