1.搭建监控中心,连接zookeeper失败

  • dubbo-admin-server错误日志

    1. org.apache.curator.CuratorConnectionLossException: KeeperErrorCode = ConnectionLoss
    2. at org.apache.curator.ConnectionState.checkTimeouts(ConnectionState.java:225)
    3. at org.apache.curator.ConnectionState.getZooKeeper(ConnectionState.java:94)
    4. at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:117)
    5. at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:835)
    6. at org.apache.curator.framework.imps.CuratorFrameworkImpl.backgroundOperationsLoop(CuratorFrameworkImpl.java:809)
    7. at org.apache.curator.framework.imps.CuratorFrameworkImpl.access$300(CuratorFrameworkImpl.java:64)
    8. at org.apache.curator.framework.imps.CuratorFrameworkImpl$4.call(CuratorFrameworkImpl.java:267)
    9. at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    10. at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    11. at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    12. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    13. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    14. at java.lang.Thread.run(Thread.java:748)
  • zookeeper日志

    1. 2020-08-11 10:50:13,475 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] -
    2. Exception causing close of session 0x1000004ec640000: 远程主机强迫关闭了一个现有的连 接。
    3. 2020-08-11 10:50:13,476 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] -
    4. Closed socket connection for client /127.0.0.1:49998 which had sessionid 0x1000004ec640000
  • 解决方案

    一、修改客户端连接数。

二、修改zookeeper的配置文件zoo.cfg,添加参数:maxClientCnxns=200。