文章目录
-
- 升级版本解决问题
- 我使用的有问题的版本
- 配置懒加载
- [错误的版本配置了懒加载 但是不生效 lazyInit="true" 启动不是懒加载 会报错一次](#错误的版本配置了懒加载 但是不生效 lazyInit="true" 启动不是懒加载 会报错一次)
- 官方回复
升级版本解决问题
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]