Page 1 of 1

SNMPTrapd - Unable to start Service

PostPosted: Thu Feb 07, 2019 3:47 pm
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.

Re: SNMPTrapd - Unable to start Service

PostPosted: Fri Feb 08, 2019 8:58 am
by shineyroman
Hi guys,

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

Regards,

Re: SNMPTrapd - Unable to start Service

PostPosted: Fri Feb 08, 2019 9:05 am
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..

Re: SNMPTrapd - Unable to start Service

PostPosted: Fri Feb 08, 2019 9:36 am
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

Re: SNMPTrapd - Unable to start Service

PostPosted: Mon Feb 11, 2019 2:29 pm
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.

Re: SNMPTrapd - Unable to start Service

PostPosted: Mon Feb 11, 2019 2:31 pm
by scottwilkerson
how about ?
Code: Select all
/var/log/snmptt/snmpttunknown.log

Re: SNMPTrapd - Unable to start Service

PostPosted: Fri Feb 15, 2019 12:51 pm
by shineyroman
Thank you Scott. I got this resolved.

It was more of an issue with the IPSEC tunnel.

Thank you

Re: SNMPTrapd - Unable to start Service

PostPosted: Fri Feb 15, 2019 12:57 pm
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