Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Git
- github
- 금융문자분석경진대회
- AI 경진대회
- 코로나19
- 우분투
- leetcode
- 프로그래머스
- 캐치카페
- 파이썬
- gs25
- 편스토랑 우승상품
- PYTHON
- 자연어처리
- 백준
- 맥북
- Baekjoon
- 데이콘
- 프로그래머스 파이썬
- SW Expert Academy
- dacon
- Real or Not? NLP with Disaster Tweets
- 더현대서울 맛집
- hackerrank
- Kaggle
- ubuntu
- ChatGPT
- Docker
- programmers
- 편스토랑
Archives
- Today
- Total
솜씨좋은장씨
[Kafka] could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) 해결 방법 본문
Programming/Kafka
[Kafka] could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) 해결 방법
솜씨좋은장씨 2021. 9. 1. 14:34728x90
반응형
zookeeper와 kafka를 실행하고 이제 topic을 생성해봐야지! 하며
$ bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092
위의 명령어를 통해 시도하였는데!
[2021-09-01 13:54:26,904] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:27,025] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:27,128] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:27,432] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:27,838] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:28,549] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:29,558] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:30,774] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:31,685] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:32,900] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:33,910] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:35,021] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:36,235] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2021-09-01 13:54:37,348] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
위와 같은 오류를 뿜으며.... 제대로 생성이 진행되지 않았습니다.
👨🏻💻 해결 방법
config 폴더(디렉토리) 안에 있는 server.properties 파일에 주석처리 되어있는 부분을 해제하고
zookeeper와 Kafka를 다시 실행해주면 됩니다.
$ vi config/server.properties
... 생략
############################# Socket Server Settings #############################
# The address the socket server listens on. It will get the value returned from
# java.net.InetAddress.getCanonicalHostName() if not configured.
# FORMAT:
# listeners = listener_name://host_name:port
# EXAMPLE:
# listeners = PLAINTEXT://your.host.name:9092
listeners=PLAINTEXT://:9092
... 생략
처음 들어가면 listeners=PLAINTEXT://:9092 부분이 # 으로 주석처리가 되어있는데 이를 해제하고
다시 topic 생성을 시도하면!
Created topic quickstart-events.
이번에는 제대로 동작하는 것을 확인할 수 있습니다.
읽어주셔서 감사합니다.
'Programming > Kafka' 카테고리의 다른 글
[Kafka] Mac에 카프카 설치하고 실행해보기! (3) | 2021.09.01 |
---|
Comments