# [SOLVED] nscd initscript fails to start

## cfgauss

I have sys-libs/glibc-2.15-r2 installed (which evidently installed /etc/init.d/nscd) on an amd64 system. The nscd initscript fails with this error in /var/log/messages:

```
Oct 15 12:52:22 localhost /etc/init.d/nscd[16796]: start-stop-daemon: caught an interrupt

Oct 15 12:52:22 localhost /etc/init.d/nscd[16796]: start-stop-daemon: /usr/sbin/nscd died

Oct 15 12:52:22 localhost nscd: 16798 cannot stat() file `/var/db/passwd.db': No such file or directory

Oct 15 12:52:22 localhost nscd: 16798 cannot stat() file `/var/db/group.db': No such file or directory

Oct 15 12:52:22 localhost /etc/init.d/nscd[16784]: ERROR: nscd failed to start

```

Any debugging hints would be gratefully received.

[SOLVED] Both  consolekit  and  nscd  failed to start (see below) with errors from the  start-stop-daemon  of   openrc . Yesterday I emerged  openrc-0.11.5 and all is well with both. [/SOLVED]Last edited by cfgauss on Sun Nov 25, 2012 2:12 pm; edited 1 time in total

----------

## trubicoid

try to edit /etc/nscd.conf and comment all the passwd and group options, I don't think you are using them anyway

----------

## cfgauss

 *trubicoid wrote:*   

> try to edit /etc/nscd.conf and comment all the passwd and group options, I don't think you are using them anyway

 

I don't think I am, either. So I commented them out. Now I'm left with this in /var/log/messages:

```
Oct 27 12:11:47 localhost /etc/init.d/nscd[2799]: start-stop-daemon: caught an interrupt

Oct 27 12:11:47 localhost /etc/init.d/nscd[2799]: start-stop-daemon: /usr/sbin/nscd died

Oct 27 12:11:47 localhost /etc/init.d/nscd[2784]: ERROR: nscd failed to start
```

Any ideas?

----------

## trubicoid

ok, the warnings I had are gone. you have different problem.

have you tried to re-emerge glibc? my glibc version is 2.15-r3 on amd64

do you have exotic CFLAGS, etc?

have you tried revdep-rebuild?

what does nscd do, if you run directly from command-line? does it complain about some libraries?

----------

## cfgauss

 *trubicoid wrote:*   

> have you tried to re-emerge glibc? my glibc version is 2.15-r3 on amd64
> 
> do you have exotic CFLAGS, etc?
> 
> have you tried revdep-rebuild?
> ...

 

I re-emerged glibc-2.15-r3 on my amd64 system but this didn't help.

In /etc/make.conf for my Intel quad-core system:

```
CFLAGS="-march=nocona -O2 -pipe"
```

I revdep-rebuild weekly when I emerge.

```
# /usr/sbin/nscd

/usr/sbin/nscd: already running
```

but rc-status shows nscd as stopped.

In fact, rc-status shows both nscd and consolekit as stopped even though /var/run has entries for both nscd and ConsoleKit.

In /var/log/rc.log:

```
* Starting ConsoleKit daemon ...

 * start-stop-daemon: did not create a valid pid in `/var/run/ConsoleKit/pid'

 [ !! ]

 * ERROR: consolekit failed to start

...

* Starting Name Service Cache Daemon ...

 * start-stop-daemon: caught an interrupt

 * start-stop-daemon: /usr/sbin/nscd died

 [ !! ]

 * ERROR: nscd failed to start

```

I have the stable version openrc-0.9.8.4 which provides start-stop-daemon. 

Would emerging an unstable version be a solution to my consolekit and nscd problems?

----------

## trubicoid

 *cfgauss wrote:*   

> 
> 
> ```
> # /usr/sbin/nscd
> 
> ...

 

and is it really ruining, or is there only a stale pid file in /var/run ?

```
ps aux | grep nscd
```

if it is not running, remove the pid file and try again

if it is running just kill it and try to run again

 *cfgauss wrote:*   

> 
> 
> I have the stable version openrc-0.9.8.4 which provides start-stop-daemon. 
> 
> Would emerging an unstable version be a solution to my consolekit and nscd problems?

 

my stable openrc is 0.11.5 now

----------

## lkraav

Make sure NOT to have --background in the start-stop-daemon --start line.

----------

