【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

相关推荐
路在脚下@几秒前
spring boot的配置文件属性注入到类的静态属性
java·spring boot·sql
森屿Serien4 分钟前
Spring Boot常用注解
java·spring boot·后端
苹果醋31 小时前
React源码02 - 基础知识 React API 一览
java·运维·spring boot·mysql·nginx
Hello.Reader1 小时前
深入解析 Apache APISIX
java·apache
菠萝蚊鸭2 小时前
Dhatim FastExcel 读写 Excel 文件
java·excel·fastexcel
旭东怪2 小时前
EasyPoi 使用$fe:模板语法生成Word动态行
java·前端·word
007php0072 小时前
Go语言zero项目部署后启动失败问题分析与解决
java·服务器·网络·python·golang·php·ai编程
∝请叫*我简单先生2 小时前
java如何使用poi-tl在word模板里渲染多张图片
java·后端·poi-tl
ssr——ssss2 小时前
SSM-期末项目 - 基于SSM的宠物信息管理系统
java·ssm
一棵星3 小时前
Java模拟Mqtt客户端连接Mqtt Broker
java·开发语言