weibocom / motan

A cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services.
Other
5.89k stars 1.78k forks source link

在使用consistent loadbalance的时候,启动多个Server,Client请求就会失败 #88

Closed wangjunbo closed 8 years ago

wangjunbo commented 8 years ago
com.weibo.api.motan.exception.MotanServiceException: error_message: ClusterSpi Call false for request: cn.allydata.main.Server.process(java.lang.String) requestId=146405973516700001, status: 503, error_code: 10001,r=
    at com.weibo.api.motan.cluster.support.ClusterSpi.callFalse(ClusterSpi.java:190)
    at com.weibo.api.motan.cluster.support.ClusterSpi.call(ClusterSpi.java:75)
    at com.weibo.api.motan.proxy.RefererInvocationHandler.invoke(RefererInvocationHandler.java:108)
    at com.sun.proxy.$Proxy10.process(Unknown Source)
    at cn.allydata.redis.ControllerSubscribe$1.onMessage(ControllerSubscribe.java:41)
    at redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:129)
    at redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:102)
    at redis.clients.jedis.Jedis.subscribe(Jedis.java:2591)
    at cn.allydata.redis.ControllerSubscribe.subscribe(ControllerSubscribe.java:51)
    at cn.allydata.redis.ControllerSubscribe.run(ControllerSubscribe.java:57)
    at cn.allydata.main.Controller.main(Controller.java:65)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -180
    at java.util.ArrayList.elementData(ArrayList.java:400)
    at java.util.ArrayList.get(ArrayList.java:413)
    at com.weibo.api.motan.cluster.loadbalance.ConsistentHashLoadBalance.doSelectToHolder(ConsistentHashLoadBalance.java:77)
    at com.weibo.api.motan.cluster.loadbalance.AbstractLoadBalance.selectToHolder(AbstractLoadBalance.java:74)
    at com.weibo.api.motan.cluster.ha.FailoverHaStrategy.selectReferers(FailoverHaStrategy.java:90)
    at com.weibo.api.motan.cluster.ha.FailoverHaStrategy.call(FailoverHaStrategy.java:53)
    at com.weibo.api.motan.cluster.support.ClusterSpi.call(ClusterSpi.java:73)
    ... 9 more
wangjunbo commented 8 years ago

这个是motan的一个bug,已经修复,修改后jar放在了百度云上,需要的可以下载

wangjunbo commented 8 years ago

已经解决了

sunnights commented 8 years ago

:+1: 建议直接提交PR来修复bug

wangjunbo commented 8 years ago

@sunnights thanks