From issues-return-82166-archive-asf-public=cust-asf.ponee.io@ambari.apache.org Wed Jan 13 12:20:04 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 2F0721806DC for ; Wed, 13 Jan 2021 13:20:04 +0100 (CET) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 5E7334559D for ; Wed, 13 Jan 2021 12:20:03 +0000 (UTC) Received: (qmail 44315 invoked by uid 500); 13 Jan 2021 12:20:02 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 44244 invoked by uid 99); 13 Jan 2021 12:20:02 -0000 Received: from mailrelay1-he-de.apache.org (HELO mailrelay1-he-de.apache.org) (116.203.21.61) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jan 2021 12:20:02 +0000 Received: from jira2-he-de.apache.org (jira2-he-de.apache.org [168.119.33.54]) by mailrelay1-he-de.apache.org (ASF Mail Server at mailrelay1-he-de.apache.org) with ESMTPS id 19F0E3E931 for ; Wed, 13 Jan 2021 12:20:01 +0000 (UTC) Received: from jira2-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira2-he-de.apache.org (ASF Mail Server at jira2-he-de.apache.org) with ESMTP id B3738C803A5 for ; Wed, 13 Jan 2021 12:20:00 +0000 (UTC) Date: Wed, 13 Jan 2021 12:20:00 +0000 (UTC) From: "Dmytro Grinenko (Jira)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (AMBARI-25609) sysUpTime field is populated with invalid value during SNMP trap creation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-25609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dmytro Grinenko resolved AMBARI-25609. -------------------------------------- Resolution: Fixed > 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 > Priority: Major > Fix For: 2.7.6 > > Time Spent: 40m > Remaining Estimate: 0h > > 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.(UnsignedInteger32.java:53) > at org.snmp4j.smi.TimeTicks.(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)