Our team is looking into intermittent issues where NCPA services do not start on Linux because the prior PID file still exists after a reboot. The ncpa.cfg is configured to put both the pid files and associated log files, for ncpa_passive & listener, in var/run/ncpa_..., which is putting the the files in /usr/local/ncpa/var/run/. If we update the location, by adding a front /, for example, pidfile = /var/run/ncpa_listener.pid and /var/log/ncpa_listener.log, then restart the services, we noted that the ncpa_listener.log moves to /var/log/, as expected, but the ncpa_listener.pid remains in /usr/local/ncpa/var/run/. Why does the log file move as expected, but the pid file does not? Is there another way or place we need to update to move the pid file?
The reason we are trying to move the pid file is to ensure that it is deleted on reboot.
Thanks in advance.
NCPA PID file location change
Re: NCPA PID file location change
Hi @shoreypu,
My first thought is that it's possible a permissions issue is preventing the user that ncpa runs as from moving the pid files. I would recommend taking a look at the permissions on the existing pid files that are in the location you are trying to move them out of. You'll want to make sure they match whatever user you have ncpa configured to run as (nagios user by default)
My first thought is that it's possible a permissions issue is preventing the user that ncpa runs as from moving the pid files. I would recommend taking a look at the permissions on the existing pid files that are in the location you are trying to move them out of. You'll want to make sure they match whatever user you have ncpa configured to run as (nagios user by default)
Re: NCPA PID file location change
Hello @shoreypu,
It would seem that you are encountering an issue with NCPA 2. Have you set your loglevel to debug and checked your logs to see if any errors are occuring?
Also, NCPA 3.0.2 recently got an upgrade in how it handles its PID file and I suggest that you try upgrading to solve your issue.
It would seem that you are encountering an issue with NCPA 2. Have you set your loglevel to debug and checked your logs to see if any errors are occuring?
Also, NCPA 3.0.2 recently got an upgrade in how it handles its PID file and I suggest that you try upgrading to solve your issue.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
-
- Posts: 2
- Joined: Tue Dec 26, 2023 8:25 pm
Re: NCPA PID file location change
i was also having this trouble and after debugging it seems to be fixed. Thank you for sharing so muchbbahn wrote: ↑Fri Apr 05, 2024 9:43 am Hello @shoreypu,
It would seem that you are encountering an issue with NCPA 2. Have you set your loglevel to debug and checked your logs to see if any errors are occuring?
Also, NCPA 3.0.2 recently got an upgrade in how it handles its PID file and I suggest that you try upgrading to solve your issue.