SNMPTrapd - Unable to start Service

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
shineyroman
Posts: 16
Joined: Wed Mar 28, 2018 11:26 am

SNMPTrapd - Unable to start Service

Post by shineyroman »

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

Post by shineyroman »

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

Post by shineyroman »

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..
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SNMPTrapd - Unable to start Service

Post by scottwilkerson »

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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shineyroman
Posts: 16
Joined: Wed Mar 28, 2018 11:26 am

Re: SNMPTrapd - Unable to start Service

Post by shineyroman »

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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SNMPTrapd - Unable to start Service

Post by scottwilkerson »

how about ?

Code: Select all

/var/log/snmptt/snmpttunknown.log
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shineyroman
Posts: 16
Joined: Wed Mar 28, 2018 11:26 am

Re: SNMPTrapd - Unable to start Service

Post by shineyroman »

Thank you Scott. I got this resolved.

It was more of an issue with the IPSEC tunnel.

Thank you
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SNMPTrapd - Unable to start Service

Post by scottwilkerson »

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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked