web123456

zookeeper pseudo cluster startup failed: Invalid config, exiting abnormally

zookeeper failed to start, check the startup log:

2017-09-03 22:33:14,024 [myid:] - ERROR [main:QuorumPeerMain@85] - Invalid config, exiting abnormally
$ConfigException: Error processing /usr/service/zookeeper/zookeeper-3.4.9.1/zookeeper-3.4.9/bin/../conf/
 at (QuorumPeerConfig.Java:144)
 at (:101)
 at (:78)
Caused by: : For input string: "2183 "
 at (:65)
 at (:580)
 at (:615)
 at (:214)
 at (:140)
 ... 2 more


I found that there was an exception in the configuration file of zookeeper. I checked the configuration and found that there were a few spaces after the second service port number (maybe when copying the configuration file directly), which caused zookeeper to have an exception when parsing the port number.