From issues-return-82163-archive-asf-public=cust-asf.ponee.io@ambari.apache.org Tue Jan 12 14:02:02 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 70D171806D6 for ; Tue, 12 Jan 2021 15:02:02 +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 B0AE344F49 for ; Tue, 12 Jan 2021 14:02:01 +0000 (UTC) Received: (qmail 89028 invoked by uid 500); 12 Jan 2021 14:02:01 -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 88958 invoked by uid 99); 12 Jan 2021 14:02:01 -0000 Received: from ec2-52-204-25-47.compute-1.amazonaws.com (HELO mailrelay1-ec2-va.apache.org) (52.204.25.47) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jan 2021 14:02:01 +0000 Received: from jira2-he-de.apache.org (jira2-he-de.apache.org [168.119.33.54]) by mailrelay1-ec2-va.apache.org (ASF Mail Server at mailrelay1-ec2-va.apache.org) with ESMTPS id 159C53EAC0 for ; Tue, 12 Jan 2021 14:02: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 53296C8036B for ; Tue, 12 Jan 2021 14:02:00 +0000 (UTC) Date: Tue, 12 Jan 2021 14:02:00 +0000 (UTC) From: "Dmytro Vitiuk (Jira)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (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 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.(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)