bzoj 4012: [hnoi2015] Opening the store -dynamic tree division governance


Zookeeper starts, sometimes there is no real start. So how do we find the error, and we can view the zookeeper.out file below the zookeeper directory, and you can check the error. Zookeeper.out file is more important. It is essential for wrong investigation. There are also servers. If the connection is not connected, it may be a problem with the firewall.

When the

When it is settled, the directory structure of the data storage, in each Zookeeper, requires LOGS (log storage) and data (data storage) directory and MyID files under the data directory.

This problem is due to the ID of the service, which is configured in myid, the ID of the service, which needs to be consistent with the configuration file of the zoo.cfg, otherwise the error is reported.

# The number of milliseconds of each tick
# The number of ticks that the initial
# synchronization phase can take
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.

# Data storage location

# Log file
# the port at which the clients will connect

# Server.num = IP: Port1: Port2 NUM indicates that the machine is No. 1 server; IP is the IP address of this machine;
# Port1 is a communication port for Leader and Follower; PORT2 is the communication port to participate in the leader
# The port configuration of multiple instances cannot be repeated

Server.a = B: C: D: Among them, A is a number, which is the number in myid, indicating that this is the number of the number No. 1; B is the IP address of this server, C and D are two ports.

Configuration file MyID file configuration has problems and the inconsistency of ZOO.CFG

The reason for

Caused by: java.lang.IllegalArgumentException: /usr/local/zookeeper/zookeeper-3.4.10/data/data/myid file is missing

This problem is that there are problems with the configuration of the MyID file. It may be that the path is wrong, or the file is not. You need to create a MyID file in your own data directory. The path configuration

The reason for this problem is that there are no problems caused by all Zookeeper nodes. All nodes are started, and there will be no such problem.

# Get the startup information of Zookeeper
cat zookeeper.out

  • 1
  • 2

In the startup cluster, only 2 and 3 nodes are in the cluster, but 1 node is Standalone

#View node information status 

The reason for this problem is port occupation

# View port
netstat -lnp|grep 2181

# Kill the process, and then restart Zookeeper
killProcess number



Related Posts

Openark installation tutorial

20.stm32CubeMX Configuration Template/Malaysia Lantern STM32CUBEMX horse

Intent to pass data PARCLABLE, Serializable, Bundle detailed usage

network programming IP address

bzoj 4012: [hnoi2015] Opening the store -dynamic tree division governance

Random Posts

POJ1806-Manhattan 2025 (C language implementation) AI

Use Arduino to control the robotic arm Ethan

10.31 NOIP simulation race (Morning)

IDEA convenient operation and configuration

Detailed explanation of GSON use (4) MAP object conversion