๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’ปTech/๐Ÿ˜hadoop

[SOLVED] KeeperErrorCode = ConnectionLoss for /hbase

by _viper_ 2020. 6. 17.
๋ฐ˜์‘ํ˜•

๐Ÿšซ ERROR

HBase์—์„œ ConnectionLoss ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ด์„œ zookeeper ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ด ๋ณด๋‹ˆ,

Too many Connection ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๊ณ  ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

## Hbase Error
KeeperErrorCode = ConnectionLoss for /hbase

## Zookeeper Error
Too many connections from /x.x.x.x - max is 60

 

๐Ÿ’ก SOLVED

๋‘ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๋‹ค. 

1. ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ zookeeper์— ์ ‘์†ํ•˜๋Š” ํ”„๋กœ์„ธ์Šค๋ฅผ ํ™•์ธํ•˜๋ฉด ์•„๋ž˜ ๊ฒฐ๊ณผ์™€ ๊ฐ™์ด ํ•˜๋‚˜์— ํ”„๋กœ์„ธ์Šค์—์„œ ๋งŽ์€ connection์„ ์žก๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ € ๊ฐ™์€ ๊ฒฝ์šฐ๋Š” Ranger์˜€๊ณ  Ranger ์žฌ๊ธฐ๋™ ํ›„ Zookeeper connection ์ˆ˜ 30 ๋ฐ‘์œผ๋กœ ์ค„์–ด ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค.

2. ๋˜ ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ๋Š” zoo.cfg์—์„œ maxClientCnxns ์ˆ˜๋ฅผ ๋Š˜๋ ค ์ค๋‹ˆ๋‹ค. (default =  60)

netstat -nape | awk '{if($5 =="x.x.x.x:2181")print $4, $9;}'


x.x.x.x:56184 149004/java
x.x.x.x:55960 149004/java
x.x.x.x:56336 149004/java
x.x.x.x:56238 149004/java
x.x.x.x:56276 149004/java
x.x.x.x:56324 160755/java
x.x.x.x:56284 149004/java
x.x.x.x:56396 149004/java
x.x.x.x:56348 149004/java
x.x.x.x:55892 149004/java
x.x.x.x:55882 149004/java
x.x.x.x:55870 160755/java
x.x.x.x:56242 149004/java
x.x.x.x:56290 149004/java
x.x.x.x:56090 149004/java
x.x.x.x:55910 149004/java
x.x.x.x:56392 149004/java
x.x.x.x:56244 149004/java
x.x.x.x:56350 149004/java
x.x.x.x:56362 149004/java
x.x.x.x:56118 149004/java
x.x.x.x:56112 149004/java
x.x.x.x:56306 149004/java
x.x.x.x:55854 149004/java
x.x.x.x:56046 149004/java
x.x.x.x:56210 149004/java
x.x.x.x:56372 149004/java
x.x.x.x:56282 149004/java
x.x.x.x:56368 149004/java
x.x.x.x:56234 149004/java
x.x.x.x:56342 149004/java
x.x.x.x:55864 149004/java
x.x.x.x:56332 149004/java
x.x.x.x:55896 149004/java