java - zookeeper always disconnects and reconnects?
我想大声告诉你
我想大声告诉你 2017-07-03 11:43:21
0
2
1123

Deploy zookeeper on the spring boot project to register the service. It was normal at first. However, it will be disconnected and reconnected after a while, connected, and disconnected again. . The final result reported was that the reconnection failed.
Do you want to set the session time? I set a longer time, and it did not disconnect at first, but after a while, it disconnected and reconnected. . .
Can anyone help me?

我想大声告诉你
我想大声告诉你

reply all (2)
迷茫
1. Adjust the sessionTimeOut configuration of zookeeper cluster configuration
2. Implement heartbeat HeartBeatTime < SessionTimeOut
    Ty80

    A few points.

    1. Confirm whether there are any problems with the network between the machine and the zk cluster. If the network is disconnected frequently, no matter how you deal with it, it will be ineffective

    2. Look at the timeout settings of the zk cluster

    3. Check whether the time when the client actively disconnects matches the zk cluster

    4. I have never been exposed to the native zk client. . I don’t know how to ensure the session heartbeat. You need to check the way your zk client heartbeat is kept alive to see if the heartbeat is not sent for a long time, causing zk to think that the client is dead and actively disconnect.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!