nscd reported as down on fresh install

mvandemar

Well-Known Member
Jun 17, 2006
103
22
168
I just performed a fresh install on a brand new vps and am running the trial license of cpanel. I went through everything, logged in to whm, configured the contact email and resolvers, and then rebooted as that is what the dashboard was prompting me to do. I haven't done anything else. I received an email after rebooting indicating that nscd was down. I restarted nscd and checked, and it appears to be running:

Code:
[[email protected] ~]# /scripts/restartsrv_nscd
Waiting for “nscd” to restart ………waiting for “nscd” to initialize ………finished.

Service Status
   nscd (/usr/sbin/nscd) is running as nscd with PID 12559 (systemd+/proc check method).

Startup Log
   Jan 04 22:04:29 vps.myserver.com systemd[1]: Starting Name Service Cache Daemon...
   Jan 04 22:04:29 vps.myserver.com systemd[1]: Started Name Service Cache Daemon.

nscd restarted successfully.
[[email protected] ~]# ps aux | grep nscd
nscd     12559  0.0  0.0 737984  1644 ?        Ssl  22:04   0:00 /usr/sbin/nscd
root     12624  0.0  0.0 112708   976 pts/0    S+   22:05   0:00 grep --color=auto nscd
However, in whm under Server Status -> Service Status it's still showing as being down. I grepped through the logs but didn't see anything helpful (all of these are from >20 minutes prior to receiving the email notification):


Code:
[[email protected] ~]# grep "nscd" /var/log/messages
Jan  4 21:26:47 vps yum[26106]: Installed: nscd-2.17-260.el7.x86_64
Jan  4 21:37:53 vps nscd: 32305 monitoring file `/etc/passwd` (1)
Jan  4 21:37:53 vps nscd: 32305 monitoring directory `/etc` (2)
Jan  4 21:37:53 vps nscd: 32305 monitoring file `/etc/group` (3)
Jan  4 21:37:53 vps nscd: 32305 monitoring directory `/etc` (2)
Jan  4 21:37:53 vps nscd: 32305 monitoring file `/etc/hosts` (4)
Jan  4 21:37:53 vps nscd: 32305 monitoring directory `/etc` (2)
Jan  4 21:37:53 vps nscd: 32305 monitoring file `/etc/resolv.conf` (5)
Jan  4 21:37:53 vps nscd: 32305 monitoring directory `/etc` (2)
Jan  4 21:37:53 vps nscd: 32305 monitoring file `/etc/services` (6)
Jan  4 21:37:53 vps nscd: 32305 monitoring directory `/etc` (2)
Jan  4 21:37:53 vps nscd: 32305 disabled inotify-based monitoring for file `/etc/netgroup': No such file or directory
Jan  4 21:37:53 vps nscd: 32305 stat failed for file `/etc/netgroup'; will try again later: No such file or directory
Jan  4 21:37:53 vps nscd: 32305 Access Vector Cache (AVC) started
Any ideas? Thanks.

Edit: Literally the instant I created the thread, I got the email that it was back up. Is the Service Status page only updated periodically? Still wondering if there's a way to debug why it happened.

-Michael
 

El Directo

Member
Jan 4, 2019
5
1
1
San Antonio
cPanel Access Level
DataCenter Provider
"
[[email protected] ~]# grep "nscd" /var/log/messages
Jan 4 21:26:47 vps yum[26106]: Installed: nscd-2.17-260.el7.x86_64
"

It would appear that since the recent yum update for the nscd package took place, the service was down temporarily and chkservd noticed then fired a "service down" warning for it.

There don't appear to be any issues with nscd starting or noted errors, so I wouldn't worry about it from here. I've never yet heard of a way to identify the cause of chkservd reporting a service outage directly except for checking for error conditions in the stalled service which you did correctly.

Edit: Found your answer!

"By default, the chkservd driver checks each service every five minutes to determine the service's status."
Source: TailWatch - cPanel Knowledge Base - cPanel Documentation
 
Last edited:

CBG

Active Member
Apr 23, 2010
39
2
58
cPanel Access Level
Root Administrator
Hi,

I am having the same issue as well, I installed a fresh 15 day trial license for a few days while I try the server out. I am running on an OVH Cloud server KVM.

On the Service Status Page it says:
nscd 2.17-260 down

[[email protected] ~]# /scripts/restartsrv_nscd
Waiting for “nscd” to restart ………waiting for “nscd” to initialize ………finished.

Service Status
nscd (/usr/sbin/nscd) is running as nscd with PID 13717 (systemd+/proc check method).

Startup Log
Jan 06 18:41:04 sophie.example.com systemd[1]: Starting Name Service Cache Daemon...
Jan 06 18:41:04 sophie.example.com systemd[1]: Started Name Service Cache Daemon.

nscd restarted successfully.

[[email protected] ~]# ps aux | grep nscd
nscd 13717 0.0 0.0 402108 1364 ? Ssl 18:41 0:00 /usr/sbin/nscd
root 13731 0.0 0.0 112708 976 pts/0 S+ 18:41 0:00 grep --color=auto nscd

[[email protected] ~]# grep "nscd" /var/log/messages
Jan 6 17:00:11 sophie yum[4238]: Installed: nscd-2.17-260.el7.x86_64
Jan 6 17:10:55 sophie nscd: 9894 monitoring file `/etc/passwd` (1)
Jan 6 17:10:55 sophie nscd: 9894 monitoring directory `/etc` (2)
Jan 6 17:10:55 sophie nscd: 9894 monitoring file `/etc/group` (3)
Jan 6 17:10:55 sophie nscd: 9894 monitoring directory `/etc` (2)
Jan 6 17:10:55 sophie nscd: 9894 monitoring file `/etc/hosts` (4)
Jan 6 17:10:55 sophie nscd: 9894 monitoring directory `/etc` (2)
Jan 6 17:10:55 sophie nscd: 9894 monitoring file `/etc/resolv.conf` (5)
Jan 6 17:10:55 sophie nscd: 9894 monitoring directory `/etc` (2)
Jan 6 17:10:55 sophie nscd: 9894 monitoring file `/etc/services` (6)
Jan 6 17:10:55 sophie nscd: 9894 monitoring directory `/etc` (2)
Jan 6 17:10:55 sophie nscd: 9894 disabled inotify-based monitoring for file `/etc/netgroup': No such file or directory
Jan 6 17:10:55 sophie nscd: 9894 stat failed for file `/etc/netgroup'; will try again later: No such file or directory
[[email protected] ~]#
 
Last edited by a moderator:

El Directo

Member
Jan 4, 2019
5
1
1
San Antonio
cPanel Access Level
DataCenter Provider
Hi Garry,

Before I make the suggestion that this may be the same thing as above, I'd like to rule something out. In your situation it isn't clear whether or not the NSC Daemon (nscd) was only down at the time you checked or whether you've been receiving multiple warnings that the service is offline. Is nscd running continuously, and this was just a single hiccup? Or is nscd staying down until you manually restart it?

Can you post the results of this command?

grep -i 'nscd' /var/log/chkservd.log
 

CBG

Active Member
Apr 23, 2010
39
2
58
cPanel Access Level
Root Administrator
Here is the requested info:
Code:
[[email protected] ~]# grep -i 'nscd' /var/log/chkservd.log
Loading services .....apache_php_fpm....cpanellogd....cpdavd....cphulkd....cpsrvd....crond....dnsadmin....exim....ftpd....httpd....imap....ipaliases....lmtp....mailman....mysql....named....nscd....pop....queueprocd....rsyslogd....spamd....sshd..Done
nscd [too soon after restart to check]...
Loading services .....apache_php_fpm....cpanellogd....cpdavd....cphulkd....cpsrvd....crond....dnsadmin....exim....ftpd....httpd....imap....ipaliases....lmtp....mailman....mysql....named....nscd....pop....queueprocd....rsyslogd....spamd....sshd..Done
nscd [[check command:-][check command output:(XID fpvs99) The “nscd” service is down.
The subprocess “/usr/local/cpanel/scripts/restartsrv_nscd” reported error number 3 when it ended.][socket connect:N/A][fail count:1]Restarting nscd....
[notify:failed service:nscd]]...
Loading services .....apache_php_fpm....cpanellogd....cpdavd....cphulkd....cpsrvd....crond....dnsadmin....exim....ftpd....httpd....imap....ipaliases....lmtp....mailman....mysql....named....nscd....pop....queueprocd....rsyslogd....spamd....sshd..Done
nscd [[check command:+][socket connect:N/A][notify:recovered service:nscd]]...
Loading services .....apache_php_fpm....clamd....cpanellogd....cpdavd....cphulkd....cpsrvd....crond....dnsadmin....exim....ftpd....httpd....imap....ipaliases....lmtp....mailman....mysql....named....nscd....pop....queueprocd....rsyslogd....spamd....sshd..Done
nscd [[check command:+][socket connect:N/A]]...
- Snipped -
[[email protected] ~]#
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,254
313
Houston
HI @CBG

The output doesn't really help answer the question. All that shows is that chksrvd sees that it went down then, that it was recovered. Have you experienced issues with it since then?


Thanks!
 

CBG

Active Member
Apr 23, 2010
39
2
58
cPanel Access Level
Root Administrator
Hi,

No more issues and it has been working fine, I noticed the next day it was Up.
As I just brought the server up, it was a major rush to get it sorted.
 
  • Like
Reactions: cPanelLauren