I believe there also was a bug in the older nagios init script that would cause the command file to be removed and not recreated it you tried to start the nagios processes while it was already running.
What version of XI are you running?
UDP port 162 is taken by sh and python
Re: UDP port 162 is taken by sh and python
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: UDP port 162 is taken by sh and python
Stop everything means snmptarpd, sh, python and snmptt?questrad wrote:Question - that 4 days ago, did you restart your Nagios XI?
I mean did you stop everything and started it again?
If yes - then there is bug in snmptraphandling, which tries to write in to cmd file (pipe file) but file is not exist any more when you stop the nagios and python is stuck on that step.
Attached is my modified trap handler python script.
I found that issued on Jan 27. Then I killed all those services and restart snmptt and snmptrapd services.
After that I found this issue on Feb 12. I run the command that tmcdonald. After that I killed all and restart snmptt and snmptrapd services.
But Last week friday ( 13 Feb 2015), I restarted snmptt and snmptrapd because i have changed some of the /etc/snmp/snmptt.conf file.
Should I replaced your attached snmptraphandling.py with current one?
Thanks.
Re: UDP port 162 is taken by sh and python
We are using Nagios XI 2014R1.0 and we can't upgrade to latest version because of maintenance license expired.abrist wrote:I believe there also was a bug in the older nagios init script that would cause the command file to be removed and not recreated it you tried to start the nagios processes while it was already running.
What version of XI are you running?
Thanks.
Re: UDP port 162 is taken by sh and python
Before replacing just make sure that my script is fine for your current configuration, it was 2 year ago that I made changes and I dont remember - did I some other changes else or not related to our configuration.
Just before replacing, make copy of your current one and do some test - if it is OK, and you continue receiving snmp traps without interruption - go ahead with changes.
Just before replacing, make copy of your current one and do some test - if it is OK, and you continue receiving snmp traps without interruption - go ahead with changes.
Re: UDP port 162 is taken by sh and python
phyo, have you tried the script posted by questrad? Let us know if this fixed your issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: UDP port 162 is taken by sh and python
I will try to replace with the file posted by questrad. I will post back after monitoring a few days.lmiltchev wrote:phyo, have you tried the script posted by questrad? Let us know if this fixed your issue.
Re: UDP port 162 is taken by sh and python
You need just on the time when you sending snmp traps to Nagios, do restart of Nagios Core or NagiosXI or apply configuration or executed backup.
Dont send just one trap, send many traps (test traps of course) on that time.
Do test before changing the script and after.
Thanks
Dont send just one trap, send many traps (test traps of course) on that time.
Do test before changing the script and after.
Thanks
Re: UDP port 162 is taken by sh and python
Let us know how this works for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: UDP port 162 is taken by sh and python
After changing the script file, so far it is working well.tgriep wrote:Let us know how this works for you.
Re: UDP port 162 is taken by sh and python
phyo, that is good to hear that you have you tried the script. Let us know if the issue is fixed and that we can close this thread. Thanks.