Tag Archives: java-zookeeper

[Solved] Error–dubbo Connect zk Error: zookeeper not connected

Error Message:

Error creating bean with name 'dubboBootstrapApplicationListener': Initialization of bean failed; nested exception is java.lang.IllegalStateException: zookeeper not connected

 

Problem:
The project starts with the following error.
IllegalStateException: zookeeper not connected

Reason:
First of all, the default connection timeout for dubbo registration is 5 seconds.
And the zookeeper server I connected to was a little slow to access, which caused the connection to time out.

Solution:
Adjust the default registration time for dubbo to 200 seconds
The default registration timeout is 5 seconds
All others are 1 second
So I increased the timeout for other service calls as well.
If you only need to modify the registration timeout, just add or modify registry.

dubbo:
  registry:
    timeout: 200000
  service:
    timeout: 200000
  consumer: 
    timeout: 200000
  provider:
    timeout: 200000

Zookper Error: [org.apache.zookeeper. ClientCnxn]-[WARN] Session 0x0 for server 192.168.25.132/192.168.25.132:2181, unexpected error…(SSM integration)

Problem: an error is reported after a project in multiple projects is started:

[org.apache.zookeeper. ClientCnxn]-[WARN] Session 0x0 for server 192.168.25.132/192.168.25.132:2181, unexpected error

 

Reason 1: because there are not enough links in zookper, the maximum number of links needs to be modified

Solution:

Modify the zoo.cfg in the conf directory of zookper. add maxClientCnxns = 500 at the end.