SNMP4J NullPointerExceptions
Description
Environment
Acceptance / Success Criteria
is duplicated by
Lucidchart Diagrams
Activity

Benjamin Reed June 24, 2008 at 11:03 AM
merged to branches/1.6 in r9461

Jeff Gehlbach June 24, 2008 at 10:45 AM
A one-line change to SNMP4J that stops it calling close() on a null Socket addresses this issue. Until an upstream SNMP4J release includes this fix, we've put an snmp4j-1.9.2-npefix.jar in our Maven repo and updated our top-level POM to specify that version.
Fix committed to 1.6-testing in r9460.

Jamuel Starkey June 23, 2008 at 11:33 AM
Actually rpm -q yields:
opennms-1.5.93-0.9424.snapshot but I don't see 1.5.93 as a version option in bugz.
There doesn't seem to be a time stamp added when the Exceptions occur so I'm not sure how often this is occurring. I had opennms installed on another box and running much longer with more SNMP traps enabled and I had seen quite a few more log entries.
I came across these when trying to figuring why email notifications weren't being sent and I had DEBUG set to true for org.opennms.core.utils.debug (in javamail-configuration properties).
I was under the impression that javamail would send debug to output.log so when I saw these I wasn't sure javamail was somehow getting blocked . . . Still haven't resolved my javamail problems after a lot of effort so I thought I'd open this ticket on snmp4j since it was at least being logged.

Jeff Gehlbach June 23, 2008 at 9:59 AM
Updating summary for better searchability. Also set version; Jamuel, please correct the version if I'm assuming incorrectly that it's 1.5.92.

Jeff Gehlbach June 23, 2008 at 9:35 AM
I don't think you've done anything wrong. I've seen these on my system as well but they don't seem to have any negative impact. About how frequent and numerous are these exceptions on your system?
Seeing NullPoint Exceptions:
Exception in thread "DefaultUDPTransportMapping_10.250.4.68/0" java.lang.NullPointerException
in output.log
Any idea what I'm doing wrong here? What I should fix if it's a configuration problem?
Here's output.log from when I start up OpenNMS:
Sun Jun 22 20:59:02 PDT 2008
begin ulimit settings:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
max nice (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 32768
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 10240
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
max rt priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 32768
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
end ulimit settings
Executing command: /opt/opennms/bin/runjava -r – -Dopennms.home=/opt/opennms -Xmx256m -jar /opt/opennms/lib/opennms_bootstrap.jar start
[DEBUG] System property 'opennms.library.jicmp' set to '/usr/lib/libjicmp.so. Attempting to load jicmp library from this location.
[INFO] Successfully loaded jicmp library.
[DEBUG] System property 'opennms.library.jicmp' set to '/usr/lib/libjicmp.so. Attempting to load jicmp library from this location.
[INFO] Successfully loaded jicmp library.
Exception in thread "DefaultUDPTransportMapping_10.250.4.68/0" java.lang.NullPointerException
at org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
at org.snmp4j.util.DefaultThreadFactory$WorkerThread.run(Unknown Source)
Exception in thread "DefaultUDPTransportMapping_10.250.4.68/0" java.lang.NullPointerException
at org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
at org.snmp4j.util.DefaultThreadFactory$WorkerThread.run(Unknown Source)
Exception in thread "DefaultUDPTransportMapping_10.250.4.68/0" java.lang.NullPointerException
at org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
at org.snmp4j.util.DefaultThreadFactory$WorkerThread.run(Unknown Source)
Exception in thread "DefaultUDPTransportMapping_10.250.4.68/0" java.lang.NullPointerException
at org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
at org.snmp4j.util.DefaultThreadFactory$WorkerThread.run(Unknown Source)
Exception in thread "DefaultUDPTransportMapping_10.250.4.68/0" java.lang.NullPointerException
at org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)