2012-07-16 15 views
15

私には3つの飼育係ノードがあります。すべてのポートが開いています。 IPアドレスが正しい。以下は私の設定ファイルです。シェフがブートしたすべてのノードとすべてが同じインストールおよび設定ファイルを持っています。動物園 - 3つのノードと何もエラーがありません

# 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 

これはノードの1つでエラーです。だから...私はむしろ設定がむしろバニラなので、どうやってエラーが出るのか混乱している。 3つのノードはすべて同じことをしています。あなたはMYIDという名前のファイルを作成し、飼育係のvarディレクトリに入れて、各サーバーごとに1つ必要

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 

答えて

34

は、そのマシンのidのテキストのみを含む単一の行で構成されています。したがって、サーバー1のmyidには、テキスト「1」とそれ以外は含まれません。 IDは、アンサンブル内で一意である必要があり、1〜255

の間の値がhttp://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#sc_zkMulitServerSetup

+0

二重引用符なしで対応するサーバで1,2,3値ああ...それを得ました。あなたはtatファイルをどこに置いていますか?/etc/zookeeper/conf? – Tampa

+0

よかった...すばらしいやりもの...ありがとう!!!!!!!!! – Tampa

+0

zookeeper.propertiesの "dataDir"プロパティ(ZooKeeperの起動時に引数として渡すファイル)で指定された場所にファイルを配置します。上の設定ファイルでは、dataDirは/ var/lib/zookeeperなので、ファイルは/ var/lib/zookeeper/myidにする必要があります。 – JakeRobb

4
server.1=111.111.111:2888:3888 
server.2=111.111.112:2888:3888 
server.3=111.111.113:2888:3888 

でより多くのを見ている必要がありその後のそれぞれにMYIDファイルを作成するサーバーであり、IPの

111.111.111に値1を、111.111.111.112に2を、ディレクトリ(dataDir =/var/lib/zookeeper)に111.111.111.113の3つのノード

値 "1"のmyidファイルを置くと、フォーマット例外と "Invalid config、exiti ng異常終了 "と表示されます。

は、そのためだけで任意の拡張子のないMYIDファイルを作成し、場所の整数で

関連する問題