snmp-adaptor fails to send traps after 49.7 days

78 views
Skip to first unread message

Vilius Panevėžys

unread,
Sep 17, 2019, 11:04:54 AM9/17/19
to mobicent...@googlegroups.com
The issue has been noticed on SLEE, which uses the JBoss SNMP adaptor
[1]. After approximately 49.7 days (uptime in milliseconds exceeds the
maximum value that can be represented by 4 byte unsigned integer) the
following exception starts popping up on every attempt to raise or
clear an alarm.

2019-09-12 06:28:20,559 ERROR [org.jboss.jmx.adaptor.snmp.agent.TrapEmitter] SNMP send error for 192.168.2.21/1620
java.lang.IllegalArgumentException: Argument must be an unsigned 32bit value
at org.snmp4j.smi.UnsignedInteger32.setValue(UnsignedInteger32.java:144)
at org.snmp4j.smi.UnsignedInteger32.<init>(UnsignedInteger32.java:53)
at org.snmp4j.smi.TimeTicks.<init>(TimeTicks.java:58)
at org.jboss.jmx.adaptor.snmp.agent.TrapFactorySupport.generateV3Trap(TrapFactorySupport.java:307)
at org.jboss.jmx.adaptor.snmp.agent.TrapEmitter.send(TrapEmitter.java:218)
at org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService.handleNotification2(SnmpAgentService.java:596)
at org.jboss.system.ListenerServiceMBeanSupport.handleNotification(ListenerServiceMBeanSupport.java:419)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
at com.sun.proxy.$Proxy377.handleNotification(Unknown Source)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:110)
at org.mobicents.slee.container.management.jmx.AlarmMBeanImpl.generateNotification(AlarmMBeanImpl.java:383)
at org.mobicents.slee.container.management.jmx.AlarmMBeanImpl.raiseAlarm(AlarmMBeanImpl.java:369)
at org.mobicents.slee.runtime.facilities.AbstractAlarmFacilityImpl.raiseAlarm(AbstractAlarmFacilityImpl.java:131)
at org.mobicents.slee.runtime.facilities.AbstractAlarmFacilityImpl.raiseAlarm(AbstractAlarmFacilityImpl.java:103)
at [...]

SNMP traps are no longer sent.

Please find attached a patch (produced using `git format-patch`, can be
applied using `git am`) that fixes this and a related problem of uptime
calculation as noted in the commit message.


[1] https://github.com/RestComm/snmp-adaptor


--
Vilius Panevėžys
Elitnet
0001-Fix-uptime-calculation-for-traps.patch

Ibrahima Gaye

unread,
Sep 17, 2019, 4:46:17 PM9/17/19
to mobicent...@googlegroups.com
Thank you for sharing Vilius;
Best regards,
Ibrahima GAYE
Technologies Integration Specialist 
OSS/BSS/Business Analyst Senior Consultant
M1 (now in Congo) +243 844 390139   
M2 +221 77 564 9358
Skypeibstelix
 



--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobicents-public/20190917180440.66f4afe4%40d21.
Reply all
Reply to author
Forward
0 new messages