You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Dmytro Vitiuk (Jira)" <ji...@apache.org> on 2021/01/12 14:02:00 UTC

[jira] [Created] (AMBARI-25609) sysUpTime field is populated with invalid value during SNMP trap creation

Dmytro Vitiuk created AMBARI-25609:
--------------------------------------

             Summary: sysUpTime field is populated with invalid value during SNMP trap creation
                 Key: AMBARI-25609
                 URL: https://issues.apache.org/jira/browse/AMBARI-25609
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.7.5
            Reporter: Dmytro Vitiuk
             Fix For: 2.7.6


Ambari tries to set milliseconds to the "sysUpTime" field:
[https://github.com/apache/ambari/blob/8e35277c24cc0ffd897c1dc727b2cc528cb8148b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java#L120]

but this field accepts hundreds of milliseconds:
{noformat}
The time (in hundredths of a second) since the network
            management portion of the system was last re-initialized.
{noformat}
([https://tools.ietf.org/html/rfc1907#section-2.1])

So after about 50-days in up-time an ambari server is not able to populate "sysUpTime" with a correct value (the max value the field is able to accept is "4294967295" - it is about 50 days in milliseconds).
 Exception in ambari-server.log:
{noformat}
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.apache.ambari.server.notifications.dispatchers.AmbariSNMPDispatcher.prepareTrap(AmbariSNMPDispatcher.java:120)
	at org.apache.ambari.server.notifications.dispatchers.SNMPDispatcher.sendTraps(SNMPDispatcher.java:244)
	at org.apache.ambari.server.notifications.dispatchers.SNMPDispatcher.dispatch(SNMPDispatcher.java:157)
	at org.apache.ambari.server.notifications.DispatchRunnable.run(DispatchRunnable.java:58)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)