2021-04-29 10:39:47.148 ERROR 10844 — [ main] c.a.c.n.registry.NacosServiceRegistry : nacos registry, dubbo-service1 register failed…NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAddr=‘localhost:8848’, endpoint=’’, namespace=‘8dd0360a-b54a-422c-bacd-212910c9269a’, watchDelay=30000, logName=’’, service=‘dubbo-service1’, weight=1.0, clusterName=‘DEFAULT’, namingLoadCacheAtStart=‘false’, metadata={dubbo.metadata-service.urls=[ “dubbo://192.168.1.2:20881/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true&application=dubbo-service1&bind.ip=192.168.1.2&bind.port=20881&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&group=dubbo-service1&interface=com.alibaba.cloud.dubbo.service.DubboMetadataService&methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs&pid=10844&qos.enable=false®ister=true&release=2.7.3&revision=2.1.0.RELEASE&side=provider×tamp=1619663986662&version=1.0.0” ], preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip=‘192.168.1.2’, networkInterface=’’, port=-1, secure=false, accessKey=’’, secretKey=’’}},
java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([localhost:8848]) tried: failed to req API:localhost:8848/nacos/v1/ns/instance. code:400 msg: instance format invalid:192.168.1.2:unknown:DEFAULT_1.0_true_false_DEFAULT
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:464) ~[nacos-client-1.1.1.jar:na]
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:386) ~[nacos-client-1.1.1.jar:na]
at com.alibaba.nacos.client.naming.net.NamingProxy.registerService(NamingProxy.java:188) ~[nacos-client-1.1.1.jar:na]
at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:205) ~[nacos-client-1.1.1.jar:na]
at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:184) ~[nacos-client-1.1.1.jar:na]
at com.alibaba.cloud.nacos.registry.NacosServiceRegistry.register(NacosServiceRegistry.java:61) ~[spring-cloud-alibaba-nacos-discovery-2.1.0.RELEASE.jar:2.1.0.RELEASE]
at com.alibaba.cloud.nacos.registry.NacosServiceRegistryFastClassBySpringCGLIBFastClassBySpringCGLIBFastClassBySpringCGLIBca3a8dbd.invoke() [spring-cloud-alibaba-nacos-discovery-2.1.0.RELEASE.jar:2.1.0.RELEASE]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) [spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.aop.framework.CglibAopProxyCglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:56)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:47)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.CglibAopProxyCglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749) [spring-aop-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [spring-aop-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:56) [spring-aop-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) [spring-aop-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:47) [spring-aop-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) [spring-aop-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93) [spring-aop-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.aop.framework.CglibAopProxyCglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:56)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:47)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)[spring−aop−5.1.5.RELEASE.jar:5.1.5.RELEASE]atorg.springframework.aop.framework.CglibAopProxyDynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) [spring-aop-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at com.alibaba.cloud.nacos.registry.NacosServiceRegistryEnhancerBySpringCGLIBEnhancerBySpringCGLIBEnhancerBySpringCGLIB7824d666.register() [spring-cloud-alibaba-nacos-discovery-2.1.0.RELEASE.jar:2.1.0.RELEASE]
at com.alibaba.cloud.dubbo.autoconfigure.DubboServiceRegistrationNonWebApplicationAutoConfiguration.register(DubboServiceRegistrationNonWebApplicationAutoConfiguration.java:92) [spring-cloud-alibaba-dubbo-2.1.0.RELEASE.jar:2.1.0.RELEASE]
at com.alibaba.cloud.dubbo.autoconfigure.DubboServiceRegistrationNonWebApplicationAutoConfiguration.onApplicationStarted(DubboServiceRegistrationNonWebApplicationAutoConfiguration.java:85) [spring-cloud-alibaba-dubbo-2.1.0.RELEASE.jar:2.1.0.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_152]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_152]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_152]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_152]
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:259) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:179) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:142) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:99) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:72) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at com.hanbojun.microservice.service1.Service1Bootstrap.main(Service1Bootstrap.java:9) [classes/:na]
注册信息失败
2021-04-29 10:39:47.148 ERROR 10844 — [ main] c.a.c.n.registry.NacosServiceRegistry : nacos registry, dubbo-service1 register
server:
port: 9952
spring:
application:
name: dubbo-service1
main:
allow-bean-definition-overriding: true #sprinmg boot 2.1需要设定
cloud:
nacos:
discovery: #Nacos 服务发现与注册配置,其中子属性 server-addr 指定 Nacos 服务器 主机和端口
server-addr: localhost:8848
namespace: 8dd0360a-b54a-422c-bacd-212910c9269a #指定开发环境的id
cluster-name: DEFAULT #默认集群
dubbo:
scan:
#dubbo扫描基准包
base-packages: com.dubbo.microservice.service1.service
protocol:
#dubbo协议
name: dubbo
#dubbo协议端口
port: 20881
registry:
address: nacos://localhost:8848
application:
qos-enable: false #duboo运维服务是否开启
consumer:
check: false #启动时是否检查依赖的服务
经过排查后
修改后启动正常