Tengo tres nodos zookeeper. Todos los puertos están abiertos. La dirección IP es correcta. A continuación está mi archivo de configuración. Todos los nodos donde fueron iniciados por el chef y todos tienen el mismo archivo de instalación y configuración.Zookeeper - tres nodos y nada más que errores
# The number of milliseconds of each tick
tickTime=3000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=/var/lib/zookeeper
# Place the dataLogDir to a separate physical disc for better performance
# dataLogDir=/disk2/zookeeper
# the port at which the clients will connect
clientPort=2181
server.1=111.111.111:2888:3888
server.2=111.111.112:2888:3888
server.3=111.111.113:2888:3888
Aquí hay un error para uno de los nodos. Entonces ... estoy bastante confundido sobre cómo podría obtener un error ya que la configuración es bastante vainilla. Los tres nodos están haciendo lo mismo.
2012-07-16 05:16:57,558 - INFO [main:[email protected]] - Reading configuration from: /etc/zookeeper/conf/zoo.cfg
2012-07-16 05:16:57,567 - INFO [main:[email protected]] - Defaulting to majority quorums
2012-07-16 05:16:57,572 - FATAL [main:[email protected]] - Invalid config, exiting abnormally
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing /etc/zookeeper/conf/zoo.cfg
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:110)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:99)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:76)
Caused by: java.lang.IllegalArgumentException: serverid replace this text with the cluster-unique zookeeper's instance id (1-255) is not a number
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:333)
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:106)
... 2 more
Oh ... lo tiene. ¿Dónde colocas el archivo tat?/etc/zookeeper/conf? – Tampa
Sí, funcionó genial ... ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ – Tampa
Coloque el archivo en la ubicación identificada por la propiedad "dataDir" en zookeeper.properties (que, a su vez, es el archivo que pasa como argumento al iniciar ZooKeeper). En su archivo de configuración anterior, su dataDir es/var/lib/zookeeper, por lo que el archivo debe ser/var/lib/zookeeper/myid. – JakeRobb