Discussion:
[opennms-discuss] Not receiving Cisco SNMP traps
D***@cs.com
2006-03-28 15:32:05 UTC
Permalink
Hi all,

New to the product, but so far things are going well. I read the install
doc, and the archives, and was able to get v1.27 up and running.

I originally installed it on a test box, and have since moved to a new
production box. My Cisco switches are configured to send snmp traps to both
servers.

My test box receives the traps fine, and they generate events/notifications.

However my new box is able to poll my devices (SNMP graphs work fine).
However no SNMP traps are showing up. I have confirmed using tcpdump that the
traps are arriving. Also opennms -v status shows all processes (including trapd)
running.

Where should I look to find my problem?

THANKS!
Dave
DJ Gregor
2006-03-28 15:49:36 UTC
Permalink
Post by D***@cs.com
However my new box is able to poll my devices (SNMP graphs work
fine). However no SNMP traps are showing up. I have confirmed
using tcpdump that the traps are arriving. Also opennms -v status
shows all processes (including trapd) running.
Is there another SNMP trap receiver running on the OpenNMS server--
maybe Net-SNMP's "snmptrapd"? What do you see in the trapd log file?


- djg
D***@cs.com
2006-03-28 16:15:09 UTC
Permalink
In a message dated 3/28/2006 10:51:15 AM Eastern Standard Time,
Post by DJ Gregor
Is there another SNMP trap receiver running on the OpenNMS server--
maybe Net-SNMP's "snmptrapd"? What do you see in the trapd log file?
Net-SNMPs snmptrapd is installed but not running...same as on my other
server:
service snmptrapd status
snmptrapd is stopped

The trapd.log doesn't show much of anything, except when I restart the
service:
2006-03-28 08:54:43,553 DEBUG [main] Trapd: start: Initializing the trapd
config factory
2006-03-28 08:54:43,553 DEBUG [main] TrapQueueProcessor: TrapQueueProcessor
started
2006-03-28 08:54:43,553 DEBUG [main] Trapd: start: Trapd ready to receive
traps

But as I said...a tcpdump shows the traps coming in...
11:14:06.947775 IP myhost.domain.com.54673 > opennms.domain.com.snmptrap:
C=MyString V2Trap(35) system.sysUpTime.0=128649 .iso.org.dod.internet=[|snmp]
11:14:10.832595 IP myhost.domain.com.54673 > opennms.domain.com.snmptrap:
C=MyString V2Trap(35) system.sysUpTime.0=128857 .iso.org.dod.internet=[|snmp]

Thanks for the help...
Dave
DJ Gregor
2006-03-28 16:27:39 UTC
Permalink
Do you have a firewall on the server that is blocking inbound port
162 UDP traffic?


- djg
Post by D***@cs.com
In a message dated 3/28/2006 10:51:15 AM Eastern Standard Time,
Post by DJ Gregor
Is there another SNMP trap receiver running on the OpenNMS server--
maybe Net-SNMP's "snmptrapd"? What do you see in the trapd log file?
Net-SNMPs snmptrapd is installed but not running...same as on my
service snmptrapd status
snmptrapd is stopped
The trapd.log doesn't show much of anything, except when I restart
2006-03-28 08:54:43,553 DEBUG [main] Trapd: start: Initializing the
trapd config factory
TrapQueueProcessor started
2006-03-28 08:54:43,553 DEBUG [main] Trapd: start: Trapd ready to
receive traps
But as I said...a tcpdump shows the traps coming in...
11:14:06.947775 IP myhost.domain.com.54673 >
opennms.domain.com.snmptrap: C=MyString V2Trap(35)
system.sysUpTime.0=128649 .iso.org.dod.internet=[|snmp]
11:14:10.832595 IP myhost.domain.com.54673 >
opennms.domain.com.snmptrap: C=MyString V2Trap(35)
system.sysUpTime.0=128857 .iso.org.dod.internet=[|snmp]
Thanks for the help...
Dave
D***@cs.com
2006-03-28 16:43:19 UTC
Permalink
In a message dated 3/28/2006 11:28:15 AM Eastern Standard Time,
Post by DJ Gregor
Do you have a firewall on the server that is blocking inbound port
162 UDP traffic?
Nope, no firewall running on this box:
service iptables status
Firewall is stopped.

I feel like I'm missing something obvious, but no idea what.
Dave
Matt Brozowski
2006-03-28 17:03:57 UTC
Permalink
Can you run netstat to see if any one is listening to port 162. If
someone is can you run lsof to find out which process it is?

Matt
Post by D***@cs.com
In a message dated 3/28/2006 11:28:15 AM Eastern Standard Time,
Post by DJ Gregor
Do you have a firewall on the server that is blocking inbound port
162 UDP traffic?
service iptables status
Firewall is stopped.
I feel like I'm missing something obvious, but no idea what.
Dave
D***@cs.com
2006-03-28 17:29:13 UTC
Permalink
In a message dated 3/28/2006 12:05:27 PM Eastern Standard Time,
Can you run netstat to see if any one is listening to port 162. If someone
is can you run lsof to find out which process it is?
That was it! Somehow 162 was opened by a second java instance. Specifically
I had two:
/usr/java/j2sdk1.4.2_04/bin/java -classpath
/opt/OpenNMS/etc:/opt/OpenNMS/lib/activation.jar:/opt/OpenNMS/lib/avalon-framework-cvs-20020806.jar:/opt/OpenNMS
/lib/batik.jar:/opt/OpenNMS/lib/bsf220.jar:/opt/OpenNMS/lib/bsh-1.2b7.jar:/opt
/OpenNMS/lib/castor-0.9.3.9.jar:/opt/OpenNMS/lib/castor-0.9.3.9-xml.jar:/opt/O
penNMS/lib/catalina.jar:/opt/OpenNMS/lib/commons-jxpath-1.1.jar:/opt/OpenNMS/l
ib/fop0205.jar:/opt/OpenNMS/lib/getopt.jar:/opt/OpenNMS/lib/hsqldb.jar:/opt/Op
enNMS/lib/imap.jar:/opt/OpenNMS/lib/jcifs.jar:/opt/OpenNMS/lib/jdhcp.jar:/opt/
OpenNMS/lib/jimi100.jar:/opt/OpenNMS/lib/jmta.jar:/opt/OpenNMS/lib/jradius-cli
ent.jar:/opt/OpenNMS/lib/jrobin-1.4.0.jar:/opt/OpenNMS/lib/jta101.jar:/opt/Ope
nNMS/lib/ldap.jar:/opt/OpenNMS/lib/log4j.jar:/opt/OpenNMS/lib/logkit-1.0.jar:/
opt/OpenNMS/lib/mailapi.jar:/opt/OpenNMS/lib/mx4j-3.0.1.jar:/opt/OpenNMS/lib/m
x4j-remote-3.0.1.jar:/opt/OpenNMS/lib/mx4j-tools-3.0.1.jar:/opt/OpenNMS/lib/op
ennms_common.jar:/opt/OpenNMS/lib/opennms_core.jar:/opt/OpenNMS/lib/opennms_in
stall.jar:/opt/OpenNMS/lib/opennms_joesnmp.jar:/opt/OpenNMS/lib/opennms_servic
es.jar:/opt/OpenNMS/lib/opennms_web.jar:/opt/O
penNMS/lib/oro204.jar:/opt/OpenNMS/lib/pg74.215.jdbc3.jar:/opt/OpenNMS/lib/pop3.jar:/opt/OpenNMS/lib/regexp120
.jar:/opt/OpenNMS/lib/servlet.jar:/opt/OpenNMS/lib/smack.jar:/opt/OpenNMS/lib/
smackx.jar:/opt/OpenNMS/lib/smtp.jar:/opt/OpenNMS/lib/w3c.jar:/opt/OpenNMS/lib
/xalan122.jar:/opt/OpenNMS/lib/xalan231.jar:/opt/OpenNMS/lib/xerces201.jar:/op
t/OpenNMS/lib/xml-apis231.jar:/opt/OpenNMS/lib/xmlrpc-1.2-b1.jar
-DOPENNMSLAUNCH -Dopennms.home=/opt/OpenNMS
-Djcifs.properties=/opt/OpenNMS/etc/jcifs.properties -Xmx256m org.opennms.netmgt.vmmgr.Manager

So manually killing both, then start opennms cleaned it up. I now get traps.
Thanks guys...
Dave

Loading...