You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2017/01/20 21:00:44 UTC
ambari git commit: AMBARI-19654. Increase ambari server timeout for
checking PID file and other log improvements (Madhuvanthi Radhakrishnan via
smohanty)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 6ab074be3 -> f6e38dcd0
AMBARI-19654. Increase ambari server timeout for checking PID file and other log improvements (Madhuvanthi Radhakrishnan via smohanty)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f6e38dcd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f6e38dcd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f6e38dcd
Branch: refs/heads/branch-2.5
Commit: f6e38dcd040da0a23980a2f1f996bf692e984e8c
Parents: 6ab074b
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Fri Jan 20 11:07:25 2017 -0800
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Fri Jan 20 13:00:18 2017 -0800
----------------------------------------------------------------------
.../src/main/python/ambari_server_main.py | 29 ++++++++++++--------
1 file changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f6e38dcd/ambari-server/src/main/python/ambari_server_main.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server_main.py b/ambari-server/src/main/python/ambari_server_main.py
index a3fb08d..e7538ee 100644
--- a/ambari-server/src/main/python/ambari_server_main.py
+++ b/ambari-server/src/main/python/ambari_server_main.py
@@ -103,7 +103,7 @@ SERVER_START_CMD_DEBUG_WINDOWS = "{0} " \
"org.apache.ambari.server.controller.AmbariServer"
SERVER_START_TIMEOUT = 5
-SERVER_START_RETRIES = 4
+SERVER_START_RETRIES = 10
SERVER_PING_TIMEOUT_WINDOWS = 5
SERVER_PING_ATTEMPTS_WINDOWS = 4
@@ -116,6 +116,7 @@ CHECK_DATABASE_SKIPPED_PROPERTY = "check_database_skipped"
AMBARI_SERVER_DIE_MSG = "Ambari Server java process died with exitcode {0}. Check {1} for more information."
AMBARI_SERVER_NOT_STARTED_MSG = "Ambari Server java process hasn't been started or can't be determined."
+AMBARI_SERVER_STARTED_SUCCESS_MSG = "Ambari Server has started successfully"
# linux open-file limit
ULIMIT_OPEN_FILES_KEY = 'ulimit.open.files'
@@ -218,22 +219,26 @@ def wait_for_server_start(pidFile, scmStatus):
locate_all_file_paths('bash', '/bin') +
locate_all_file_paths('dash', '/bin'), IS_FOREGROUND):
server_started = True
+ sys.stdout.write("Server PID determined " + AMBARI_SERVER_STARTED_SUCCESS_MSG + "\n")
break
else:
sys.stdout.write("Unable to determine server PID. Retrying...\n")
sys.stdout.flush()
- if 'Database consistency check: failed' in open(configDefaults.SERVER_OUT_FILE).read():
- print "DB configs consistency check failed. Run \"ambari-server start --skip-database-check\" to skip. " \
- "You may try --auto-fix-database flag to attempt to fix issues automatically. " \
- "If you use this \"--skip-database-check\" option, do not make any changes to your cluster topology " \
- "or perform a cluster upgrade until you correct the database consistency issues. See " + \
- configDefaults.DB_CHECK_LOG + "for more details on the consistency issues."
- elif 'Database consistency check: warning' in open(configDefaults.SERVER_OUT_FILE).read():
- print "DB configs consistency check found warnings. See " + \
- configDefaults.DB_CHECK_LOG + " for more details."
- else:
- print "DB configs consistency check: no errors and warnings were found."
+ if os.path.isfile(configDefaults.SERVER_OUT_FILE):
+ if 'Database consistency check: failed' in open(configDefaults.SERVER_OUT_FILE).read():
+ print "DB configs consistency check failed. Run \"ambari-server start --skip-database-check\" to skip. " \
+ "You may try --auto-fix-database flag to attempt to fix issues automatically. " \
+ "If you use this \"--skip-database-check\" option, do not make any changes to your cluster topology " \
+ "or perform a cluster upgrade until you correct the database consistency issues. See " + \
+ configDefaults.DB_CHECK_LOG + "for more details on the consistency issues."
+ elif 'Database consistency check: warning' in open(configDefaults.SERVER_OUT_FILE).read():
+ print "DB configs consistency check found warnings. See " + \
+ configDefaults.DB_CHECK_LOG + " for more details."
+ else:
+ print "DB configs consistency check: no errors and warnings were found."
+ else:
+ sys.stdout.write(configDefaults.SERVER_OUT_FILE + " does not exist")
if server_started:
return