-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
流量切换异常 #1026
Comments
client、server motan版本: |
服务启动后,在控制台配置:client报错 |
看异常应该是管理后台和client使用的zkclient的SerializableSerializer不同导致的,后台写入命令使用的编码方式与client使用的解码方式不同,导致无法解析流量指令。 可以从下面几个方面排查一下问题:
|
谢谢,已解决 |
管理后台:
zk节点:
问题:
启动客户端异常:
19:29:15.876 [main] WARN warn - [ZookeeperRegistry] false to subscribe motan://10.3.0.32:0/com.mtan.interf.FooService?group=motan-ulive-rpc1 from zookeeper://127.0.0.1:2181/com.weibo.api.motan.registry.RegistryService?group=default_rpc
com.weibo.api.motan.exception.MotanFrameworkException: error_message: Failed to discover command motan://10.3.0.32:0/com.mtan.interf.FooService?group=motan-ulive-rpc1 from zookeeper(zookeeper://127.0.0.1:2181/com.weibo.api.motan.registry.RegistryService?group=default_rpc), cause: java.io.StreamCorruptedException: invalid stream header: 7B22636C, status: 503, error_code: 20001,r=null
at com.weibo.api.motan.registry.zookeeper.ZookeeperRegistry.discoverCommand(ZookeeperRegistry.java:214)
at com.weibo.api.motan.registry.support.command.CommandFailbackRegistry.doDiscover(CommandFailbackRegistry.java:70)
at com.weibo.api.motan.registry.support.command.CommandFailbackRegistry.doSubscribe(CommandFailbackRegistry.java:49)
at com.weibo.api.motan.registry.support.AbstractRegistry.subscribe(AbstractRegistry.java:105)
at com.weibo.api.motan.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:119)
at com.weibo.api.motan.cluster.support.ClusterSupport.init(ClusterSupport.java:108)
at com.weibo.api.motan.config.handler.SimpleConfigHandler.buildClusterSupport(SimpleConfigHandler.java:56)
at com.weibo.api.motan.config.RefererConfig.createClusterSupport(RefererConfig.java:196)
at com.weibo.api.motan.config.RefererConfig.initRef(RefererConfig.java:138)
at com.weibo.api.motan.config.RefererConfig.getRef(RefererConfig.java:94)
at com.weibo.api.motan.config.springsupport.RefererConfigBean.getObject(RefererConfigBean.java:40)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1646)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054)
at com.mtan.ThreadPoolFullClient.main(ThreadPoolFullClient.java:14)
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'remoteService': FactoryBean threw exception on object creation; nested exception is com.weibo.api.motan.exception.MotanFrameworkException: error_message: [ZookeeperRegistry] false to subscribe motan://10.3.0.32:0/com.mtan.interf.FooService?group=motan-ulive-rpc1 from zookeeper://127.0.0.1:2181/com.weibo.api.motan.registry.RegistryService?group=default_rpc, status: 503, error_code: 20001,r=null
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:185)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1646)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054)
at com.mtan.ThreadPoolFullClient.main(ThreadPoolFullClient.java:14)
Caused by: com.weibo.api.motan.exception.MotanFrameworkException: error_message: [ZookeeperRegistry] false to subscribe motan://10.3.0.32:0/com.mtan.interf.FooService?group=motan-ulive-rpc1 from zookeeper://127.0.0.1:2181/com.weibo.api.motan.registry.RegistryService?group=default_rpc, status: 503, error_code: 20001,r=null
at com.weibo.api.motan.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:126)
at com.weibo.api.motan.cluster.support.ClusterSupport.init(ClusterSupport.java:108)
at com.weibo.api.motan.config.handler.SimpleConfigHandler.buildClusterSupport(SimpleConfigHandler.java:56)
at com.weibo.api.motan.config.RefererConfig.createClusterSupport(RefererConfig.java:196)
at com.weibo.api.motan.config.RefererConfig.initRef(RefererConfig.java:138)
at com.weibo.api.motan.config.RefererConfig.getRef(RefererConfig.java:94)
at com.weibo.api.motan.config.springsupport.RefererConfigBean.getObject(RefererConfigBean.java:40)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)
... 6 more
Caused by: com.weibo.api.motan.exception.MotanFrameworkException: error_message: Failed to discover command motan://10.3.0.32:0/com.mtan.interf.FooService?group=motan-ulive-rpc1 from zookeeper(zookeeper://127.0.0.1:2181/com.weibo.api.motan.registry.RegistryService?group=default_rpc), cause: java.io.StreamCorruptedException: invalid stream header: 7B22636C, status: 503, error_code: 20001,r=null
at com.weibo.api.motan.registry.zookeeper.ZookeeperRegistry.discoverCommand(ZookeeperRegistry.java:214)
at com.weibo.api.motan.registry.support.command.CommandFailbackRegistry.doDiscover(CommandFailbackRegistry.java:70)
at com.weibo.api.motan.registry.support.command.CommandFailbackRegistry.doSubscribe(CommandFailbackRegistry.java:49)
at com.weibo.api.motan.registry.support.AbstractRegistry.subscribe(AbstractRegistry.java:105)
at com.weibo.api.motan.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:119)
... 13 more
The text was updated successfully, but these errors were encountered: