Page 1 of 1

NCPA listener timing out on LDAP enabled RHEL servers

Posted: Fri Aug 09, 2019 12:33 pm
by meganwilliford
We are running into an issue when installing ncpa 2.1.7 on RHEL servers. This exact issue which says was resolved in 2.1.7: https://github.com/NagiosEnterprises/ncpa/issues/523.

We have the below set in the config file but it is still walking the NFS mounted filesystem:
exclude_fs_types = aufs,autofs,binfmt_misc,cifs,cgroup,configfs,debugfs,devpts,devtmpfs,encryptfs,efivarfs,fuse,fusectl,hugetlbfs,mqueue,nfs,overlayfs,proc,pstore,rpc_pipefs,securityfs,selinuxfs,smb,sysfs,tmpfs,tracefs

The NCPA installs, but cannot start the listener. The listener is walking the NFS mounted filesystem and it looks like it runs as root which has no privileges in the remote filesystems. It sees a directory entry and tries to get to that file or directory, not sure which, and cannot see it. After about 5 minutes of walking the tree the listener dies.
There must be a way to config ncpa to NOT walk the tree or at least not walk remote filesystem tree.
We have a lot of servers with over 320 remote mounts and some with over a 1000.
The first thing it does is attempt to create a group called nagios, and most of these systems are LDAP enabled, so it attempts to create the group in LDAP, which fails.

Are there any other workarounds to this?

Re: NCPA listener timing out on LDAP enabled RHEL servers

Posted: Fri Aug 09, 2019 12:58 pm
by meganwilliford
Example of errors from log of when listener is trying to start:

Aug 8 14:16:28 <servername> ncpa_passive: ERROR:root:[Errno 2] No such file or directory: '/net/...
Aug 8 14:16:28 <servername> ncpa_passive: Traceback (most recent call last):
Aug 8 14:16:28 <servername> ncpa_passive: File "/root/ncpa/agent/listener/psapi.py", line 59, in make_mountpoint_nodes
Aug 8 14:16:28 <servername> ncpa_passive: OSError: [Errno 2] No such file or directory: '/net/...
Aug 8 14:16:32 <servername> ncpa_listener: ERROR:root:[Errno 2] No such file or directory: '/net/...
Aug 8 14:16:32 <servername> ncpa_listener: Traceback (most recent call last):
Aug 8 14:16:32 <servername> ncpa_listener: File "/root/ncpa/agent/listener/psapi.py", line 59, in make_mountpoint_nodes
Aug 8 14:16:32 <servername> ncpa_listener: OSError: [Errno 2] No such file or directory: '/net/...
Aug 8 14:16:35 <servername> ncpa_passive: ERROR:root:[Errno 2] No such file or directory: '/net/...
Aug 8 14:16:35 <servername> ncpa_passive: Traceback (most recent call last):
Aug 8 14:16:35 <servername> ncpa_passive: File "/root/ncpa/agent/listener/psapi.py", line 59, in make_mountpoint_nodes
Aug 8 14:16:35 <servername> ncpa_passive: OSError: [Errno 2] No such file or directory: '/net/...
Aug 8 14:16:35 <servername> ncpa_listener: ERROR:root:[Errno 2] No such file or directory: '/net/...
Aug 8 14:16:35 <servername> ncpa_listener: Traceback (most recent call last):
Aug 8 14:16:35 <servername> ncpa_listener: File "/root/ncpa/agent/listener/psapi.py", line 59, in make_mountpoint_nodes
Aug 8 14:16:35 <servername> ncpa_listener: OSError: [Errno 2] No such file or directory: '/net/...
Aug 8 14:16:35 <servername> ncpa_listener: ERROR:root:[Errno 2] No such file or directory: '/net/...
Aug 8 14:16:35 <servername> ncpa_listener: Traceback (most recent call last):
Aug 8 14:16:35 <servername> ncpa_listener: File "/root/ncpa/agent/listener/psapi.py", line 59, in make_mountpoint_nodes
Aug 8 14:16:35 <servername> ncpa_listener: OSError: [Errno 2] No such file or directory: '/net/...

Re: NCPA listener timing out on LDAP enabled RHEL servers

Posted: Fri Aug 09, 2019 2:39 pm
by cdienger
Please provide a copy of the ncpa.cfg file as well as the output of these commands run on a RHEL server where you're seeing this behavior:

Code: Select all

python
>>> import psutil
>>> psutil.disk_partitions(all=True)

Re: NCPA listener timing out on LDAP enabled RHEL servers

Posted: Thu Aug 15, 2019 7:17 am
by meganwilliford
Thanks for replying. I sent a private message with the output and config file.

Re: NCPA listener timing out on LDAP enabled RHEL servers

Posted: Thu Aug 15, 2019 2:23 pm
by cdienger
I've not been able to reproduce the issue with the configuration provided or otherwise. What log are you seeing these messages in exactly?

Install the psutil module and try running the psutil.disk_partitions(all=True) command again:

Code: Select all

yum install python-pip
pip install psutil
python
import psutil
psutil.disk_partitions(all=True)