티스토리 뷰

zookeeper와 kafka 서버를 킨 후 consumer / producer를 통한 message queueing system을 연습 중이다

KAFKA_HOME은 https://kafka.apache.org/downloads 에서 다운로드한 binary file을 두는 위치이다.

 

 

 

맥북의 경우 터미널에서 cd 명령어로 다운로드한 폴더 안으로 들어가서 서버를 켜면 된다

일반적인 환경에서는 평화롭게 서버를 키고 진행하면 되는데 난데없이 아래와 같은 에러 메시지를 만났다

Connection to node 0 (/ip:9092) could not be established. Broker may not be available. 

 

 

이전에도 동일한 문제가 있어 구글링을 통해 문제를 한번 해결했었는데 오늘 또다시 만나게 됐다

전 상황에서는 kafka server를 킬 때 설정 파일에서 (KAFKA_HOME/config/server.properties)

- listeners=PLAINTEXT://:9092 로 되어 있던 것을 아래와 같이 localhost를 추가해 해결했었다

- listeners=PLAINTEXT://localhost:9092

https://stackoverflow.com/questions/46158296/kafka-broker-not-available-at-starting

 

kafka broker not available at starting

I set on a ubuntu node of a cluster a kafka 0.11.0.0 instance. Until some weeks ago everything worked fine, today I'm trying to starting it and I obtain this error after the boot: [2017-09-11 16:2...

stackoverflow.com

 

 

 

문제가 뭔지 고민 좀 해보다가 구글링도 좀 해보다가 ..

그래도 안 풀려서 실행하는 경로라도 바꿔보자 싶어서 기존에는 kafka_2.13-2.8.0 폴더 안에서

아래와 같이 실행했던 것을 kafka_2.13-2.8.0/bin 속에 들어가 실행해봤는데 된다

-> zookeeper
./bin/zookeeper-server-start.sh ./config/zookeeper.properties

-> kafka
./bin/kafka-server-start.sh ./config/server.properties


경로 바꾼 후 실행 명령
-> zookeeper는 문제 없어서 기존 경로 그대로 실행

-> kafka
./kafka-server-start.sh ../config/server.properties

터미널 예시 화면, zookeeper -> kafka 순으로 키면 된다

 

 

터미널 / 파워쉘에서 문제를 겪고 있다면 실행 위치를 바꿔보는 게 도움이 되는 것 같다

실행 위치를 바꿔서 실행이 된 후에 비교를 해보려고 원래의 위치로 돌아가

기존 명령어를 입력하니까 또 문제없이 실행이 돼버렸다

문제가 뭘까

'Spring > Spring Cloud' 카테고리의 다른 글

RestTemplate, FeignClient + WebClient  (0) 2021.08.24
스프링 클라우드 겉 핥기  (0) 2021.08.17
댓글
링크
글 보관함
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Total
Today
Yesterday