Check what occupies port 8848
https://product.pconline.com.cn/itbk/softwa re/dnyw/1581/15810431.html
nacos2.0.2 Failed to start standalone using startup. cmd-m
* * 1. On the same computer, Nacos1.x. x version was started successfully, but the project should use nacos2 version, 2. Port 8848 is not occupied.
**
Error logs are as follows:
2023-02-27 16:36:43,716 INFO Starting Nacos v2.0.2 on DESKTOP-EM2GGNH with PID 25284 (D:\Software\nacos\target\nacos-server.jar started by Administrator in D:\Software\nacos\bin)
2023-02-27 16:36:43,716 INFO The following profiles are active: standalone
2023-02-27 16:36:48,998 INFO Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@14c053c6' 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)
2023-02-27 16:36:48,998 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)
2023-02-27 16:36:49,638 INFO Tomcat initialized with port(s): 8848 (http)
2023-02-27 16:36:49,669 INFO Starting service [Tomcat]
2023-02-27 16:36:49,669 INFO Starting Servlet engine: [Apache Tomcat/9.0.38]
2023-02-27 16:36:50,028 INFO At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2023-02-27 16:36:50,060 INFO Initializing Spring embedded WebApplicationContext
2023-02-27 16:36:50,060 INFO Root WebApplicationContext: initialization completed in 6265 ms
2023-02-27 16:36:50,690 INFO HikariPool-1 - Starting...
2023-02-27 16:36:50,692 WARN Registered driver with driverClassName=org.apache.derby.jdbc.EmbeddedDriver was not found, trying direct instantiation.
2023-02-27 16:36:51,844 INFO HikariPool-1 - Driver does not support get/set network timeout for connections. (Feature not implemented: No details.)
2023-02-27 16:36:51,849 INFO HikariPool-1 - Start completed.
2023-02-27 16:36:53,248 INFO Nacos-related cluster resource initialization
2023-02-27 16:36:53,248 INFO The cluster resource is initialized
2023-02-27 16:36:55,615 WARN Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceOperatorV2Impl' defined in URL [jar:file:/D:/Software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.2.jar!/com/alibaba/nacos/naming/core/ServiceOperatorV2Impl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'namingMetadataOperateService' defined in URL [jar:file:/D:/Software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.2.jar!/com/alibaba/nacos/naming/core/v2/metadata/NamingMetadataOperateService.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataOperateService]: Constructor threw exception; nested exception is com.alibaba.nacos.core.distributed.raft.exception.JRaftException: java.io.IOException: Failed to bind
2023-02-27 16:36:55,623 INFO Stopping service [Tomcat]
2023-02-27 16:36:55,623 WARN The web application [nacos] appears to have started a thread named [HikariPool-1 housekeeper] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
2023-02-27 16:36:55,623 WARN The web application [nacos] appears to have started a thread named [HikariPool-1 connection adder] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
2023-02-27 16:36:55,638 ERROR Startup errors :
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceOperatorV2Impl' defined in URL [jar:file:/D:/Software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.2.jar!/com/alibaba/nacos/naming/core/ServiceOperatorV2Impl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'namingMetadataOperateService' defined in URL [jar:file:/D:/Software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.2.jar!/com/alibaba/nacos/naming/core/v2/metadata/NamingMetadataOperateService.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataOperateService]: Constructor threw exception; nested exception is com.alibaba.nacos.core.distributed.raft.exception.JRaftException: java.io.IOException: Failed to bind
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'namingMetadataOperateService' defined in URL [jar:file:/D:/Software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.2.jar!/com/alibaba/nacos/naming/core/v2/metadata/NamingMetadataOperateService.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataOperateService]: Constructor threw exception; nested exception is com.alibaba.nacos.core.distributed.raft.exception.JRaftException: java.io.IOException: Failed to bind
...
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataOperateService]: Constructor threw exception; nested exception is com.alibaba.nacos.core.distributed.raft.exception.JRaftException: java.io.IOException: Failed to bind
...
Caused by: com.alibaba.nacos.core.distributed.raft.exception.JRaftException: java.io.IOException: Failed to bind
...
Caused by: java.io.IOException: Failed to bind
...
Caused by: java.net.BindException: Address already in use: bind
...
2023-02-27 16:36:57,185 WARN [WatchFileCenter] start close
2023-02-27 16:36:57,185 WARN [WatchFileCenter] start to shutdown this watcher which is watch : D:\Software\nacos\data\loader
2023-02-27 16:36:57,185 WARN [WatchFileCenter] start to shutdown this watcher which is watch : D:\Software\nacos\conf
2023-02-27 16:36:57,185 WARN [WatchFileCenter] start to shutdown this watcher which is watch : D:\Software\nacos\data\tps
2023-02-27 16:36:57,185 WARN [WatchFileCenter] already closed
2023-02-27 16:36:57,185 WARN [NotifyCenter] Start destroying Publisher
2023-02-27 16:36:57,185 WARN [NotifyCenter] Destruction of the end
2023-02-27 16:36:57,185 ERROR Nacos failed to start, please see D:\Software\nacos\logs\nacos.log for more details.
2023-02-27 16:36:57,185 INFO
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-02-27 16:36:57,185 ERROR Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceOperatorV2Impl' defined in URL [jar:file:/D:/Software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.2.jar!/com/alibaba/nacos/naming/core/ServiceOperatorV2Impl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'namingMetadataOperateService' defined in URL [jar:file:/D:/Software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.2.jar!/com/alibaba/nacos/naming/core/v2/metadata/NamingMetadataOperateService.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataOperateService]: Constructor threw exception; nested exception is com.alibaba.nacos.core.distributed.raft.exception.JRaftException: java.io.IOException: Failed to bind
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'namingMetadataOperateService' defined in URL [jar:file:/D:/Software/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.0.2.jar!/com/alibaba/nacos/naming/core/v2/metadata/NamingMetadataOperateService.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataOperateService]: Constructor threw exception; nested exception is com.alibaba.nacos.core.distributed.raft.exception.JRaftException: java.io.IOException: Failed to bind
...
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataOperateService]: Constructor threw exception; nested exception is com.alibaba.nacos.core.distributed.raft.exception.JRaftException: java.io.IOException: Failed to bind
...
Caused by: com.alibaba.nacos.core.distributed.raft.exception.JRaftException: java.io.IOException: Failed to bind
...
Caused by: java.io.IOException: Failed to bind
...
Caused by: java.net.BindException: Address already in use: bind
0 Answer
Check what occupies port 8848
https://product.pconline.com.cn/itbk/softwa re/dnyw/1581/15810431.html
这家伙很懒,什么都没留下...