>source

네트워크에서 사육사와 함께 Kafka를 구현하려고 하는데 사육사에 이상한 문제가 있습니다. 나는 구글을 둘러보았고 많은 다른 사용자들이 그러한 문제를 보고했지만 아무도 이에 대한 적절한 해결책을 게시하지 않았다는 것을 깨달았습니다.

현재 설정에는 3개의 다른 사육사 노드가 있습니다(32GB 램 전용 상자) 문제는 내가 사육사 리더를 죽이면 나머지 팔로워 노드도 모두 다운되고 적어도 다음 15-20분 동안 복구되지 않는다는 것입니다.

동물원 로그에 아무 설명 없이 "알림 시간 초과"만 표시됩니다.

여기 내 사육사 구성 파일이 있습니다.

tickTime=2000
initLimit=10
syncLimit=5
maxClientCnxns=100
maxSessionTimeout=50000
dataDir=/var/lib/zookeeper
clientPort=2181
autopurge.snapRetainCount=100
autopurge.purgeInterval=1
preAllocSize=131072
snapCount=3000000
server.1=zo1:2888:3888
server.2=zo2:2888:3888
server.3=zo3:2888:3888

내 /etc/hosts 파일에서 zo1, zo2, zo3을 IP 주소에 매핑했습니다.

참고: 또한 현재 노드 IP를 0.0.0.0으로 설정하여 테스트했지만 아무런 차이가 없습니다.

몇 분 전에 테스트했지만 다시 복구에 실패했습니다. 나는 세 개의 노드 클러스터 zo1 , zo2 및 zo3 을 가지고 있습니다. zo3은 리더이고 zo1과 zo2는 팔로워입니다. 내가 zo3 노드를 죽인 후. 자동으로 복구하는 데 약 13분이 걸렸습니다. zo1 및 zo2 에 다음 로그가 있습니다.

zo1에 대한 로그입니다.

꼬리 /var/lib/zookeeper/zookeeper.out -n 10000 | grep '쿼럼피어'

2019-01-02 10:25:50,848 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Shutting down
2019-01-02 10:25:50,848 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -shutting down
2019-01-02 10:25:50,848 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Shutting down
2019-01-02 10:25:50,848 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Shutting down
2019-01-02 10:25:50,848 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -shutdown of request processor complete
2019-01-02 10:25:50,849 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Shutting down
2019-01-02 10:25:50,849 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -LOOKING
2019-01-02 10:25:50,850 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -New election. My id=  1, proposed zxid=0x2d00035c8e
2019-01-02 10:25:51,057 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 400
2019-01-02 10:25:51,458 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 800
2019-01-02 10:25:52,259 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 1600
2019-01-02 10:25:53,859 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 3200
2019-01-02 10:25:57,060 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 6400
2019-01-02 10:26:03,461 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 12800
2019-01-02 10:26:16,262 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 25600
2019-01-02 10:26:41,862 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 51200
2019-01-02 10:27:33,063 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:28:33,065 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:29:33,066 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:30:33,066 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:31:33,067 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:32:33,068 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:33:33,069 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:34:33,069 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:35:33,070 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:36:33,071 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:37:33,071 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:38:33,072 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:39:33,073 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:40:33,074 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:41:33,075 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:42:33,076 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:43:33,076 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:43:33,082 [myid:1] -INFO  [WorkerSender[myid=1]:[email protected]] -Resolved hostname: zo3 to address: zo3/144.76.xxx.xxx
2019-01-02 10:43:33,091 [myid:1] -INFO  [WorkerSender[myid=1]:[email protected]] -Resolved hostname: zo3 to address: zo3/144.76.xxx.xxx
2019-01-02 10:43:33,290 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -FOLLOWING
2019-01-02 10:43:33,290 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 50000 datadir /var/lib/zookeeper/version-2 snapdir /var/lib/zookeeper/version-2
2019-01-02 10:43:33,291 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -FOLLOWING -LEADER ELECTION TOOK -1062441
2019-01-02 10:43:33,291 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Resolved hostname: zo2 to address: zo2/88.198.35.34
2019-01-02 10:43:33,294 [myid:1] -WARN  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Unexpected exception, tries=0, connecting to zo2/88.198.35.34:2888
        at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:937)
2019-01-02 10:43:34,468 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Getting a diff from the leader 0x2d00035c8e
2019-01-02 10:43:35,120 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Established session 0x2680a49e3dc0013 with negotiated timeout 6000 for client /5.9.xxx.xxx:36664
2019-01-02 10:43:35,244 [myid:1] -INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Established session 0x1680a49b6b90011 with negotiated timeout 30000 for client /5.9.xxx.xxx:36668
2019-01-02 10:43:35,625 [myid:1] -WARN  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]] -Got zxid 0x2e00000001 expected 0x1

나중에 리더가 된 노드 zo2의 로그

2019-01-02 10:25:50,852 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Closed socket connection for client /5.9.xxx.xxx:21218 which had sessionid 0x2680a49e3dc0012
2019-01-02 10:25:50,852 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Shutting down
2019-01-02 10:25:50,853 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -shutting down
2019-01-02 10:25:50,853 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Shutting down
2019-01-02 10:25:50,854 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Shutting down
2019-01-02 10:25:50,854 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -shutdown of request processor complete
2019-01-02 10:25:50,856 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Shutting down
2019-01-02 10:25:50,857 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -LOOKING
2019-01-02 10:25:50,858 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -New election. My id=  2, proposed zxid=0x2d00035c8e
2019-01-02 10:25:51,061 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 400
2019-01-02 10:25:51,462 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 800
2019-01-02 10:25:52,283 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 1600
2019-01-02 10:25:53,884 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 3200
2019-01-02 10:25:57,084 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 6400
2019-01-02 10:26:03,485 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 12800
2019-01-02 10:26:16,286 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 25600
2019-01-02 10:26:41,887 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 51200
2019-01-02 10:27:33,087 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:28:33,088 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:29:33,089 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:30:33,090 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:31:33,091 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:32:33,092 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:33:33,092 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:34:33,093 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:35:33,094 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:36:33,095 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:37:33,095 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:38:33,096 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:39:33,097 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:40:33,098 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:41:33,099 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:42:33,100 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Notification time out: 60000
2019-01-02 10:43:33,293 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -LEADING
2019-01-02 10:43:33,299 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -TCP NoDelay set to: true
2019-01-02 10:43:33,301 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 50000 datadir /var/lib/zookeeper/version-2 snapdir /var/lib/zookeeper/version-2
2019-01-02 10:43:33,301 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -LEADING -LEADER ELECTION TOOK -1062443
2019-01-02 10:43:34,307 [myid:2] -INFO  [LearnerHandler-/144.76.120.143:64542:[email protected]] -Follower sid: 1 : info : [email protected]290
2019-01-02 10:43:34,509 [myid:2] -INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:[email protected]] -Have quorum of supporters, sids: [ 1,2 ]; starting up and setting last processed zxid: 0x2e00000000

보다시피 내가 얻는 것은 설명 없이 로그에 계속해서 시간이 초과되는 것뿐입니다. 일주일 이상 테스트했지만 여전히 이에 대한 솔루션을 찾을 수 없습니다.

누군가 저를 올바른 방향으로 안내해 주시면 대단히 감사하겠습니다.

감사합니다

@Saurabh 문제를 해결 했습니까 .. 비슷한 문제에 직면 해 있습니다.

Pranjal Gore2022-02-15 02:00:14
  • 이전 python : 모든 Treeview 항목을 sqlite3 데이터베이스에 삽입하는 방법
  • 다음 Ocaml에서 집합에 함수를 배치하려면 어떻게 해야 합니까?