A-little-bit-of-data commented on issue #2849:
URL: 
https://github.com/apache/incubator-streampark/issues/2849#issuecomment-1632222915

   > > I tried to use the Dockfile in deploy to compile the 2.1.1 image by 
myself. After the image is compiled, deploying with helm has the same effect as 
using the official V2.1.1 image, and it keeps restarting.
   > 
   > I've encountered this issue before. In the startup script, if it uses 
'start' instead of 'start_docker', the application will start in the 
background, causing the Pod to enter the 'completed' state. I'm currently 
looking into how to fix this better. If your startup command uses 'start', you 
can temporarily remove the '&'.
   
   Hello, I see that start() is used by default in the startup script, and I 
didn't find the '&' you said that needs to be removed.
   
   # shellcheck disable=SC2120
   start() {
     # shellcheck disable=SC2006
     local PID=$(get_pid)
   
     if [ $PID -gt 0 ]; then
       # shellcheck disable=SC2006
       echo_r "StreamPark is already running pid: $PID , start aborted!"
       exit 1
     fi
   
     # Bugzilla 37848: only output this if we have a TTY
     if [[ ${have_tty} -eq 1 ]]; then
       echo_w "Using APP_BASE:   $APP_BASE"
       echo_w "Using APP_HOME:   $APP_HOME"
       if [[ "$1" = "debug" ]] ; then
         echo_w "Using JAVA_HOME:   $JAVA_HOME"
       else
         echo_w "Using JRE_HOME:   $JRE_HOME"
       fi
       echo_w "Using APP_PID:   $APP_PID"
     fi
   
     local PROPER="${APP_CONF}/application.yml"
     if [[ ! -f "$PROPER" ]] ; then
       echo_r "ERROR: config file application.yml invalid or not found! ";
       exit 1;
     else
       echo_g "Usage: config file: $PROPER ";
     fi
   
     # shellcheck disable=SC2046
     eval $(parse_yaml "${PROPER}" "conf_")
     # shellcheck disable=SC2001
     # shellcheck disable=SC2154
     # shellcheck disable=SC2155
     local workspace=$(echo "$conf_streampark_workspace_local" | sed 
's/#.*$//g')
     if [[ ! -d $workspace ]]; then
       echo_r "ERROR: streampark.workspace.local: \"$workspace\" is invalid 
path, Please reconfigure in application.yml"
       echo_r "NOTE: \"streampark.workspace.local\" Do not set under 
APP_HOME($APP_HOME). Set it to a secure directory outside of APP_HOME.  "
       exit 1;
     fi
     if [[ ! -w $workspace ]] || [[ ! -r $workspace ]]; then
         echo_r "ERROR: streampark.workspace.local: \"$workspace\" Permission 
denied! "
         exit 1;
     fi
   
     if [ "${HADOOP_HOME}"x == ""x ]; then
       echo_y "WARN: HADOOP_HOME is undefined on your system env,please check 
it."
     else
       echo_w "Using HADOOP_HOME:   ${HADOOP_HOME}"
     fi
   
     #
     # classpath options:
     # 1): java env (lib and jre/lib)
     # 2): StreamPark
     # 3): hadoop conf
     # shellcheck disable=SC2091
     local APP_CLASSPATH=".:${JAVA_HOME}/lib:${JAVA_HOME}/jre/lib"
     # shellcheck disable=SC2206
     # shellcheck disable=SC2010
     local JARS=$(ls "$APP_LIB"/*.jar | grep -v 
"$APP_LIB/streampark-flink-shims_.*.jar$")
     # shellcheck disable=SC2128
     for jar in $JARS;do
       APP_CLASSPATH=$APP_CLASSPATH:$jar
     done
   
     if [[ -n "${HADOOP_CONF_DIR}" ]] && [[ -d "${HADOOP_CONF_DIR}" ]]; then
       echo_w "Using HADOOP_CONF_DIR:   ${HADOOP_CONF_DIR}"
       APP_CLASSPATH+=":${HADOOP_CONF_DIR}"
     else
       APP_CLASSPATH+=":${HADOOP_HOME}/etc/hadoop"
     fi
   
     # shellcheck disable=SC2034
     # shellcheck disable=SC2006
     local vmOption=`$_RUNJAVA -cp "$APP_CLASSPATH" $PARAM_CLI --vmopt`
   
     local JAVA_OPTS="""
     $vmOption
     $DEFAULT_OPTS
     $DEBUG_OPTS
     """
   
     eval $NOHUP $_RUNJAVA $JAVA_OPTS \
       -classpath "$APP_CLASSPATH" \
       -Dapp.home="${APP_HOME}" \
       -Dlogging.config="${APP_CONF}/logback-spring.xml" \
       -Dspring.config.location="${PROPER}" \
       -Djava.io.tmpdir="$APP_TMPDIR" \
       $APP_MAIN >> "$APP_OUT" 2>&1 "&"
   
       local PID=$!
       local IS_NUMBER="^[0-9]+$"
   
       # Add to pid file if successful start
       if [[ ${PID} =~ ${IS_NUMBER} ]] && kill -0 $PID > /dev/null 2>&1 ; then
           echo $PID > "$APP_PID"
           # shellcheck disable=SC2006
           echo_g "StreamPark start successful. pid: $PID"
       else
           echo_r "StreamPark start failed."
           exit 1
       fi
   }
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to