Won't Fix
Details
Assignee
fookerfookerReporter
Jesse WhiteJesse WhiteSprint
NonePriority
Major
Details
Details
Assignee
fooker
fookerReporter
Jesse White
Jesse WhiteSprint
None
Priority
PagerDuty
PagerDuty
PagerDuty
Created November 21, 2016 at 11:33 AM
Updated June 3, 2019 at 8:04 AM
Resolved April 4, 2017 at 12:23 PM
When running as non-root and using a Linux kernel < 3.11, the JNA pinger fails with this stack trace:
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)[18:com.google.guava:18.0.0] at com.google.common.cache.LocalCache.get(LocalCache.java:3937)[18:com.google.guava:18.0.0] at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4739)[18:com.google.guava:18.0.0] at org.opennms.netmgt.icmp.AbstractPingerFactory.getInstance(AbstractPingerFactory.java:70)[245:org.opennms.opennms-icmp-api:19.0.0.SNAPSHOT] ... 27 more Caused by: java.lang.NullPointerException at org.opennms.netmgt.icmp.jna.JnaIcmpMessenger.setTrafficClass(JnaIcmpMessenger.java:115)[246:org.opennms.opennms-icmp-jna:19.0.0.SNAPSHOT] at org.opennms.netmgt.icmp.jna.JnaPinger.setTrafficClass(JnaPinger.java:269)[246:org.opennms.opennms-icmp-jna:19.0.0.SNAPSHOT] at org.opennms.netmgt.icmp.AbstractPingerFactory$1.call(AbstractPingerFactory.java:74)[245:org.opennms.opennms-icmp-api:19.0.0.SNAPSHOT]
The failure is inevitable in this case, but we should avoid throwing an NPE and log a more suitable exception.
Also, request made using the PingRpcModule or PingSweepRpcModule will fail with a time-out if this occurs on a Minion. We should have those requests fail immediately instead.