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 https://dubbo.apache.org/faq/4/1 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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值