Project Scene:
Developing a microservice project, requires the service registration and configuration center. The development and application of Nacos technology. The native OS is Windows11, Nacos version is 2.1.1 installed on Drive D.
Problem description
Nacos start:
Double-click startup.cmd in the bin directory and it will flash back, that is, the startup failed;
Use the command to start: startup.cmd -m standalone, An error message appears
D:\Program Files (x86)\nacos-server-2.1.1\nacos\bin>startup.cmd -m standalone
"nacos is starting with standalone"
There should be no \nacos-server-2.1.1\nacos"\logs\java_heapdump.hprof -XX:-UseLargePages" at this point.
Solution:
The first solution: unzip Nacos to a directory does not contain non-English and numbers, Command line started successfully
Second solution: Open startup with editor, Comment out the content shown below:
rem if %MODE% == "cluster" (
rem echo "nacos is starting with cluster"
rem if %EMBEDDED_STORAGE% == "embedded" (
rem set "NACOS_OPTS=-DembeddedStorage=true"
rem )
rem set "NACOS_JVM_OPTS=-server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX: HeapDumpPath=%BASE_DIR%\logs\java_heapdump.hprof -XX:-UseLargePages"
rem )
Not sure if this solution will cause other problems, but it starts fine