You are not logged in.

#1 2013-02-01 15:50:36

quayasil
Member
Registered: 2008-11-09
Posts: 102

nss_ldap and systemd = 5 min. freeze when booting up

Spent a lot of time on debugging why with initscripts everything works fine while with systemd my system experiences a 5 min. freeze during boot-up. Finally found it - my /etc/nsswitch.conf is as follows:

passwd: files ldap
group: files ldap
shadow: files ldap

publickey: files

hosts: dns files 
networks: dns files

protocols: files
services: files
ethers: files
rpc: files

netgroup: files

Note that `files' precede `ldap'! Unfortunately systemd hangs on trying to connect to ldap server too early and it results in long freeeeeeze. I need ldap in nss. I don't need systemd but I have to use it in Arch :-( Any idea how I can manage it?

Offline

#2 2013-02-05 09:31:42

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: nss_ldap and systemd = 5 min. freeze when booting up

systemd should work with nss_ldap, so this is either a configuration error or a bug.

The most likely reason for this is that your local passwd/group/shadow lacks an entry used during early boot (maybe by udev?), this is not supported as the system will then try to connect to ldap to get the entry (which will not work as your network will not be up and running yet).

Have a look in your journalctl to see if you can get any detailed error messages.

Offline

#3 2013-02-05 18:59:54

quayasil
Member
Registered: 2008-11-09
Posts: 102

Re: nss_ldap and systemd = 5 min. freeze when booting up

tomegun wrote:

systemd should work with nss_ldap, so this is either a configuration error or a bug.

The most likely reason for this is that your local passwd/group/shadow lacks an entry used during early boot (maybe by udev?), this is not supported as the system will then try to connect to ldap to get the entry (which will not work as your network will not be up and running yet).

Have a look in your journalctl to see if you can get any detailed error messages.

I've just figured out that `passwd' and `shadow' entries don't matter. The problem is caused by the line:

group: files ldap

only. I compared `/etc/group.pacnew' and `/etc/group'. I'm not missing any groups.

My journal entries are as follows:

Feb 04 11:17:30 localhost systemd[1]: RTC configured in localtime, applying delta of 60 minutes to system time.
Feb 04 11:17:30 localhost systemd[1]: systemd 197 running in system mode. (+PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GC
Feb 04 11:17:30 localhost systemd[1]: No hostname configured.
Feb 04 11:17:30 localhost systemd[1]: Set hostname to <localhost>.
Feb 04 11:17:30 localhost systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service f
Feb 04 11:17:30 localhost systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
Feb 04 11:17:30 localhost systemd[1]: Started Forward Password Requests to Wall Directory Watch.
Feb 04 11:17:30 localhost systemd[1]: Starting Arch Daemons.
Feb 04 11:17:30 localhost systemd[1]: Reached target Arch Daemons.
Feb 04 11:17:30 localhost systemd[1]: Starting Remote File Systems.
Feb 04 11:17:30 localhost systemd[1]: Reached target Remote File Systems.
Feb 04 11:17:30 localhost systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
Feb 04 11:17:30 localhost systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
Feb 04 11:17:30 localhost systemd[1]: Starting Delayed Shutdown Socket.
Feb 04 11:17:30 localhost systemd[1]: Listening on Delayed Shutdown Socket.
Feb 04 11:17:30 localhost systemd[1]: Starting Dispatch Password Requests to Console Directory Watch.
Feb 04 11:17:30 localhost systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
Feb 04 11:17:30 localhost systemd[1]: Starting Encrypted Volumes.
Feb 04 11:17:30 localhost systemd[1]: Reached target Encrypted Volumes.
Feb 04 11:17:30 localhost systemd[1]: Starting udev Kernel Socket.
Feb 04 11:17:30 localhost systemd[1]: Listening on udev Kernel Socket.
Feb 04 11:17:30 localhost systemd[1]: Starting udev Control Socket.
Feb 04 11:17:30 localhost systemd[1]: Listening on udev Control Socket.
Feb 04 11:17:30 localhost systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
Feb 04 11:17:30 localhost systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
Feb 04 11:17:30 localhost systemd[1]: Starting Swap.
Feb 04 11:17:30 localhost systemd[1]: Reached target Swap.
Feb 04 11:17:30 localhost systemd[1]: Starting Journal Socket.
Feb 04 11:17:30 localhost systemd[1]: Listening on Journal Socket.
Feb 04 11:17:30 localhost systemd[1]: Started File System Check on Root Device.
Feb 04 11:17:30 localhost systemd[1]: Starting Remount Root and Kernel File Systems...
Feb 04 11:17:30 localhost systemd[1]: Mounting Debug File System...
Feb 04 11:17:30 localhost systemd[1]: Started Set Up Additional Binary Formats.
Feb 04 11:17:30 localhost systemd[1]: Mounting POSIX Message Queue File System...
Feb 04 11:17:30 localhost systemd[1]: Starting udev Kernel Device Manager...
Feb 04 11:17:30 localhost systemd[1]: Starting Load Kernel Modules...
Feb 04 11:17:30 localhost systemd[1]: Starting Apply Kernel Variables...
Feb 04 11:17:30 localhost systemd[1]: Starting udev Coldplug all Devices...
Feb 04 11:17:30 localhost systemd[1]: Mounting Huge Pages File System...
Feb 04 11:17:30 localhost systemd[1]: Starting Setup Virtual Console...
Feb 04 11:17:30 localhost systemd[1]: Starting Journal Service...
Feb 04 11:17:30 localhost systemd[1]: Started Journal Service.
Feb 04 11:17:30 localhost systemd-journal[184]: Journal started
Feb 04 11:17:30 localhost systemd[1]: Started Apply Kernel Variables.
Feb 04 11:17:31 localhost kernel: FS-Cache: Loaded
Feb 04 11:17:31 localhost kernel: RPC: Registered named UNIX socket transport module.
Feb 04 11:17:31 localhost kernel: RPC: Registered udp transport module.
Feb 04 11:17:31 localhost kernel: RPC: Registered tcp transport module.
Feb 04 11:17:31 localhost kernel: RPC: Registered tcp NFSv4.1 backchannel transport module.
Feb 04 11:17:31 localhost systemd-modules-load[179]: Inserted module 'nfs'
Feb 04 11:17:31 localhost kernel: FS-Cache: Netfs 'nfs' registered for caching
Feb 04 11:17:31 localhost systemd-udevd[178]: starting version 197
Feb 04 11:17:31 localhost kernel: EXT4-fs (sda2): re-mounted. Opts: (null)
Feb 04 11:17:31 localhost systemd[1]: nss_ldap: failed to bind to LDAP server ldaps://194.29.178.3/: Can't contact LDAP server
Feb 04 11:17:31 localhost systemd[1]: nss_ldap: failed to bind to LDAP server ldaps://194.29.178.12/: Can't contact LDAP server
Feb 04 11:17:31 localhost systemd[1]: nss_ldap: reconnecting to LDAP server (sleeping 1 seconds)...
Feb 04 11:17:32 localhost systemd[1]: nss_ldap: failed to bind to LDAP server ldaps://194.29.178.3/: Can't contact LDAP server
Feb 04 11:17:32 localhost systemd[1]: nss_ldap: failed to bind to LDAP server ldaps://194.29.178.12/: Can't contact LDAP server

The problem can be masked by adding the following undocumented entries to `/etc/nss_ldap.conf':

nss_reconnect_tries 2
nss_reconnect_sleeptime 1
nss_reconnect_maxsleeptime 1
nss_reconnect_maxconntries 1

But it only masks but not solves the problem.

Offline

#4 2013-02-09 12:36:35

quayasil
Member
Registered: 2008-11-09
Posts: 102

Re: nss_ldap and systemd = 5 min. freeze when booting up

The most wonderful thing: this critical bug has been known for approx 4 years...
https://bugzilla.redhat.com/show_bug.cgi?id=502072

Offline

Board footer

Powered by FluxBB