incubator-ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Sposetti (JIRA)" <>
Subject [jira] [Created] (AMBARI-3306) Empty ambari server .pid causes Traceback
Date Mon, 23 Sep 2013 14:34:04 GMT
Jeff Sposetti created AMBARI-3306:

             Summary: Empty ambari server .pid causes Traceback
                 Key: AMBARI-3306
             Project: Ambari
          Issue Type: Bug
    Affects Versions: 1.4.1
            Reporter: Jeff Sposetti

Went thru and make some ambari-server changes -- don't have steps to repro -- but it resulted
in the file to empty (file exists but 0 size).

ambari-server start or status command caused a traceback. The customer didn't know how to
fix. We deleted /var/run/ambari-server/ and things were OK.

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/", line 3988, in <module>
  File "/usr/sbin/", line 3813, in main
  File "/usr/sbin/", line 2471, in status
    status, pid = is_server_runing()
  File "/usr/sbin/", line 3221, in is_server_runing
    pid = int(f.readline())
ValueError: invalid literal for int() with base 10: ''

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.

ERROR: unable to read /var/run/ambari-server/

Additionally, if we find the file is 0 size, should we print this error and just delete the
file automatically (well, tell them we are removing first).

ERROR: /var/run/ambari-server/ is empty. Removing.
ERROR: unable to read /var/run/ambari-server/

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message