Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7229C18038 for ; Wed, 20 Apr 2016 21:34:35 +0000 (UTC) Received: (qmail 46082 invoked by uid 500); 20 Apr 2016 21:34:35 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 46039 invoked by uid 500); 20 Apr 2016 21:34:35 -0000 Mailing-List: contact dev-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 dev@ambari.apache.org Received: (qmail 46026 invoked by uid 99); 20 Apr 2016 21:34:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2016 21:34:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 93511C04FE for ; Wed, 20 Apr 2016 21:34:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.202 X-Spam-Level: X-Spam-Status: No, score=0.202 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RP_MATCHES_RCVD=-0.996, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id TrHmnBMC_n_T for ; Wed, 20 Apr 2016 21:34:32 +0000 (UTC) Received: from nm31-vm6.bullet.mail.gq1.yahoo.com (nm31-vm6.bullet.mail.gq1.yahoo.com [98.136.216.213]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 3A8355F1EB for ; Wed, 20 Apr 2016 21:34:32 +0000 (UTC) Received: from [127.0.0.1] by nm31.bullet.mail.gq1.yahoo.com with NNFMP; 20 Apr 2016 21:34:25 -0000 Received: from [216.39.60.183] by nm31.bullet.mail.gq1.yahoo.com with NNFMP; 20 Apr 2016 21:31:31 -0000 Received: from [98.137.12.202] by tm19.bullet.mail.gq1.yahoo.com with NNFMP; 20 Apr 2016 21:31:31 -0000 Received: from [127.0.0.1] by omp1010.mail.gq1.yahoo.com with NNFMP; 20 Apr 2016 21:31:31 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 125778.36643.bm@omp1010.mail.gq1.yahoo.com X-YMail-OSG: 8Yd67wQVM1n_QjrowpItTWuuyf9cL6rcf_xemvfq0_BljpY3akRSPBYRHGLB3PI LJH_qqf5SfO.s5zny18IK9jXK1Skgfyo.oFuoSSprwnqA7FmZ0ETT2zTlZBBM_ULu6zRRrkIbH8O y5ogGscLfqL1xcAl52Atm1lMEvGeFTOIe2GqgdU57gbR1I1wJYVwMZ1czq1_3f7iXDAqOiusyV1p AYBY7gh4KhKrwsfE8EUVrnU3xX10.ZfQHNl7EJK56YOan3mkK.Ldf4SwsRBCe_.0JtH.SGJxauh0 PRwR1KuUvWlSNWL0n5eppJpxi.SmpqlpRwWZHqt8urqthJKx0xUoxRDDoiXbFG3bxW0PAA1PxUF8 GZ7psrzL7hsqBGEwYynkmcY..SF1VvYRGnyVUwCNsfYd_vJcikemgWebvDPdAWTAgZDinUWrRCiv kJUN9PZyEo3tQOPhEWn9DAYquAadT9u2B3zsRNfsIhMTTr4kf1g3yxvHBBXtfXaweqHf8Ok0GCxl 758dZRxBtyDMg3FZyCTofi7LY8IDJaggcuwH45_r6DC4- Received: by 216.39.60.157; Wed, 20 Apr 2016 21:31:30 +0000 Date: Wed, 20 Apr 2016 21:31:30 +0000 (UTC) From: Di Li Reply-To: Di Li To: Ambari Message-ID: <226822507.4693393.1461187890114.JavaMail.yahoo@mail.yahoo.com> Subject: "detected unhandled Python exception" in RHEL's /var/log/messages log MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4693392_85877093.1461187890112" References: <226822507.4693393.1461187890114.JavaMail.yahoo.ref@mail.yahoo.com> ------=_Part_4693392_85877093.1461187890112 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello folks, I noticed that everytime Ambari Python script fails with unexpected excepti= on. A "detected unhandled Python exception" error message is logged in /var= /log/messages.=C2=A0 For example, the Install Package step may fail due to = corrupted HDP yum repo cache. When that happened, I saw the following error= message logged in /var/logs/messages. Apr 11 11:17:55 bdavm1251 abrt: detected unhandled Python exception in '/va= r/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py' It seemed to me that the "unhandled" exception was from the execute() metho= d in script.py as shown below. where the method has "try" and "finally" but= no "expect" part. The script used to catch the exception. The pieces was r= emoved via AMBARI-11242 as part of the Ambari server/agent performance opti= mization. Could someone explain to me why the "expect" was removed ? Should "expect" = be added back so arbt on RHEL will not log errors into /var/log/messages ? try: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 method =3D self.choose_method_to_execute(sel= f.command_name) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 with Environment(self.basedir, tmp_dir=3DScr= ipt.tmp_dir) as env: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 env.config.download_path =3D Scr= ipt.tmp_dir =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 method(env) =C2=A0=C2=A0=C2=A0 finally: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if self.should_expose_component_version(self= .command_name): =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.save_component_version_to_s= tructured_out() Thanks. Di ------=_Part_4693392_85877093.1461187890112--