Spring Cloud 只提供dubbo接口 应用层发布项目报 Unsupported protocol 问题修复

编程入门 行业动态 更新时间:2024-10-09 15:17:13

Spring Cloud <a href=https://www.elefans.com/category/jswz/34/1575800.html style=只提供dubbo接口 应用层发布项目报 Unsupported protocol 问题修复"/>

Spring Cloud 只提供dubbo接口 应用层发布项目报 Unsupported protocol 问题修复

项目里面有一个项目使用的Spring Cloud 框架开发一个授权服务,此服务提供了dubbo接口,但是应用层每次发布的时候出现如下错误
错误信息:

[DUBBO] Unsupported protocol., dubbo version: 3.1.6, current host: xxx.xxx.xxx.xxx, error code: 4-1. 
This may be caused by protocol extension does not installed, 
go to  to find instructions. ,

详细错误信息

java.lang.IllegalStateException: Unsupported protocol rest in notified url: DefaultServiceInstance{serviceName='xxx-service', host='xxx.xxx.xxx.xxxx', port=8080, enabled=true, healthy=true, metadata={t=3, preserved.register.source=SPRING_CLOUD, __micro.service.app.id__=xxxxxxxxxxxx, opensergo.io/canary=xxxxxxxxxxxx}}, null from registry naco to consumer xxx.xxx.xxx.x, supported protocol: [dubbo, injvm, mock, registry, service-discovery-registry, tri]

原因

框架里面的配置
spring.cloud.nacos.discovery.enabled 默认是true, 授权服务启动的时候会在naco 里面注册一个服务名为【SPRING_CLOUD】的 ,这个协议包含reset, 但是调用方只支持了dubbo,就出现了上述错误。

解决方案:

spring.cloud.nacos.discovery.enabled=false

更多推荐

Spring Cloud 只提供dubbo接口 应用层发布项目报 Unsupported protocol 问题修复

本文发布于:2023-12-06 07:12:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1666824.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:只提供   应用层   接口   项目   Cloud

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!