You are not logged in.
Pages: 1
There seems to be a serious problem when using nss_ldap. I initially thought I had rooted my system because uDev just hung on for ages and finally died, and I eventually got booted into single-user mode with no idea how to fix the problem.
It turned out that removing nss_ldap solved the problem, reason being that when LDAP is being used to convert filesystem UIDs to real names, it is not available when uDev starts (hey, the network isn't even up yet).
Is this a known problem, and how do I fix it?
Offline
I still want to use nss_ldap, I just don't want it disabling my system.
Offline
Is it possible to start nss_ldap AFTER udev ?
Added :
Since nss_ldap uses openldap and openldap is a daemon, it should be possible to start udev before openldap.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
There's a bind_timelimit and a bind_policy option in the nss_ldap.conf file. You could try to play with these.
Offline
This has been driving me nuts, I posted a bug report about it a while ago here: http://bugs.archlinux.org/task/3369
The first thing to note is that it only hangs when trying to access ldap group information. So if you disable group ldap stuff it will still work for users. I know this isn't ideal, but the workaround is to re-enable group stuff after the system has booted.
Offline
alexmat can you point to the udev version when this first broke? Perhaps the solution is not so hard and we can patch our systems until the package is fixed again.
Offline
It's been a while and I honestly don't remember which version of udev broke it (also I'm not positive it's a udev issue, it could be something in the init scripts or something else entirely).
Edit: It is a UDEV issue :?
The way I'm doing things right now is as follows:
1.) add rw to my kernel boot line
2.) in rc.sysinit I added the following before udev startup: cp /etc/nsswitch.file /etc/nsswitch.conf
3.) in rc.sysinit I added the following after udev startup: cp /etc/nsswitch.ldap /etc/nsswitch.conf
The nsswitch.file file is just the default nsswitch config, the ldap one has all my ldap settings. I know this is dirty and it breaks everytime I update initscripts (I just have to readd the two line to rc.sysinit).
But I'm a relative noob at this so if anyone has a better solution let me know.
Offline
thanks for the tip!
Offline
I've updated the bug report with some research I did, maybe getting more eyeballs on this will help:
After a ton of headaches and hours upon hours of googling I think I found the problem. I was using a workaround to rewrite the nsswitch.conf file on every reboot before udev came up, but for some reason the new kernel with initrd wouldn't allow the workstations to mount the root partition rw before udev came up even though I put the rw swtich in menu.lst.
Ok that's all history now because I got sick of finding workarounds for workarounds. I dug into udev and found what causes it to halt. It is indeed trying to resolve with an ldap server thats active, but on the network, and since the network services don't start without udev it becomes a cyclical dependancy.
However, udev worked just fine a few updates ago so what happened? udev.rules assignes devices to groups using numbers... that is until recently, now half the rules are numbers and half are names. I switched all group names to their nuemerical mappings and Viola! everything is smooth again.
I don't know how to resolve this in a clean manner for UDEV and LDAP. Putting in numbers instead of group names is a chore and not all systems may use the same mappings (although I would think most people stick with the default group mappings). However I can't imagine how NSS_LDAP can work with the current UDEV, because the system insists on timing out waiting for a LDAP server it's never going to reach.
I did a man on nsswitch.conf and there were some interesting bits in there about switches like TRYAGAIN and UNAVAIL, however, I could not get any of them to make UDEV skip the LDAP entry in the nsswitch.conf on boot.
There must be a nice way to do this that I am overlooking. Help me Obi Judd Kenobi! You're my only hope ;P
Offline
Doh! How did I miss JGC's post:
There's a bind_timelimit and a bind_policy option in the nss_ldap.conf file. You could try to play with these.
Maybe this will help. I'll try it today time permiting. 8)
Offline
it looks like things work again without need for the tweak. my system uses udev-068-5 and things are working.
Offline
The way I'm doing things right now is as follows:
1.) add rw to my kernel boot line
2.) in rc.sysinit I added the following before udev startup: cp /etc/nsswitch.file /etc/nsswitch.conf
3.) in rc.sysinit I added the following after udev startup: cp /etc/nsswitch.ldap /etc/nsswitch.conf
I aded the rw to my kernel boot line in grub but it still doesnt mount it rw so im still stuck w/o a clean boot. Is there anything else i should do for really mounting the filesystem rw ?
Offline
Just change the bind_policy from hard to soft and your problem will be gone. With a hard bind_policy, nss_ldap can wait very long until your LDAP server is up again, which never happens because your system isn't booted again.
I've seen this bug on debian too where openldap gets stopped, a useraccount is created for openldap and openldap is started again on upgrade. While openldap is stopped, creation of the useraccount isn't possible with bind_policy set to hard.
Offline
I believe that this could lead to some other problems since, aparently, the client machine would stop trying to connect after the first fail.
Since i couldn't mount / rw while booting my box, i decided to copy a nsswitch.conf w/o ldap in rc.shutdown before / is mounted ro, and copy it back in rc.sysinit after / is mouted rw.
I hope some serious nss_ldap official patch comes out some day with better documentation.
Offline
This was still a problem for me recently. I found that using the undocumented LDAP options "nss_reconnect_tries", "nss_reconnect_sleeptime", "nss_reconnect_maxsleeptime" and "nss_reconnect_maxconntries" to work quite well.
I found these out via this post:
JABBER: krayon -A-T- chat.qdnx.org
E-MAIL: archlinuxforums -A-T- quadronyx.org
WEB: http://www.qdnx.org/krayon/
~o~
Offline
Why not set the /etc/nsswitch.conf file to first lookup the local group and passwd files and only then to lookup the ldap... That way udev (and other services) should have all the system users/groups it needs to start/work ?
I think the syntax would be:
passwd: files ldap
group: files ldap
Am I missing something here??
Offline
Pages: 1