alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.01k stars 12.8k forks source link

2.4.1在jdk11下无法启动并报错 #12550

Closed ProcessMonitor closed 1 day ago

ProcessMonitor commented 2 weeks ago

My env : Windows 10

when i try to start nacos:

run command line :

sh startup.sh -m standalone

startup.cmd still not work either.

Log file (log/start.out):

C:\Program Files\Java\jdk-11\/bin/java -Djava.ext.dirs=C:\Program Files\Java\jdk-11\/jre/lib/ext:C:\Program Files\Java\jdk-11\/lib/ext -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/d/Download/Nacos/nacos/logs/java_heapdump.hprof -XX:-UseLargePages -Dnacos.member.list= -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -Xloggc:/d/Download/Nacos/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dloader.path=/d/Download/Nacos/nacos/plugins,/d/Download/Nacos/nacos/plugins/health,/d/Download/Nacos/nacos/plugins/cmdb,/d/Download/Nacos/nacos/plugins/selector -Dnacos.home=/d/Download/Nacos/nacos -jar /d/Download/Nacos/nacos/target/nacos-server.jar --spring.config.additional-location=file:/d/Download/Nacos/nacos/conf/ --logging.config=/d/Download/Nacos/nacos/conf/nacos-logback.xml --server.max-http-header-size=524288 nohup: ignoring input -Djava.ext.dirs=C:\Program Files\Java\jdk-11\/jre/lib/ext:C:\Program Files\Java\jdk-11\/lib/ext is not supported. Use -classpath instead. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

Already seen #6609 and #12549 , still can't fix this.

KomachiSion commented 2 weeks ago

use sh command in windows os?

Can you try with startup.cmd?

In CI env of ubuntu and my env of macos, jdk11 can work well.

ProcessMonitor commented 2 weeks ago

no,windows os still cant work by two ways above.

KomachiSion commented 1 week ago

I see it can work in jdk11 with macos and linux os, I don't have windows os env, see community whether can reproduce this problem.

xingjunfeng commented 1 week ago

My computer use Windows 11 with java 17 ,in java 17 has this problem. But alibaba release 2.4.2 fix some problem. I`ll try 2.4.2. https://github.com/alibaba/nacos/releases/tag/2.4.2

xingjunfeng commented 1 week ago

My computer use Windows 11 with java 17 ,in java 17 has this problem. But alibaba release 2.4.2 fix some problem. I`ll try 2.4.2. https://github.com/alibaba/nacos/releases/tag/2.4.2

success image

KomachiSion commented 1 day ago

No more response from author for a long time, and this problem seems new version has solved this problem.