[seata]mack book pro m2 jdk 21.0.1 seata-server 2.0.2 无法正常启动

2024-02-21 434 views
4

Ibliu@dongkangdeMacBook-Pro seata % java version java version "21.0.1" 2023-10-17 LTS Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29) Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing) [bliu@dongkangdeMacBook-Pro seata % cd bin [bliu@dongkangdeMacBook-Pro bin % sh seata-server.sh apm-skywalking not enabled JMX disabled /Users/bliu/software/java/jdk-21.0.1.jdk/Contents/Home/bin/java =10 -Dog.home=/Users/bliu/logs/seata -server -Dloader.path=/Users/bliu/software/seata/lib -Xmx2048m -Xms2048m -Xss640k -XX:SurvivorRatio -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:MaxDirectMemorySize=1024m -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/Users/b liu/logs/seata/java_heapdump.hprof -XX:+DisableExplicitGC -Xlog:gc*:file=/Users/bliu/logs/seata/seata_gc.log:time, tags:filecount=10, filesize=102400 -Dio.netty.leakDetectionlevel=advanced -Dapp.name= seata-server -Dapp.pid=48495 -Dapp.home=/Users/bliu/software/seata -Dbasedir=/Users/bliu/software/seata -Dspring.config.additional-location=/Users/bliu/software/seata/conf/-Dspring.config.location =/Users/bliu/software/seata/conf/application.yml -Dlogging.config=/Users/bliu/software/seata/conf/logback-spring.xml -jar /Users/bliu/software/seata/target/seata-server.jar

› /dev/nu11 2>&1 & seata-server is starting, you can check the /Users/bliu/logs/seata/ *1og bliu@dongkangdeMacBook-Pro bin %

回答

3

根据提示去看一下日志输出了什么

Follow the prompts to see what the log output is

5

java -XX:+PrintFlagsFinal check the support JVM parameters.

1

根据输出显示的日志目录查看不到任何信息

3
/Users/bliu/software/java/jdk-21.0.1.jdk/Contents/Home/bin/java
=10
-Dog.home=/Users/bliu/logs/seata -server -Dloader.path=/Users/bliu/software/seata/lib -Xmx2048m -Xms2048m -Xss640k -XX:SurvivorRatio
-XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:MaxDirectMemorySize=1024m -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/Users/b
liu/logs/seata/java_heapdump.hprof -XX:+DisableExplicitGC -Xlog:gc*:file=/Users/bliu/logs/seata/seata_gc.log:time, tags:filecount=10, filesize=102400 -Dio.netty.leakDetectionlevel=advanced -Dapp.name=
seata-server -Dapp.pid=48495 -Dapp.home=/Users/bliu/software/seata -Dbasedir=/Users/bliu/software/seata
-Dspring.config.additional-location=/Users/bliu/software/seata/conf/-Dspring.config.location
=/Users/bliu/software/seata/conf/application.yml -Dlogging.config=/Users/bliu/software/seata/conf/logback-spring.xml -jar /Users/bliu/software/seata/target/seata-server.jar

用以上命令手动启动看下有什么异常,还有个问题,你如何确认无法正常启动的? To manually start using the above command, please check for any exceptions or errors. As for your second question, how do you confirm that it cannot start properly?

9

这个执行可以看到后台进程了,并且可以在本地访问到后台服务,所以执行 ./bin/seata-server.sh 拿到的只是执行程序的启动命令对吗?

3

./bin/seata-server.sh 是后台启动 "./bin/seata-server.sh" is used to start in the background.

9
  nohup $JAVACMD ${JAVA_OPT} ${NEW_ARGS} >> /dev/null 2>&1 &

will miss some standand output( write to /dev/null)

you can try change seata-server.sh

function start_server() {
  echo "$JAVACMD ${JAVA_OPT} ${NEW_ARGS} >> /dev/null 2>&1 &"
  nohup $JAVACMD ${JAVA_OPT} ${NEW_ARGS} >> x.log 2>&1 &
  echo "seata-server is starting, you can check the ${LOG_HOME}/ *.log"
}

and then run seata-server.sh and check x.log