环境背景

出现问题的设备 Nacos 版本
M1芯片 MacBook Pro 1.4.3 (Jan 27, 2022)

1. 全新解压的文件,未修改过任何配置。
1. 并且路径下无中文也无空格。
  1. 输入:mvn -v
  2. 返回:
  3. Apache Maven 3.8.5
  4. Maven home: /Library/Repositories/Maven/apache-maven-3.8.5
  5. Java version: 1.8.0_201, vendor: Oracle Corporation, runtime: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
  6. Default locale: zh_CN, platform encoding: UTF-8
  7. OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"
  1. 输入:echo $JAVA_HOME
  2. 返回:/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home

:::info Java 和 Maven 的各项功能都正常 :::

试着去启动 Nacos 服务器

  1. sh startup.sh -m standalone
  1. /Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/bin/java -Xms512m -Xmx512m -Xmn256m -Dnacos.standalone=true -Dnacos.member.list= -Djava.ext.dirs=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/lib/ext:/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/lib/ext -Xloggc:/Library/Repositories/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dloader.path=/Library/Repositories/nacos/plugins/health,/Library/Repositories/nacos/plugins/cmdb -Dnacos.home=/Library/Repositories/nacos -jar /Library/Repositories/nacos/target/nacos-server.jar --spring.config.additional-location=file:/Library/Repositories/nacos/conf/ --logging.config=/Library/Repositories/nacos/conf/nacos-logback.xml --server.max-http-header-size=524288
  2. nacos is starting with standalone
  3. nacos is startingyou can check the /Library/Repositories/nacos/logs/start.out
  1. /Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/bin/java -Xms512m -Xmx512m -Xmn256m -Dnacos.standalone=true -Dnacos.member.list= -Djava.ext.dirs=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/lib/ext:/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/lib/ext -Xloggc:/Library/Repositories/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dloader.path=/Library/Repositories/nacos/plugins/health,/Library/Repositories/nacos/plugins/cmdb -Dnacos.home=/Library/Repositories/nacos -jar /Library/Repositories/nacos/target/nacos-server.jar --spring.config.additional-location=file:/Library/Repositories/nacos/conf/ --logging.config=/Library/Repositories/nacos/conf/nacos-logback.xml --server.max-http-header-size=524288
  2. ,--.
  3. ,--.'|
  4. ,--,: : | Nacos 1.4.3
  5. ,`--.'`| ' : ,---. Running in stand alone mode, All function modules
  6. | : : | | ' ,'\ .--.--. Port: 8848
  7. : | \ | : ,--.--. ,---. / / | / / ' Pid: 44314
  8. | : ' '; | / \ / \. ; ,. :| : /`./ Console: http://192.168.31.162:8848/nacos/index.html
  9. ' ' ;. ;.--. .-. | / / '' | |: :| : ;_
  10. | | | \ | \__\/: . .. ' / ' | .; : \ \ `. https://nacos.io
  11. ' : | ; .' ," .--.; |' ; :__| : | `----. \
  12. | | '`--' / / ,. |' | '.'|\ \ / / /`--' /
  13. ' : | ; : .' \ : : `----' '--'. /
  14. ; |.' | , .-./\ \ / `--'---'
  15. '---' `--`---' `----'
  16. 2022-03-25 07:22:02,161 INFO Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@49b2a47d' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  17. 2022-03-25 07:22:02,200 INFO Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  18. 2022-03-25 07:22:03,145 INFO Tomcat initialized with port(s): 8848 (http)
  19. 2022-03-25 07:22:03,786 INFO Root WebApplicationContext: initialization completed in 6707 ms
  20. 2022-03-25 07:22:10,048 INFO Initializing ExecutorService 'applicationTaskExecutor'
  21. 2022-03-25 07:22:10,598 INFO Adding welcome page: class path resource [static/index.html]
  22. 2022-03-25 07:22:11,500 INFO Creating filter chain: Ant [pattern='/**'], []
  23. 2022-03-25 07:22:11,573 INFO Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3e2822, org.springframework.security.web.context.SecurityContextPersistenceFilter@2ce86164, org.springframework.security.web.header.HeaderWriterFilter@1c98290c, org.springframework.security.web.csrf.CsrfFilter@9635fa, org.springframework.security.web.authentication.logout.LogoutFilter@4602c2a9, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@51df223b, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@4204541c, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@79e18e38, org.springframework.security.web.session.SessionManagementFilter@5bda80bf, org.springframework.security.web.access.ExceptionTranslationFilter@63c5efee]
  24. 2022-03-25 07:22:11,736 INFO Initializing ExecutorService 'taskScheduler'
  25. 2022-03-25 07:22:11,764 INFO Exposing 2 endpoint(s) beneath base path '/actuator'
  26. 2022-03-25 07:22:12,023 INFO Tomcat started on port(s): 8848 (http) with context path '/nacos'
  27. 2022-03-25 07:22:12,033 INFO Nacos started successfully in stand alone mode. use embedded storage

诶为什么又能启动了?????

我真的是**此处省略脏话一万句……