Service restart in AIX
-
keerthi.seetharaman
- Posts: 92
- Joined: Thu Jan 11, 2018 7:55 am
Service restart in AIX
Hi Team,
Good Day.
I have downloaded the ncpa rpm package and installed the rpm package in AIX server. Version of the AIX server is 7.1 with technology level 05 and service pack 05. After installing RPM package i need to update the config file with community string which i did it .
We need to restart the service ncpa listener on AIX.
Can you please suggest me how to restart the service on the server.
Regards,
Keerthi Prashanth S
Good Day.
I have downloaded the ncpa rpm package and installed the rpm package in AIX server. Version of the AIX server is 7.1 with technology level 05 and service pack 05. After installing RPM package i need to update the config file with community string which i did it .
We need to restart the service ncpa listener on AIX.
Can you please suggest me how to restart the service on the server.
Regards,
Keerthi Prashanth S
Thanks & Regards,
Keerthi Prashanth Seetharaman
Keerthi Prashanth Seetharaman
Re: Service restart in AIX
I believe the command to start NCPA on AIX would look similar to the following.
But, you may want to look at how other services are initialized on that machine, and model the command after that. This will most likely be an init type command.
managing services on IBM AIX
Do you want to configure the service to start every time the machine boots up, or start it just this once?
Code: Select all
/usr/local/ncpa/ncpa_listener --startmanaging services on IBM AIX
Do you want to configure the service to start every time the machine boots up, or start it just this once?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
keerthi.seetharaman
- Posts: 92
- Joined: Thu Jan 11, 2018 7:55 am
Re: Service restart in AIX
We would like to start it only one time because as per the document from Nagios says that once we install the rpm files and make the necessary changes in ncpa.cfg file we need to restart the listener service in order to communicate with Nagios XI and to add the server under monitoring.
Thanks & Regards,
Keerthi Prashanth Seetharaman
Keerthi Prashanth Seetharaman
Re: Service restart in AIX
Do you see the listener in that folder?
If so, run the command to start it from that location.
If the --start option is not correct, you may be able to see what options are available by opening that file with a text editor.
If not, you could search for it.
Then check if it is running.
Code: Select all
cd /usr/local/ncpa/
ls | grep ncpaCode: Select all
/usr/local/ncpa/ncpa_listener --startCode: Select all
vi ncpa_listenerCode: Select all
sudo find /usr -name ncpa_listenerCode: Select all
ps -ef | grep ncpaAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
keerthi.seetharaman
- Posts: 92
- Joined: Thu Jan 11, 2018 7:55 am
Re: Service restart in AIX
Please find the below updates:-
Executed the below command:-
/usr/local/ncpa/ncpa_listener --start
and this is below error that i am facing while executing:-
[abc:root:/usr/local/ncpa:] /usr/local/ncpa/ncpa_listener --start
2020-06-03 09:36:49,428 15990884 ERROR failed to start due to an exception
Traceback (most recent call last):
File "/tmp/test/ncpa/agent/ncpadaemon.py", line 181, in start
File "/tmp/test/ncpa/agent/ncpadaemon.py", line 358, in check_pid_writable
SystemExit: unable to write to pidfile /usr/local/ncpa/var/run/ncpa_listener.pid
unable to write to pidfile /usr/local/ncpa/var/run/ncpa_listener.pid
[abc:root:/usr/local/ncpa:]
1. Permission for /usr/local/ncpa/var/run/ is correctly set to writable.
drwxrwxr-x 2 root nagios 256 Jun 3 09:33 /usr/local/ncpa/var/run/
2. Unable to edit as this is compiled file.
file /usr/local/ncpa/ncpa_listener
/usr/local/ncpa/ncpa_listener: executable (RISC System/6000) or object module
Please suggest what needs to be done.
Executed the below command:-
/usr/local/ncpa/ncpa_listener --start
and this is below error that i am facing while executing:-
[abc:root:/usr/local/ncpa:] /usr/local/ncpa/ncpa_listener --start
2020-06-03 09:36:49,428 15990884 ERROR failed to start due to an exception
Traceback (most recent call last):
File "/tmp/test/ncpa/agent/ncpadaemon.py", line 181, in start
File "/tmp/test/ncpa/agent/ncpadaemon.py", line 358, in check_pid_writable
SystemExit: unable to write to pidfile /usr/local/ncpa/var/run/ncpa_listener.pid
unable to write to pidfile /usr/local/ncpa/var/run/ncpa_listener.pid
[abc:root:/usr/local/ncpa:]
1. Permission for /usr/local/ncpa/var/run/ is correctly set to writable.
drwxrwxr-x 2 root nagios 256 Jun 3 09:33 /usr/local/ncpa/var/run/
2. Unable to edit as this is compiled file.
file /usr/local/ncpa/ncpa_listener
/usr/local/ncpa/ncpa_listener: executable (RISC System/6000) or object module
Please suggest what needs to be done.
Thanks & Regards,
Keerthi Prashanth Seetharaman
Keerthi Prashanth Seetharaman
Re: Service restart in AIX
Can you please share the contents of this script? ( either by PM or in the thread )
Let's have a look at what line 181 and 358 hold.
That's odd, it looks like you should have write access to that folder. Can you please try running the following commands to correct it anyways?
Code: Select all
/tmp/test/ncpa/agent/ncpadaemon.pyThat's odd, it looks like you should have write access to that folder. Can you please try running the following commands to correct it anyways?
Code: Select all
chown -R nagios.nagios /usr/local/ncpa/var/run/*
chmod -R go+rw /usr/local/ncpa/var/run/*As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
keerthi.seetharaman
- Posts: 92
- Joined: Thu Jan 11, 2018 7:55 am
Re: Service restart in AIX
/tmp/test/ncpa/agent/ncpadaemon.py :- In the tmp folder i am not able to find the test folder and remaining folders.
[abc:root:/:] cd/tmp/test/ncpa/agent/
ksh: cd/tmp/test/ncpa/agent/: not found
[abc:root:/:]
Regarding the permission update:-
chown -R nagios.nagios /usr/local/ncpa/var/run/* :- From this directory till run is executable for which i have ran till the run and after that when checked the folder it is blank.
chmod -R go+rw /usr/local/ncpa/var/run/* :- Same comment as above.
Please suggest what needs to be done.
[abc:root:/:] cd/tmp/test/ncpa/agent/
ksh: cd/tmp/test/ncpa/agent/: not found
[abc:root:/:]
Regarding the permission update:-
chown -R nagios.nagios /usr/local/ncpa/var/run/* :- From this directory till run is executable for which i have ran till the run and after that when checked the folder it is blank.
chmod -R go+rw /usr/local/ncpa/var/run/* :- Same comment as above.
Please suggest what needs to be done.
Thanks & Regards,
Keerthi Prashanth Seetharaman
Keerthi Prashanth Seetharaman
Re: Service restart in AIX
I'm sorry I didn't see this sooner, but there is actually a method listed in the NCPA document.
Can you please try running that and let me know if it works?
Code: Select all
stopsrc -s ncpa_listener
startsrc -s ncpa_listenerAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
keerthi.seetharaman
- Posts: 92
- Joined: Thu Jan 11, 2018 7:55 am
Re: Service restart in AIX
This I have already tried which says the service is started but when checked it reflects as inoperative before raising this case.
Tried stopping the service and statred back but no go.
Tried stopping the service and statred back but no go.
Thanks & Regards,
Keerthi Prashanth Seetharaman
Keerthi Prashanth Seetharaman
Re: Service restart in AIX
Are you using the ncpa 2.2.1 version from here or what version are you using?
https://www.nagios.org/ncpa/#downloads
What do you have for uid and gid in your ncpa.cfg? The defaults should be:
What is the output of these commands?
Run these commands and send us the full output (you can cut off the errpt to only show the ncpa related ones):
https://www.nagios.org/ncpa/#downloads
What do you have for uid and gid in your ncpa.cfg? The defaults should be:
Code: Select all
uid = nagios
gid = nagiosCode: Select all
lsuser ALL nagios
lsgroup nagiosCode: Select all
stopsrc -s ncpa_listener
startsrc -s ncpa_listener
lssrc -s ncpa_listener
errpt
errpt -a