SNMPTrapd - Unable to start Service

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

SNMPTrapd - Unable to start Service

Postby shineyroman » Thu Feb 07, 2019 3:47 pm

Hi all,

I am trying to set up SNMP on a Nagios server. I have installed the net-snmp package :

yum list installed | grep snmp
net-snmp.x86_64 1:5.7.2-37.el7 @base
net-snmp-agent-libs.x86_64 1:5.7.2-37.el7 @base
net-snmp-libs.x86_64 1:5.7.2-37.el7 @base
net-snmp-perl.x86_64 1:5.7.2-37.el7 @base
net-snmp-utils.x86_64 1:5.7.2-37.el7 @base
snmptt.noarch 1.4-0.9.beta2.el7 @epel

Edited the snmptrapd.conf file to include-

traphandle default /usr/sbin/snmptthandler
disableAuthorization yes

However when i try to start the snmptrapd service, it fails -

systemctl start snmptrapd

Job for snmptrapd.service failed because the control process exited with error code. See "systemctl status snmptrapd.service" and "journalctl -xe" for details.

systemctl status snmptrapd.service

● snmptrapd.service - Simple Network Management Protocol (SNMP) Trap Daemon.
Loaded: loaded (/usr/lib/systemd/system/snmptrapd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2019-02-07 15:46:16 EST; 16s ago
Process: 16685 ExecStart=/usr/sbin/snmptrapd $OPTIONS -f (code=exited, status=1/FAILURE)
Main PID: 16685 (code=exited, status=1/FAILURE)

Feb 07 15:46:16 srv-lakermon01 systemd[1]: Starting Simple Network Management Protocol (SNMP) Trap Daemon....
Feb 07 15:46:16 srv-lakermon01 systemd[1]: snmptrapd.service: main process exited, code=exited, status=1/FAILURE
Feb 07 15:46:16 srv-lakermon01 systemd[1]: Failed to start Simple Network Management Protocol (SNMP) Trap Daemon..
Feb 07 15:46:16 srv-lakermon01 systemd[1]: Unit snmptrapd.service entered failed state.
Feb 07 15:46:16 srv-lakermon01 systemd[1]: snmptrapd.service failed.


Unit snmptrapd.service has begun starting up.
snmptrapd.service: main process exited, code=exited, status=1/FAILURE
Failed to start Simple Network Management Protocol (SNMP) Trap Daemon..
-- Subject: Unit snmptrapd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel

Kindly could you help me in this regards. Thank you in advance.
shineyroman
 
Posts: 16
Joined: Wed Mar 28, 2018 11:26 am

Re: SNMPTrapd - Unable to start Service

Postby shineyroman » Fri Feb 08, 2019 8:58 am

Hi guys,

Would anybody be able to provide any advice/help with this issue.

Regards,
shineyroman
 
Posts: 16
Joined: Wed Mar 28, 2018 11:26 am

Re: SNMPTrapd - Unable to start Service

Postby shineyroman » Fri Feb 08, 2019 9:05 am

This time I am bale to see the below error in journalctl output

couldn't open udp:162 -- errno 98 ("Address already in use")
snmptrapd.service: main process exited, code=exited, status=1/FAILURE
Failed to start Simple Network Management Protocol (SNMP) Trap Daemon..
shineyroman
 
Posts: 16
Joined: Wed Mar 28, 2018 11:26 am

Re: SNMPTrapd - Unable to start Service

Postby scottwilkerson » Fri Feb 08, 2019 9:36 am

shineyroman wrote:couldn't open udp:162 -- errno 98 ("Address already in use")


this looks like something is already bound to the address, what is the output of the following?

Code: Select all
netstat -nlp|grep 162
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 13480
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: SNMPTrapd - Unable to start Service

Postby shineyroman » Mon Feb 11, 2019 2:29 pm

Thanks Scott

I was able to resolve the issue. Faced with another one now.

I can see the traps being sent from Fortigate, but I do not see any logs on the Centos Nagios server.

No related logs in nagios.log/ snmptt.debug/snmptrapd.log.
shineyroman
 
Posts: 16
Joined: Wed Mar 28, 2018 11:26 am

Re: SNMPTrapd - Unable to start Service

Postby scottwilkerson » Mon Feb 11, 2019 2:31 pm

how about ?
Code: Select all
/var/log/snmptt/snmpttunknown.log
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 13480
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: SNMPTrapd - Unable to start Service

Postby shineyroman » Fri Feb 15, 2019 12:51 pm

Thank you Scott. I got this resolved.

It was more of an issue with the IPSEC tunnel.

Thank you
shineyroman
 
Posts: 16
Joined: Wed Mar 28, 2018 11:26 am

Re: SNMPTrapd - Unable to start Service

Postby scottwilkerson » Fri Feb 15, 2019 12:57 pm

shineyroman wrote:Thank you Scott. I got this resolved.

It was more of an issue with the IPSEC tunnel.

Thank you


Glad to hear it is resolved!

Locking thread
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 13480
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 28 guests