nacos1.40启动失败,注册服务

nacos集成参考步骤

https://github.com/alibaba/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/nacos-example/nacos-discovery-example/readme-zh.md

启动nacos

在微服务中添加nacos依赖,yml中配置服务名,服务地址

添加注解 @EnableDiscoveryClient

 

1.40版本失败,默认集群启动

java.io.IOException: java.lang.IllegalArgumentException: db.num is null

 

 

 

 下面连接没参考

https://github.com/alibaba/nacos/issues/4074

参考了这个连接,解决默认集群启动失败问题!

https://blog.csdn.net/weixin_48040732/article/details/109492067

 

 

 

使用低版本1.13,可以启动成功

服务启动出现警告,也注册上了nacos

2020-12-29 08:36:52.964 WARN 20248 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2020-12-29 08:36:52.964 INFO 20248 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-12-29 08:36:52.967 WARN 20248 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2020-12-29 08:36:52.967 INFO 20248 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-12-29 08:36:53.102 INFO 20248 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-12-29 08:36:56.606 INFO 20248 --- [ main] o.s.cloud.commons.util.InetUtils : Cannot determine local hostname
2020-12-29 08:36:56.629 INFO 20248 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'Nacos-Watch-Task-Scheduler'
2020-12-29 08:37:00.714 INFO 20248 --- [ main] o.s.cloud.commons.util.InetUtils : Cannot determine local hostname
2020-12-29 08:37:01.321 INFO 20248 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 7000 (http) with context path ''
2020-12-29 08:37:01.339 INFO 20248 --- [ main] c.a.c.n.registry.NacosServiceRegistry : nacos registry, DEFAULT_GROUP gulimall-coupon 192.168.206.1:7000 register finished
2020-12-29 08:37:05.294 INFO 20248 --- [ main] o.s.cloud.commons.util.InetUtils : Cannot determine local hostname
2020-12-29 08:37:05.329 INFO 20248 --- [ main] c.d.g.coupon.GulimallCouponApplication : Started GulimallCouponApplication in 19.941 seconds (JVM running for 21.941)

https://blog.csdn.net/lizz861109/article/details/105488960

 

posted on 2020-12-29 09:11  daofree  阅读(3373)  评论(0编辑  收藏  举报