Skip to content

Commit

Permalink
[bugfix] fix collector startup error classpath (apache#2004)
Browse files Browse the repository at this point in the history
Signed-off-by: tomsun28 <[email protected]>
  • Loading branch information
tomsun28 authored May 18, 2024
1 parent a628c7d commit 2d925eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/assembly/collector/bin/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ echo -e "Starting the HertzBeat $SERVER_NAME ..."

if [ -f "./java/bin/java" ]; then
echo -e "Use the inner package jdk to start"
nohup ./java/bin/java $JAVA_OPTS $JAVA_MEM_OPTS $CONFIG_FILES $CLASSPATH $MAIN_CLASS >logs/startup.log 2>&1 &
nohup ./java/bin/java $JAVA_OPTS $JAVA_MEM_OPTS $CONFIG_FILES -cp $CLASSPATH $MAIN_CLASS >logs/startup.log 2>&1 &
else
JAVA_EXIST=`which java | grep bin | wc -l`
if [ $JAVA_EXIST -le 0 ]; then
echo -e "ERROR: there is no java17+ environment, please config java environment."
exit 1
fi
echo -e "Use the system environment jdk to start"
nohup java $JAVA_OPTS $JAVA_MEM_OPTS $CONFIG_FILES $CLASSPATH $MAIN_CLASS >logs/startup.log 2>&1 &
nohup java $JAVA_OPTS $JAVA_MEM_OPTS $CONFIG_FILES -cp $CLASSPATH $MAIN_CLASS >logs/startup.log 2>&1 &
fi

COUNT=0
Expand Down

0 comments on commit 2d925eb

Please sign in to comment.