修复Kaa群集配置中的错误

时间:2016-12-23 03:28:49

标签: kaa

上周我问了由Kaa群集引起的question。我按照kaa群集设置指南文档部署了3个Kaa群集。数据库是Cassandra和MariaDB。当我运行C客户端时(我做了一个代码更改,每个客户端都可以随机登录三个kaa服务器)。服务器日志文件中报告了很多问题。我试着自己解决这些问题。第四个错误是:

2016-12-09 01:15:46,710 [pool-22-thread-1] ERROR o.k.k.s.thrift.NeighborConnection - EventWorker [192.168.10.14:9090:OPERATIONS_SERVICE:d9c71186-e45e-4c33-88b0-0ad5f26c6d17] error sending event messages pack. 
com.twitter.common.thrift.TResourceExhaustedException: java.util.concurrent.RejectedExecutionException: All 1 x 3 connections in use
    at com.twitter.common.thrift.callers.DeadlineCaller.call(DeadlineCaller.java:91) ~[thrift-0.0.64.jar:na]
    at com.twitter.common.thrift.Thrift$1.invoke(Thrift.java:363) ~[thrift-0.0.64.jar:na]
    at com.sun.proxy.$Proxy141.sendMessages(Unknown Source) ~[na:na]
    at org.kaaproject.kaa.server.operations.service.event.DefaultEventService$MessageTemplate.process(DefaultEventService.java:727) ~[kaa-node-0.10.0.jar:na]
    at org.kaaproject.kaa.server.thrift.NeighborConnection$EventWorker.run(NeighborConnection.java:322) ~[server-shared-0.10.0.jar:na]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_111]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_111]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]
Caused by: java.util.concurrent.RejectedExecutionException: All 1 x 3 connections in use
    at com.twitter.common.thrift.ThriftFactory$ManagedThreadPool$1.rejectedExecution(ThriftFactory.java:237) ~[thrift-0.0.64.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823) [na:1.8.0_111]
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369) [na:1.8.0_111]
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) ~[na:1.8.0_111]
    at com.twitter.common.util.concurrent.ForwardingExecutorService.submit(ForwardingExecutorService.java:66) ~[util-0.0.88.jar:na]
    at com.twitter.common.thrift.callers.DeadlineCaller.call(DeadlineCaller.java:71) ~[thrift-0.0.64.jar:na]
    ... 9 common frames omitted

我发现错误是由Kaa参数配置引起的。在kaa-node.properties文件中:

  

#指定最大邻居连接数

     

max_number_neighbor_connections = 3

如果在kaa集群中,邻居连接会变得越来越多。我做了一个测试,将此参数值修改为8并运行12000 C Client。它也出现了很多相同的错误。然后我将此参数值修改为50它出现了同样的错误。所以我把这个参数值修改为100,它没有出现相同的错误。我希望Kaa团队能够验证这种修改方法并在集群中给出合理的参数值。

0 个答案:

没有答案