Return-Path: X-Original-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B5D4BF963 for ; Tue, 1 Oct 2013 16:03:35 +0000 (UTC) Received: (qmail 11706 invoked by uid 500); 1 Oct 2013 16:03:30 -0000 Delivered-To: apmail-incubator-ambari-dev-archive@incubator.apache.org Received: (qmail 11661 invoked by uid 500); 1 Oct 2013 16:03:29 -0000 Mailing-List: contact ambari-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-dev@incubator.apache.org Received: (qmail 11610 invoked by uid 99); 1 Oct 2013 16:03:28 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Oct 2013 16:03:28 +0000 Date: Tue, 1 Oct 2013 16:03:27 +0000 (UTC) From: "Dmytro Sen (JIRA)" To: ambari-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-3306) Empty ambari server .pid causes Traceback 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-3306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13783075#comment-13783075 ] Dmytro Sen commented on AMBARI-3306: ------------------------------------ +1 > Empty ambari server .pid causes Traceback > ----------------------------------------- > > Key: AMBARI-3306 > URL: https://issues.apache.org/jira/browse/AMBARI-3306 > Project: Ambari > Issue Type: Bug > Affects Versions: 1.4.1 > Reporter: Jeff Sposetti > Assignee: Andrew Onischuk > Attachments: AMBARI-3306_1.4.1.patch, AMBARI-3306.patch > > > Went thru and make some ambari-server changes -- don't have steps to repro -- but it resulted in the ambari-server.pid file to empty (file exists but 0 size). > ambari-server start or status command caused a traceback but this did not provide enough into to fix. We deleted /var/run/ambari-server/ambari-server.pid and things were OK. > {code} > ec2-user@ip-10-111-19-223 ambari-server]$ ambari-server status > Using python /usr/bin/python2.6 > Ambari-server status > Traceback (most recent call last): > File "/usr/sbin/ambari-server.py", line 3988, in > main() > File "/usr/sbin/ambari-server.py", line 3813, in main > status(options) > File "/usr/sbin/ambari-server.py", line 2471, in status > status, pid = is_server_runing() > File "/usr/sbin/ambari-server.py", line 3221, in is_server_runing > pid = int(f.readline()) > ValueError: invalid literal for int() with base 10: '' > {code} > Regardless of how we got to an empty .pid file, ambari-server should handle an empty .pid file and print a more appropriate message (and not a traceback). At least that would give the user something to go look at. > {code} > ERROR: unable to read /var/run/ambari-server/ambari-server.pid > {code} > Additionally, if we find the file is 0 size, we should print this error and just delete the file automatically (well, tell them we are removing first). > {code} > ERROR: /var/run/ambari-server/ambari-server.pid is empty. Removing. > ERROR: unable to read /var/run/ambari-server/ambari-server.pid > {code} -- This message was sent by Atlassian JIRA (v6.1#6144)