728x90
반응형
위와 같이
ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing C:\kafka_2.12-2.4.0\config\zookeeper.properties
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:154)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:113)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:82)
Caused by: java.lang.IllegalArgumentException: serverid 1 is not a number
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.setupMyId(QuorumPeerConfig.java:690)
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.setupQuorumPeerConfig(QuorumPeerConfig.java:602)
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:420)
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:150)
... 2 more
Invalid config, exiting abnormally 라는 에러가 뜰 때가 있습니다.
이럴 때는 카프카폴더 안에 있는 config에 있는 zookeeper.properties 파일을 열어서
dataDir=C:\kafka_2.12-2.4.0/tmp/zookeeper 부분을 각 폴더에 맞게 수정해 주면 됩니다.
현재 나는 이런식으로 넣었고, 이 부분은 주키퍼 서버가 실행되면 생성 되기 때문에 현재 있는 폴더랑 다른데 어떻게 해야하나? 라는 생각을 하지 않아도 됩니다.
zookeeper.properties
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# the directory where the snapshot is stored.
dataDir=C:\kafka_2.12-2.4.0/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
# disable the per-ip limit on the number of connections since this is a non-production config
maxClientCnxns=0
# Disable the adminserver by default to avoid port conflicts.
# Set the port to something non-conflicting if choosing to enable this
admin.enableServer=false
# admin.serverPort=8080
# Enable snapshot.trust.empty config if the ZK upgrade from 3.4.X to 3.5.6 is failing
# with "java.io.IOException: No snapshot found, but there are log entries" error.
# Check upgrade docs for more details.
# snapshot.trust.empty=true
현재 이렇게 수정했고, 다시 아래와 같은 명령어를 쳐서 주키퍼를 실행시켜주면
C:\kafka_2.12-2.4.0\bin\windows\kafka-server-start.bat C:\kafka_2.12-2.4.0\config\server.properties
정상적으로 동작하는 것을 알 수 있습니다.
728x90
반응형
'프로그래밍(Web) > 업무관련' 카테고리의 다른 글
[바미] Golang sarama 연동하기(http_server) (0) | 2021.02.09 |
---|---|
[바미] Golang sarama예제로 Kafka 연동하기(interceptors). (0) | 2021.02.09 |
[바미] Golang 카프카 삽질기... (0) | 2021.02.03 |
[바미] 테스팅을 잘하자! (0) | 2021.01.12 |
[바미] r.Body.Read()와 ioutil.ReadAll()의 차이점. (0) | 2021.01.12 |