Dubbo升级到2.7.15后,在k8s环境部署,无法找到provider
问题:由于一些依赖相关的原因,决定升级Dubbo到2.7.15,注册中心用的是nacos,每个集群有两个实例,在测试环境单实例测试都正常,但是部署到rancher上的集群环境后,发现只有provider启动了,其他consumer都没有启动起来,查了下consumer的报错全是: 08:04:13.782 [main] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext 559- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'p4bBusinessBrokersServiceImpl': Unsatisfied dependency expressed through field 'ip4bWalletsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'p4bWalletsServiceImpl' defined in URL [jar:file:/app/framework-boot.jar!/BOOT-INF/lib/p4b-service-micro-0.0.1-SNAPSHOT.jar!/com/finpoints/framework/micro/impl/P4bWalletsServiceImpl.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ServiceBean:com.finpoints.framework.micro.api.IP4bExchangeOrdersService': Cannot resolve reference to bean 'p4bExchangeOrdersServiceImpl' while setting bean property 'ref'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'p4bExchangeOrdersServiceImpl': Injection of @DubboReference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.finpoints.framework.outer.api.IP4bEmailService. No provider available for the service com.finpoints.framework.outer.api.IP4bEmailService from the url dubbo://10.42.6.198/com.finpoints.framework.outer.api.IP4bEmailService?application=api-p4b-micro&dubbo=2.0.2&init=false&interface=com.finpoints.framework.outer.api.IP4bEmailService&metadata-type=remote&methods=sendMailgunMail,sendAilYunMail,sendgridMail,sendcloudMail,sendSmtpMail&pid=6&qos.enable=false®ister.ip=10.42.6.198&release=2.7.15&revision=0.0.1-SNAPSHOT&side=consumer&sticky=false&timeout=50000×tamp=1673251453385 to the consumer 10.42.6.198 use dubbo version 2.7.15
provider的pod启动起来了,但是provider最后有这样的报错
07:58:34.665 [com.alibaba.nacos.client.naming.updater.0] INFO com.alibaba.nacos.client.naming 166- current ips:(2) service: DEFAULT_GROUP@@api-p4b-outer@@DEFAULT -> [{"ip":"10.42.3.56","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@api-p4b-outer","metadata":{"preserved.register.source":"SPRING_CLOUD"},"ipDeleteTimeout":30000,"instanceHeartBeatTimeOut":15000,"instanceHeartBeatInterval":5000},{"ip":"10.42.3.57","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@api-p4b-outer","metadata":{"preserved.register.source":"SPRING_CLOUD"},"ipDeleteTimeout":30000,"instanceHeartBeatTimeOut":15000,"instanceHeartBeatInterval":5000}] 07:59:36.825 [NettyServerWorker-6-2] INFO o.a.d.r.t.netty4.NettyServerHandler 91- [DUBBO] The connection of /10.42.5.196:42284 -> /10.42.3.57:20880 is disconnected., dubbo version: 2.7.15, current host: 10.42.3.57 07:59:59.161 [NettyServerWorker-6-1] INFO o.a.d.r.t.netty4.NettyServerHandler 76- [DUBBO] The connection of /10.42.5.196:44582 -> /10.42.3.57:20880 is established., dubbo version: 2.7.15, current host: 10.42.3.57 08:01:12.844 [NettyServerWorker-6-1] INFO o.a.d.r.t.netty4.NettyServerHandler 91- [DUBBO] The connection of /10.42.5.196:44582 -> /10.42.3.57:20880 is disconnected., dubbo version: 2.7.15, current host: 10.42.3.57 08:01:38.800 [NettyServerWorker-6-2] INFO o.a.d.r.t.netty4.NettyServerHandler 76- [DUBBO] The connection of /10.42.5.196:47000 -> /10.42.3.57:20880 is established., dubbo version: 2.7.15, current host: 10.42.3.57 08:02:48.819 [NettyServerWorker-6-2] INFO o.a.d.r.t.netty4.NettyServerHandler 91- [DUBBO] The connection of /10.42.5.196:47000 -> /10.42.3.57:20880 is disconnected., dubbo version: 2.7.15, current host: 10.42.3.57 08:03:10.555 [NettyServerWorker-6-1] INFO o.a.d.r.t.netty4.NettyServerHandler 76- [DUBBO] The connection of /10.42.5.196:49254 -> /10.42.3.57:20880 is established., dubbo version: 2.7.15, current host: 10.42.3.57 08:04:24.845 [NettyServerWorker-6-1] INFO o.a.d.r.t.netty4.NettyServerHandler 91- [DUBBO] The connection of /10.42.5.196:49254 -> /10.42.3.57:20880 is disconnected., dubbo version: 2.7.15, current host: 10.42.3.57
provider 用的 Spring cloud alibaba 吗
provider 用的 spring cloud alibaba 吗
对,都是springcloud alibaba,改动只是升级了dubbo版本, 有没有可能是因为访问的provider的ip还是访问的之前的?
provider服务看起来是注册进了nacos
provider服务看起来是注册进了nacos
这个截图的数据显示 provider 没有使用 Spring cloud alibaba dubbo,这个 consumer 是没办法订阅到的
如果是 SCA Dubbo 的话会有一些 dubbo 特征的 metadata