【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

相关推荐
duration~35 分钟前
Maven随笔
java·maven
zmgst39 分钟前
canal1.1.7使用canal-adapter进行mysql同步数据
java·数据库·mysql
跃ZHD1 小时前
前后端分离,Jackson,Long精度丢失
java
blammmp1 小时前
Java:数据结构-枚举
java·开发语言·数据结构
暗黑起源喵1 小时前
设计模式-工厂设计模式
java·开发语言·设计模式
WaaTong2 小时前
Java反射
java·开发语言·反射
九圣残炎2 小时前
【从零开始的LeetCode-算法】1456. 定长子串中元音的最大数目
java·算法·leetcode
wclass-zhengge2 小时前
Netty篇(入门编程)
java·linux·服务器
Re.不晚3 小时前
Java入门15——抽象类
java·开发语言·学习·算法·intellij-idea
雷神乐乐3 小时前
Maven学习——创建Maven的Java和Web工程,并运行在Tomcat上
java·maven