【motan rpc 懒加载】异常

文章目录

升级版本解决问题

xml 复制代码
<version.motan>1.2.1</version.motan>
            <dependency>
                <groupId>com.weibo</groupId>
                <artifactId>motan-core</artifactId>
                <version>${version.motan}</version>
            </dependency>

我使用的有问题的版本

xml 复制代码
<version.motan>1.1.10</version.motan>

配置懒加载

xml 复制代码
    <motan:protocol name="motan" loadbalance="roundrobin" haStrategy="failover" maxWorkerThread="20" minWorkerThread="5" lazyInit="true"/>

错误的版本配置了懒加载 但是不生效 lazyInit="true" 启动不是懒加载 会报错一次

bash 复制代码
2024-06-25 10:41:02:302 ERROR [main][error] - NettyClient init pool create connect Error: url=motan://127.0.0.1:12006/******.Facade
com.weibo.api.motan.exception.MotanServiceException: error_message: NettyChannel failed to connect to server, url: motan://127.0.0.1:12006/******.Facade, result: true, success: false, connected: false, status: 503, error_code: 10001,r=null
	at com.weibo.api.motan.transport.netty4.NettyChannel.open(NettyChannel.java:145) ~[motan-transport-netty4-1.1.10.RELEASE.jar:?]
	at com.weibo.api.motan.transport.AbstractSharedPoolClient.createConnections(AbstractSharedPoolClient.java:80) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.transport.AbstractSharedPoolClient.initConnections(AbstractSharedPoolClient.java:73) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.transport.AbstractSharedPoolClient.initPool(AbstractSharedPoolClient.java:59) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.transport.netty4.NettyClient.open(NettyClient.java:192) ~[motan-transport-netty4-1.1.10.RELEASE.jar:?]
	at com.weibo.api.motan.protocol.rpc.DefaultRpcReferer.doInit(DefaultRpcReferer.java:77) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.rpc.AbstractNode.init(AbstractNode.java:46) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.protocol.AbstractProtocol.refer(AbstractProtocol.java:96) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.protocol.support.ProtocolFilterDecorator.refer(ProtocolFilterDecorator.java:61) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.cluster.support.ClusterSupport.doRefreshReferersByUrls(ClusterSupport.java:208) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.cluster.support.ClusterSupport.notify(ClusterSupport.java:194) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.cluster.support.ClusterSupport.init(ClusterSupport.java:100) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.config.handler.SimpleConfigHandler.buildClusterSupport(SimpleConfigHandler.java:52) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.config.RefererConfig.createClusterSupport(RefererConfig.java:196) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.config.RefererConfig.initRef(RefererConfig.java:138) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.config.RefererConfig.getRef(RefererConfig.java:94) ~[motan-core-1.1.10.jar:?]
	at com.weibo.api.motan.config.springsupport.RefererConfigBean.getObject(RefererConfigBean.java:40) ~[motan-springsupport-1.1.10.jar:?]
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:182) ~[spring-beans-6.1.2.jar:6.1.2]

官方回复

https://github.com/weibocom/motan/issues/1020

相关推荐
这个昵称不容易13 小时前
旅游管理系统的设计与实现(SpringBoot + MySQL + Vue 前后端分离)
java·springboot·毕设
Rain的Java大神之路13 小时前
LeetCode 37 解数独面试攻略:回溯 + 位掩码 + MRV,从暴力到毫秒级求解
java·后端·leetcode
天天被压力14 小时前
【A股分钟级高频数据完全手册 #11】券商实时行情数据接口:实时交易(券商源)接入与字段
java·人工智能·python
天天被压力15 小时前
【A股分钟级高频数据完全手册 #12】股票五档盘口数据接口:买卖五档实时盘口解析
java·人工智能·python
Wang's Blog1 天前
Java 项目实战: 交友项目 - FastDFS:入门案例
java·开发语言·交友
apcipot_rain1 天前
C++转Java日记(03)
java·开发语言·c++
皮皮林5511 天前
Java实现微信扫码登录
java
Yyyyyy~1 天前
【Java】Day4Web基础知识
java·spring boot
灿飞屋1 天前
Kotlin与Java虚拟机三:控制流
android·java·开发语言·后端·python·kotlin·安卓
NE_STOP1 天前
Spring AI Alibaba - MCP入门
java