报错信息
2022-02-01 23:11:16.745 ERROR 2776 --- [ main] o.a.dubbo.registry.nacos.NacosRegistry : [DUBBO] Failed to notify addresses for subscribe dubbo://192.168.75.1/com.space.mall.provider.service.OrderService?application=mall-consumer&category=providers,configurators,routers&check=true&dubbo=2.0.2&group=mall-service&interface=com.space.mall.provider.service.OrderService&metadata-type=remote&methods=save&pid=2776&qos.accept.foreign.ip=false&qos.enable=false&release=3.0.2&revision=1.0.0-RELEASE&side=consumer&sticky=false&timeout=60000×tamp=1643728275979&version=1.0.0-RELEASE, cause: Extension instance (name: kubernetes, class: interface org.apache.dubbo.rpc.cluster.router.mesh.route.MeshEnvListener) couldn't be instantiated: io/fabric8/kubernetes/client/KubernetesClient, dubbo version: 3.0.2, current host: 192.168.75.1
java.lang.IllegalStateException: Extension instance (name: kubernetes, class: interface org.apache.dubbo.rpc.cluster.router.mesh.route.MeshEnvListener) couldn't be instantiated: io/fabric8/kubernetes/client/KubernetesClient
原因
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<version>2.0.3</version>
</dependency>
解决
改为
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.9</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<version>2.0.4</version>
</dependency>