window下搭建zookeeper集群myid问题
生活随笔
收集整理的這篇文章主要介紹了
window下搭建zookeeper集群myid问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
myid文件創建
Windows下搭建集群,會報如下一個錯誤,讀取不到serverid,報錯信息說不是一個數字類型
最后發現是不能按照常規模式創建myid文件(按住Shift + Ctrl 鍵,點擊鼠標右鍵,選擇 在此處打開powershell命令),要在對應目錄下,輸入cmd,用echo 1 > myid 創建,然后notepad++打開編輯,去除掉空格。
配置文件
附上集群配置文件
# The number of milliseconds of each tick tickTime=2000 # 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. # do not use /tmp for storage, /tmp here is just # example sakes. dataDir=D:/soft/zookeeper/zookeeper-3.4.8/data #dataLogDir=D:/soft/zookeeper/zookeeper-3.4.8/log # the port at which the clients will connect clientPort=2181 # the maximum number of client connections. # increase this if you need to handle more clients #maxClientCnxns=60 # # Be sure to read the maintenance section of the # administrator guide before turning on autopurge. # # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance # # The number of snapshots to retain in dataDir #autopurge.snapRetainCount=3 # Purge task interval in hours # Set to "0" to disable auto purge feature #autopurge.purgeInterval=1server.1=localhost:2881:3881 server.2=localhost:2882:3882 server.3=localhost:2883:3883總結
以上是生活随笔為你收集整理的window下搭建zookeeper集群myid问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 最大值最小值计算机一级,excel怎么找
- 下一篇: android10暗色适配,Androi