zookeeper 실행시 session request가 무한 루프 돌고 있다..
아무리 다시 연결하려고 해도 아래와 같이 무한루프라면 zookeeper 중단시 강제종료(ctrl + c)를 실행하여
이전에 띄었던 zookeeper와 충돌할 경우 발생한 것으로 판단된다.
................
[2020-05-06 15:09:51,701] INFO Server environment:java.io.tmpdir=C:\Users\log\AppData\Local\Temp\ (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,703] INFO Server environment:java.compiler=<NA> (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,704] INFO Server environment:os.name=Windows 10 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,707] INFO Server environment:os.arch=amd64 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,708] INFO Server environment:os.version=10.0 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,711] INFO Server environment:user.name=log (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,713] INFO Server environment:user.home=C:\Users\log (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,714] INFO Server environment:user.dir=D:\kafka\kafka_2.12-2.2.0 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,725] INFO tickTime set to 3000 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,726] INFO minSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,728] INFO maxSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,745] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory)
[2020-05-06 15:09:51,748] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-05-06 15:09:51,908] INFO Accepted socket connection from /127.0.0.1:63493 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-05-06 15:09:51,914] INFO Refusing session request for client /127.0.0.1:63493 as it has seen zxid 0x197 our last zxid is 0x0 client must try another server (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,914] INFO Closed socket connection for client /127.0.0.1:63493 (no session established for client) (org.apache.zookeeper.server.NIOServerCnxn)
[2020-05-06 15:09:51,990] INFO Accepted socket connection from /127.0.0.1:63485 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-05-06 15:09:51,991] INFO Refusing session request for client /127.0.0.1:63485 as it has seen zxid 0x183 our last zxid is 0x0 client must try another server (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:51,992] INFO Closed socket connection for client /127.0.0.1:63485 (no session established for client) (org.apache.zookeeper.server.NIOServerCnxn)
[2020-05-06 15:09:52,075] INFO Accepted socket connection from /127.0.0.1:63507 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-05-06 15:09:52,076] INFO Refusing session request for client /127.0.0.1:63507 as it has seen zxid 0x185 our last zxid is 0x0 client must try another server (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:52,078] INFO Closed socket connection for client /127.0.0.1:63507 (no session established for client) (org.apache.zookeeper.server.NIOServerCnxn)
[2020-05-06 15:09:53,255] INFO Accepted socket connection from /127.0.0.1:63517 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-05-06 15:09:53,255] INFO Refusing session request for client /127.0.0.1:63517 as it has seen zxid 0x197 our last zxid is 0x0 client must try another server (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:53,260] INFO Closed socket connection for client /127.0.0.1:63517 (no session established for client) (org.apache.zookeeper.server.NIOServerCnxn)
[2020-05-06 15:09:53,792] INFO Accepted socket connection from /127.0.0.1:63519 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-05-06 15:09:53,793] INFO Refusing session request for client /127.0.0.1:63519 as it has seen zxid 0x183 our last zxid is 0x0 client must try another server (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:09:53,795] INFO Closed socket connection for client /127.0.0.1:63519 (no session established for client) (org.apache.zookeeper.server.NIOServerCnxn)
................
이런 현상의 해결방법은 zookeeper 를 zookeeper-server-stop 명령어로 종료해주는것이다.
(카프카 실행, 종료도 명령어로 하는 것이 안전하다)
1. zookeeper-server-stop 명령어로 종료
PS D:\kafka\kafka_2.12-2.2.0> .\bin\windows\zookeeper-server-stop.bat .\config\zookeeper.properties
\\DESKTOP-5V2566P\ROOT\CIMV2:Win32_Process.Handle="3660" 인스턴스 삭제 중
인스턴스를 삭제했습니다.
2. zookeeper 다시 실행시 정상 구동 확인
PS D:\kafka\kafka_2.12-2.2.0> .\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
[2020-05-06 15:11:29,988] INFO Reading configuration from: .\config\zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-06 15:11:29,991] INFO autopurge.snapRetainCount set to 3 (org.apache.zookeeper.server.DatadirCleanupManager)
[2020-05-06 15:11:29,991] INFO autopurge.purgeInterval set to 0 (org.apache.zookeeper.server.DatadirCleanupManager)
[2020-05-06 15:11:29,992] INFO Purge task is not scheduled. (org.apache.zookeeper.server.DatadirCleanupManager)
[2020-05-06 15:11:29,994] WARN Either no config or no quorum defined in config, running in standalone mode (org.apache.zookeeper.server.quorum.QuorumPeerMain)
[2020-05-06 15:11:30,010] INFO Reading configuration from: .\config\zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-06 15:11:30,014] INFO Starting server (org.apache.zookeeper.server.ZooKeeperServerMain)
[2020-05-06 15:11:30,026] INFO Server environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,027] INFO Server environment:host.name=DESKTOP-5V2566P (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,028] INFO Server environment:java.version=1.8.0_232 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,029] INFO Server environment:java.vendor=AdoptOpenJDK (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,031] INFO Server environment:java.home=C:\Users\log\scoop\apps\adopt8-hotspot\current\jre (org.apache.zookeeper.server.ZooKeeperServer)
........................
[2020-05-06 15:11:30,037] INFO Server environment:java.io.tmpdir=C:\Users\log\AppData\Local\Temp\ (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,038] INFO Server environment:java.compiler=<NA> (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,040] INFO Server environment:os.name=Windows 10 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,043] INFO Server environment:os.arch=amd64 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,044] INFO Server environment:os.version=10.0 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,045] INFO Server environment:user.name=log (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,046] INFO Server environment:user.home=C:\Users\log (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,047] INFO Server environment:user.dir=D:\kafka\kafka_2.12-2.2.0 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,056] INFO tickTime set to 3000 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,057] INFO minSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,058] INFO maxSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-06 15:11:30,076] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory)
[2020-05-06 15:11:30,078] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
참고 : stack overflow
'Programming > Kafka' 카테고리의 다른 글
[kafka] spring kafka vs kafka clients (0) | 2020.05.06 |
---|---|
[kafka] docker kafka image (1) | 2020.04.29 |
[Kafka] 카프카 매니저 설치 Kafka-Manager install (0) | 2020.04.24 |