記錄一次zookeeper集群搭建遇到的問題

2021-08-29 07:39:25 字數 1547 閱讀 1914

使用vmware+centos7,clone了3臺虛機,然後分別裝上zookeeper。zoo.cfg配置檔案如下:

# 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=/tmp/zookeeper

# 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.

## ## 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=1

server.1=192.168.131.128:2188:3181

server.2=192.168.131.131:2188:3181

server.3=192.168.131.132:2188:3181

這裡有三個埠,乙個是clientport,乙個是ip後面的第乙個埠:第二個埠。因為我配置的埠衝突了,導致zookeeper一直啟動不了。

簡單了解一下各個埠的作用。

server.a=b:c:d。其中a表示是第幾台伺服器。對應的是myid檔案中的配置。datadir目錄下必須有乙個myid檔案,裡面儲存a的值。zk啟動時讀取此檔案,與下面列表比較是哪個server

b是伺服器ip;c表示與leader伺服器交換資訊的埠;d表示進行選舉的通訊埠。

因為我配置的clientport和c一樣,所以埠衝突,導致服務起不了。

再此記錄一下,一面以後自己忘記。

記錄一次面試

怎麼觀察系統中 記憶體 行為 a.通過 proc zoneinfo 檔案,可以看到 free high low min pages 關係 free high 時候 一般不開啟 kswapd 執行緒 high free low 時,開啟 kswapd 執行緒 low free min時,alloc p...

記錄一次oracle使用記錄

使用oracle資料庫的專案到我這邊,需要修改,咱雖然 學過 oracle,但那畢竟已經過去了。哈哈。使用database configuration assistant 建立資料庫,建立快完的時候,說我沒有監聽啥的,然後 通過 net manager 建立了,qizhong1 其中選中的那個就是建...

記錄一次ko編譯

最近接觸乙個專案,需要編譯ko檔案,從來沒有接觸過,先問自己四個問題 什麼是ko檔案 ko檔案是kernel object檔案 核心模組 該檔案的意義就是把核心的一些功能移動到核心外邊,需要的時候插入核心,不需要時解除安裝。如何製作ko檔案 環境配置 1.export path path media...