diff --git a/bin/start-dashboard.sh b/bin/start-dashboard.sh index ea2f1f968d..f3d038c9d4 100755 --- a/bin/start-dashboard.sh +++ b/bin/start-dashboard.sh @@ -92,6 +92,6 @@ else fi DASHBOARD_JAVA_OPTS=${DASHBOARD_JAVA_OPTS:-""} -(nohup $RUNNER ${DASHBOARD_BASE_JVM_ARGS} ${DASHBOARD_JVM_GC_ARGS} ${JVM_LOG_ARGS} ${DASHBOARD_JAVA_OPTS} -cp ${CLASSPATH} ${MAIN_CLASS} --conf "${DASHBOARD_CONF_FILE}" $@ > ${LOG_OUT_PATH} 2>&1) & +(nohup $RUNNER ${DASHBOARD_BASE_JVM_ARGS} ${DASHBOARD_JVM_GC_ARGS} ${JVM_LOG_ARGS} ${DASHBOARD_JAVA_OPTS} -cp ${CLASSPATH} ${MAIN_CLASS} --conf "${DASHBOARD_CONF_FILE}" $@ 2>&1 | tee -a ${LOG_OUT_PATH}) & get_pid_file_name dashboard echo $! >${RSS_PID_DIR}/${pid_file} diff --git a/deploy/kubernetes/docker/start.sh b/deploy/kubernetes/docker/start.sh index d2da5d7a5d..c3602897ef 100644 --- a/deploy/kubernetes/docker/start.sh +++ b/deploy/kubernetes/docker/start.sh @@ -58,5 +58,14 @@ fi if [ "$SERVICE_NAME" == "dashboard" ]; then bash ${basedir}/bin/start-dashboard.sh + while : ; do + pid=$(lsof -i:"$DASHBOARD_PORT" -sTCP:LISTEN) + if [ "$pid" = "" ]; then + break + else + echo "dashboard pid:$pid is alive" + sleep 10 + fi + done fi