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, cron & nscd + Debian 10 - One of the most difficult issues I have ever encountered #336

Closed
abclution opened this issue Dec 2, 2021 · 4 comments

Comments

@abclution
Copy link

abclution commented Dec 2, 2021

This is not exactly a bug report per se, but something that perhaps someone more knowledgeable can chime in.

This is a Virtualmin GPL Debian 10 server, setup as per the Virtualmin LDAP instructions.

I have had an issue with cron running reliably.. could not figure it out. DNS resigning was failing and well pretty much everything cron related was unreliable at best.

Tried debugging this via cron logs, test cron jobs and more for the longest time. Cron would be "running", no errors, nothing in the log file, but jobs would not execute. If I restarted cron, the jobs would execute for 5-10 minutes to a couple hours, and then stop executing again.

I gave up on figuring it out for a long time. This was a long term standing issue that I attempted many times to debug wtf is going on.

Eventually I revisited the issue this last October and managed to resolve it.. this random IBM support page gave me a clue in what to try.

https://www.ibm.com/support/pages/node/464079

The page mentions an issue with LDAP hosts and cron not working properly. The fix on that page, is to enable nscd. Thats funny I don't remember disabling nscd to begin with but, I enabled it again and what do you know, months and months debugging and cron was working again.

*sigh

I couldn't remember ever disabling it.. fast forward to last month. I did a virtualmin Re-Check Configuration.

image

Warning - the name service caching daemon (NSCD) is running on your system. This may prevent Virtualmin from properly creating new Unix users and groups. You can disable NSCD in the Bootup and Shutdown Actions module.

Low and behold, at some point in the past when setting up this machine, I as a good boy, followed the Virtualmin recommended setting of disabling ncsd..which broke my cron.

Its a good thing Webmin has its own scheduling system.

@jcameron
Copy link
Collaborator

jcameron commented Dec 3, 2021

Wow, surprising that nscd is needed for cron to work! We expected that it is just a cache, and the recommendation to disable it was based on the caching sometimes causing new users to not show up.

@jcameron
Copy link
Collaborator

jcameron commented Dec 3, 2021

Anyway, I suspect that the old NSCD bugs that caused us to recommend disabling it have long since been fixed - so I will remove that recommendation.

webmin pushed a commit that referenced this issue Dec 3, 2021
@abclution
Copy link
Author

Don't know myself.
I think the important take-away is that ncsd at the very least should not be turned off if using LDAP, believe its specifically ldap + ncsd + cron.

@jcameron
Copy link
Collaborator

jcameron commented Dec 4, 2021

Ok, I've updated the config check to not recommend turning up NCSD.

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

No branches or pull requests

2 participants