【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

相关推荐
oak隔壁找我11 分钟前
ShardingJdbc配置说明
java·后端
lzjava20241 小时前
Spring AI实现一个智能客服
java·人工智能·spring
Mos_x1 小时前
HeidiSQL导入与导出数据
java·后端
oak隔壁找我1 小时前
Elasticsearch QueryBuilders 高级使用案例
java·后端
青云交1 小时前
Java 大视界 -- Java 大数据在智能家居能源消耗模式分析与节能策略制定中的应用
java·大数据·智能家居·数据采集·能源消耗模式分析·节能策略制定·节能效果评估
Zhang青山1 小时前
【玩转全栈】----Django基本配置和介绍
java·后端
BUG?不,是彩蛋!2 小时前
Java Web 项目打包部署全解析:从 IDEA 配置到 Tomcat 运行
java·intellij-idea
JIngJaneIL2 小时前
财务管理|基于SprinBoot+vue的个人财务管理系统(源码+数据库+文档)
java·前端·数据库·vue.js·spring boot·毕设·财务管理系统
rengang662 小时前
352-Spring AI Alibaba OpenAI DashScope 多模态示例
java·人工智能·spring·多模态·spring ai·ai应用编程
不爱学英文的码字机器2 小时前
深度解析《AI+Java编程入门》:一本为零基础重构的Java学习路径
java·人工智能·后端·重构