Programming/Kafka

[kafka] Multi-broker cluster 설치 및 실행

bisi 2020. 5. 23. 18:50

이전에 카프카 공식홈페이지의 Quick Start 가이드를 참고하여

하나의 주키퍼에 하나의 카프카를 연동하여 실행시키는 것은 진행해 보았다. 

 

이번 글에서는 하나의 주키퍼에 멀티 카프카를 연동하는 방법에 대해서 알아보자. 

 

윈도우 환경에서 Powershell이나 cmd 창에서  kafka_2.12-2.5.0\bin\windows 경로에서 명령어를 실행한다.

리눅스 환경이라면 terminal 창에서 kafka_2.12-2.5.0\bin 경로에서 명렁어를 실행한다.

 

필자는 윈도우 환경이므로, 윈도우 기반으로 설명을 진행하겠다.

 

 

1. 주키퍼 실행

주키퍼의 환경설정은 ..\..\..\config\zookeeper.properties 파일을 참고하면 된다. 

 

만약 멀티 노드 환경의 주키퍼를 실행한다면, 해당파일의 수정이 필요하지만, 

실습에서는 하나의 주키퍼를 실행하기 때문에, 파일 그대로 활용하여 실행한다. 

 

명령어 실행 : zookeeper-server-start.bat
PS C:\kafka\kafka_2.12-2.5.0\bin\windows> .\zookeeper-server-start.bat ..\..\config\zookeeper.properties
실행결과 
[2020-05-21 17:07:41,361] INFO Reading configuration from: ..\..\config\zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-21 17:07:41,365] WARN ..\..\config\zookeeper.properties is relative. Prepend .\ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-21 17:07:41,367] WARN \tmp\zookeeper is relative. Prepend .\ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-21 17:07:41,373] INFO clientPortAddress is 0.0.0.0:2181 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-21 17:07:41,387] INFO secureClientPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-21 17:07:41,390] INFO autopurge.snapRetainCount set to 3 (org.apache.zookeeper.server.DatadirCleanupManager)
[2020-05-21 17:07:41,391] INFO autopurge.purgeInterval set to 0 (org.apache.zookeeper.server.DatadirCleanupManager)
[2020-05-21 17:07:41,392] INFO Purge task is not scheduled. (org.apache.zookeeper.server.DatadirCleanupManager)
[2020-05-21 17:07:41,393] WARN Either no config or no quorum defined in config, running  in standalone mode (org.apache.zookeeper.server.quorum.QuorumPeerMain)
[2020-05-21 17:07:41,395] INFO Log4j found with jmx enabled. (org.apache.zookeeper.jmx.ManagedUtil)
[2020-05-21 17:07:41,419] INFO Reading configuration from: ..\..\config\zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-21 17:07:41,419] WARN ..\..\config\zookeeper.properties is relative. Prepend .\ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-21 17:07:41,422] WARN \tmp\zookeeper is relative. Prepend .\ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-21 17:07:41,423] INFO clientPortAddress is 0.0.0.0:2181 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-21 17:07:41,423] INFO secureClientPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-05-21 17:07:41,424] INFO Starting server (org.apache.zookeeper.server.ZooKeeperServerMain)
[2020-05-21 17:07:41,431] INFO zookeeper.snapshot.trust.empty : false (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2020-05-21 17:07:41,454] INFO Server environment:zookeeper.version=3.5.7-f0fdd52973d373ffd9c86b81d99842dc2c7f660e, built on 02/10/2020 11:30 GMT (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,454] INFO Server environment:host.name=DESKTOP-5V2566P (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,457] INFO Server environment:java.version=1.8.0_232 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,458] INFO Server environment:java.vendor=AdoptOpenJDK (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,459] INFO Server environment:java.home=C:\Users\log\scoop\apps\adopt8-hotspot\current\jre (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,460] INFO Server environment:java.class.path=C:\tibco\tibrv\8.4\lib\tibrvnative.jar;;C:\kafka\kafka_2.12-2.5.0\libs\activation-1.1.1.jar;C:\kafka\kafka_2.12-2.5.0\libs\aopalliance-repackaged-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\argparse4j-0.7.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\audience-annotations-0.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\commons-cli-1.4.jar;C:\kafka\kafka_2.12-2.5.0\libs\commons-lang3-3.8.1.jar;C:\kafka\kafka_2.12-2.5.0\libs\connect-api-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\connect-basic-auth-extension-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\connect-file-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\connect-json-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\connect-mirror-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\connect-mirror-client-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\connect-runtime-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\connect-transforms-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\hk2-api-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\hk2-locator-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\hk2-utils-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\jackson-annotations-2.10.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\jackson-core-2.10.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\jackson-databind-2.10.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\jackson-dataformat-csv-2.10.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\jackson-datatype-jdk8-2.10.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\jackson-jaxrs-base-2.10.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\jackson-jaxrs-json-provider-2.10.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\jackson-module-jaxb-annotations-2.10.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\jackson-module-paranamer-2.10.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\jackson-module-scala_2.12-2.10.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\jakarta.activation-api-1.2.1.jar;C:\kafka\kafka_2.12-2.5.0\libs\jakarta.annotation-api-1.3.4.jar;C:\kafka\kafka_2.12-2.5.0\libs\jakarta.inject-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\jakarta.ws.rs-api-2.1.5.jar;C:\kafka\kafka_2.12-2.5.0\libs\jakarta.xml.bind-api-2.3.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\javassist-3.22.0-CR2.jar;C:\kafka\kafka_2.12-2.5.0\libs\javassist-3.26.0-GA.jar;C:\kafka\kafka_2.12-2.5.0\libs\javax.servlet-api-3.1.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\javax.ws.rs-api-2.1.1.jar;C:\kafka\kafka_2.12-2.5.0\libs\jaxb-api-2.3.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\jersey-client-2.28.jar;C:\kafka\kafka_2.12-2.5.0\libs\jersey-common-2.28.jar;C:\kafka\kafka_2.12-2.5.0\libs\jersey-container-servlet-2.28.jar;C:\kafka\kafka_2.12-2.5.0\libs\jersey-container-servlet-core-2.28.jar;C:\kafka\kafka_2.12-2.5.0\libs\jersey-hk2-2.28.jar;C:\kafka\kafka_2.12-2.5.0\libs\jersey-media-jaxb-2.28.jar;C:\kafka\kafka_2.12-2.5.0\libs\jersey-server-2.28.jar;C:\kafka\kafka_2.12-2.5.0\libs\jetty-client-9.4.24.v20191120.jar;C:\kafka\kafka_2.12-2.5.0\libs\jetty-continuation-9.4.24.v20191120.jar;C:\kafka\kafka_2.12-2.5.0\libs\jetty-http-9.4.24.v20191120.jar;C:\kafka\kafka_2.12-2.5.0\libs\jetty-io-9.4.24.v20191120.jar;C:\kafka\kafka_2.12-2.5.0\libs\jetty-security-9.4.24.v20191120.jar;C:\kafka\kafka_2.12-2.5.0\libs\jetty-server-9.4.24.v20191120.jar;C:\kafka\kafka_2.12-2.5.0\libs\jetty-servlet-9.4.24.v20191120.jar;C:\kafka\kafka_2.12-2.5.0\libs\jetty-servlets-9.4.24.v20191120.jar;C:\kafka\kafka_2.12-2.5.0\libs\jetty-util-9.4.24.v20191120.jar;C:\kafka\kafka_2.12-2.5.0\libs\jopt-simple-5.0.4.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka-clients-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka-log4j-appender-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka-streams-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka-streams-examples-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka-streams-scala_2.12-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka-streams-test-utils-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka-tools-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0-javadoc.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0-javadoc.jar.asc;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0-scaladoc.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0-scaladoc.jar.asc;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0-sources.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0-sources.jar.asc;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0-test-sources.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0-test-sources.jar.asc;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0-test.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0-test.jar.asc;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\kafka_2.12-2.5.0.jar.asc;C:\kafka\kafka_2.12-2.5.0\libs\log4j-1.2.17.jar;C:\kafka\kafka_2.12-2.5.0\libs\lz4-java-1.7.1.jar;C:\kafka\kafka_2.12-2.5.0\libs\maven-artifact-3.6.3.jar;C:\kafka\kafka_2.12-2.5.0\libs\metrics-core-2.2.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\netty-buffer-4.1.45.Final.jar;C:\kafka\kafka_2.12-2.5.0\libs\netty-codec-4.1.45.Final.jar;C:\kafka\kafka_2.12-2.5.0\libs\netty-common-4.1.45.Final.jar;C:\kafka\kafka_2.12-2.5.0\libs\netty-handler-4.1.45.Final.jar;C:\kafka\kafka_2.12-2.5.0\libs\netty-resolver-4.1.45.Final.jar;C:\kafka\kafka_2.12-2.5.0\libs\netty-transport-4.1.45.Final.jar;C:\kafka\kafka_2.12-2.5.0\libs\netty-transport-native-epoll-4.1.45.Final.jar;C:\kafka\kafka_2.12-2.5.0\libs\netty-transport-native-unix-common-4.1.45.Final.jar;C:\kafka\kafka_2.12-2.5.0\libs\osgi-resource-locator-1.0.1.jar;C:\kafka\kafka_2.12-2.5.0\libs\paranamer-2.8.jar;C:\kafka\kafka_2.12-2.5.0\libs\plexus-utils-3.2.1.jar;C:\kafka\kafka_2.12-2.5.0\libs\reflections-0.9.12.jar;C:\kafka\kafka_2.12-2.5.0\libs\rocksdbjni-5.18.3.jar;C:\kafka\kafka_2.12-2.5.0\libs\scala-collection-compat_2.12-2.1.3.jar;C:\kafka\kafka_2.12-2.5.0\libs\scala-java8-compat_2.12-0.9.0.jar;C:\kafka\kafka_2.12-2.5.0\libs\scala-library-2.12.10.jar;C:\kafka\kafka_2.12-2.5.0\libs\scala-logging_2.12-3.9.2.jar;C:\kafka\kafka_2.12-2.5.0\libs\scala-reflect-2.12.10.jar;C:\kafka\kafka_2.12-2.5.0\libs\slf4j-api-1.7.30.jar;C:\kafka\kafka_2.12-2.5.0\libs\slf4j-log4j12-1.7.30.jar;C:\kafka\kafka_2.12-2.5.0\libs\snappy-java-1.1.7.3.jar;C:\kafka\kafka_2.12-2.5.0\libs\validation-api-2.0.1.Final.jar;C:\kafka\kafka_2.12-2.5.0\libs\zookeeper-3.5.7.jar;C:\kafka\kafka_2.12-2.5.0\libs\zookeeper-jute-3.5.7.jar;C:\kafka\kafka_2.12-2.5.0\libs\zstd-jni-1.4.4-7.jar (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,466] INFO Server environment:java.library.path=C:\Users\log\scoop\apps\adopt8-hotspot\current\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\app\log\product\11.2.0\client_1;D:\app\log\product\11.2.0\dbhome_3\bin;D:\app\log\product\11.2.0\dbhome_1\bin;C:\Users\log\scoop\apps\zulu8\current\bin;C:\tibco\tibrv\8.4\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.8.0_111\bin;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\logDev\apache-maven-3.5.4\bin;C:\Program Files\nodejs\;C:\Program Files\MySQL;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\001-1.DoolpeDev\apache-cassandra-3.11.3\bin;C:\Program Files\dotnet\;C:\Program Files\PuTTY\;C:\Program Files\MariaDB 10.3\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;D:\001-1.DoolpeDev\mongodb\mongodb-win32-x86_64-2008plus-ssl-4.0.3\bin;D:\Anaconda-Dev\Script;D:\AnacondaDev\Library\bin;D:\AnacondaDev;D:\AnacondaDev\Scripts;"C:\WINDOWS;C:\WINDOWS\system32\bem";C:\Users\log\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\log\AppData\Local\Programs\Python\Python37\;D:\AnacondaDev;D:\AnacondaDev\Library\mingw-w64\bin;D:\AnacondaDev\Library\usr\bin;D:\AnacondaDev\Library\bin;D:\AnacondaDev\Scripts;C:\Users\log\scoop\apps\adopt8-hotspot\current\bin;C:\Users\log\scoop\apps\adoptopenjdk-hotspot\current\bin;C:\Users\log\scoop\apps\zulu8\current\bin;C:\Users\log\scoop\apps\ojdkbuild8\current\bin;C:\Users\log\scoop\shims;C:\Users\log\AppData\Local\Microsoft\WindowsApps;C:\Users\log\AppData\Roaming\npm;C:\logDev\gradle-3.4-bin\bin;C:\Program Files\Bandizip\;D:\001-1.DoolpeDev\mongodb\mongodb-win32-x86_64-2008plus-ssl-4.0.3\bin;C:\Users\log\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\log\.dotnet\tools;C:\Users\log\AppData\Local\Microsoft\WindowsApps;. (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,471] INFO Server environment:java.io.tmpdir=C:\Users\log\AppData\Local\Temp\ (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,471] INFO Server environment:java.compiler=<NA> (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,472] INFO Server environment:os.name=Windows 10 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,473] INFO Server environment:os.arch=amd64 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,474] INFO Server environment:os.version=10.0 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,474] INFO Server environment:user.name=log (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,475] INFO Server environment:user.home=C:\Users\log (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,476] INFO Server environment:user.dir=C:\kafka\kafka_2.12-2.5.0\bin\windows (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,477] INFO Server environment:os.memory.free=496MB (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,480] INFO Server environment:os.memory.max=512MB (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,481] INFO Server environment:os.memory.total=512MB (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,484] INFO minSessionTimeout set to 6000 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,484] INFO maxSessionTimeout set to 60000 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,486] INFO Created server with tickTime 3000 minSessionTimeout 6000 maxSessionTimeout 60000 datadir \tmp\zookeeper\version-2 snapdir \tmp\zookeeper\version-2 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-05-21 17:07:41,510] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory)
[2020-05-21 17:07:41,555] INFO Configuring NIO connection handler with 10s sessionless connection timeout, 1 selector thread(s), 8 worker threads, and 64 kB direct buffers. (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-05-21 17:07:41,572] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-05-21 17:07:41,592] INFO zookeeper.snapshotSizeFactor = 0.33 (org.apache.zookeeper.server.ZKDatabase)
[2020-05-21 17:07:41,596] INFO Reading snapshot \tmp\zookeeper\version-2\snapshot.0 (org.apache.zookeeper.server.persistence.FileSnap)
[2020-05-21 17:07:41,606] INFO Snapshotting: 0x0 to \tmp\zookeeper\version-2\snapshot.0 (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2020-05-21 17:07:41,633] INFO Using checkIntervalMs=60000 maxPerMinute=10000 (org.apache.zookeeper.server.ContainerManager)

 

2. 멀티 카프카 실행을 위해 환경 설정 파일 수정

카프카 관련 환경설정 파일은 ..\config\server.properties 이다.

 

1) 3개의 멀티 노드로 구성하기 위해서 server.properties 파일을 추가적으로 3개 복사한다.

 

2) server.properties 파일 수정

 

수정 항목 

  kafka1 kafka2 kafka3
broker.id 1 2 3
listeners PLAINTEXT://:9092 PLAINTEXT://:9093 PLAINTEXT://:9094
log.dirs /tmp/kafka-logs-1 /tmp/kafka-logs-2 /tmp/kafka-logs-3

 

 

3. 카프카 3개 실행

주키퍼를 실행했던 동일한 경로에 PowerShell을 3개 더 실행하여, 카프카 3개를 하나씩 실행시킨다.

 

1번 카프카 명령어 실행
PS C:\kafka\kafka_2.12-2.5.0\bin\windows> .\kafka-server-start.bat ..\..\config\server1.properties
실행 결과
...............
[2020-05-21 17:28:57,457] INFO [/config/changes-event-process-thread]: Starting (kafka.common.ZkNodeChangeNotificationListener$ChangeEventProcessThread)
[2020-05-21 17:28:57,480] INFO [SocketServer brokerId=1] Started data-plane processors for 1 acceptors (kafka.network.SocketServer)
[2020-05-21 17:28:57,489] INFO Kafka version: 2.5.0 (org.apache.kafka.common.utils.AppInfoParser)
[2020-05-21 17:28:57,492] INFO Kafka commitId: 66563e712b0b9f84 (org.apache.kafka.common.utils.AppInfoParser)
[2020-05-21 17:28:57,494] INFO Kafka startTimeMs: 1590049737481 (org.apache.kafka.common.utils.AppInfoParser)
[2020-05-21 17:28:57,502] INFO [KafkaServer id=1] started (kafka.server.KafkaServer)

 

 

2번 카프카 명령어 실행
PS C:\kafka\kafka_2.12-2.5.0\bin\windows> .\kafka-server-start.bat ..\..\config\server2.properties
실행 결과
...............
[2020-05-21 17:30:35,711] INFO [TransactionCoordinator id=2] Starting up. (kafka.coordinator.transaction.TransactionCoordinator)
[2020-05-21 17:30:35,713] INFO [Transaction Marker Channel Manager 2]: Starting (kafka.coordinator.transaction.TransactionMarkerChannelManager)
[2020-05-21 17:30:35,714] INFO [TransactionCoordinator id=2] Startup complete. (kafka.coordinator.transaction.TransactionCoordinator)
[2020-05-21 17:30:35,741] INFO [ExpirationReaper-2-AlterAcls]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-05-21 17:30:35,770] INFO [/config/changes-event-process-thread]: Starting (kafka.common.ZkNodeChangeNotificationListener$ChangeEventProcessThread)
[2020-05-21 17:30:35,784] INFO [SocketServer brokerId=2] Started data-plane processors for 1 acceptors (kafka.network.SocketServer)
[2020-05-21 17:30:35,792] INFO Kafka version: 2.5.0 (org.apache.kafka.common.utils.AppInfoParser)
[2020-05-21 17:30:35,796] INFO Kafka commitId: 66563e712b0b9f84 (org.apache.kafka.common.utils.AppInfoParser)
[2020-05-21 17:30:35,797] INFO Kafka startTimeMs: 1590049835786 (org.apache.kafka.common.utils.AppInfoParser)
[2020-05-21 17:30:35,801] INFO [KafkaServer id=2] started (kafka.server.KafkaServer)

 

 

3번 카프카 명령어 실행
PS C:\kafka\kafka_2.12-2.5.0\bin\windows> .\kafka-server-start.bat ..\..\config\server3.properties
실행 결과
...............
[2020-05-21 17:31:08,904] INFO [ExpirationReaper-3-Rebalance]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-05-21 17:31:08,938] INFO [GroupCoordinator 3]: Starting up. (kafka.coordinator.group.GroupCoordinator)
[2020-05-21 17:31:08,940] INFO [GroupCoordinator 3]: Startup complete. (kafka.coordinator.group.GroupCoordinator)
[2020-05-21 17:31:08,945] INFO [GroupMetadataManager brokerId=3] Removed 0 expired offsets in 5 milliseconds. (kafka.coordinator.group.GroupMetadataManager)
[2020-05-21 17:31:08,956] INFO [ProducerId Manager 3]: Acquired new producerId block (brokerId:3,blockStartProducerId:2000,blockEndProducerId:2999) by writing to Zk with path version 3 (kafka.coordinator.transaction.ProducerIdManager)
[2020-05-21 17:31:08,982] INFO [TransactionCoordinator id=3] Starting up. (kafka.coordinator.transaction.TransactionCoordinator)
[2020-05-21 17:31:08,985] INFO [Transaction Marker Channel Manager 3]: Starting (kafka.coordinator.transaction.TransactionMarkerChannelManager)
[2020-05-21 17:31:08,985] INFO [TransactionCoordinator id=3] Startup complete. (kafka.coordinator.transaction.TransactionCoordinator)
[2020-05-21 17:31:09,014] INFO [ExpirationReaper-3-AlterAcls]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-05-21 17:31:09,038] INFO [/config/changes-event-process-thread]: Starting (kafka.common.ZkNodeChangeNotificationListener$ChangeEventProcessThread)
[2020-05-21 17:31:09,052] INFO [SocketServer brokerId=3] Started data-plane processors for 1 acceptors (kafka.network.SocketServer)
[2020-05-21 17:31:09,060] INFO Kafka version: 2.5.0 (org.apache.kafka.common.utils.AppInfoParser)
[2020-05-21 17:31:09,061] INFO Kafka commitId: 66563e712b0b9f84 (org.apache.kafka.common.utils.AppInfoParser)
[2020-05-21 17:31:09,062] INFO Kafka startTimeMs: 1590049869054 (org.apache.kafka.common.utils.AppInfoParser)
[2020-05-21 17:31:09,073] INFO [KafkaServer id=3] started (kafka.server.KafkaServer)

 

 

주키퍼 1개에 3개의 카프카 실행시 아래와 같이 정상 구동 되었다.

 

 

 

 

 


관련 글 

[DataSicence/Kafka] - [kafka] quick start Single-broker cluster window/linux

[DataSicence/Kafka] - [kafka] multi-node zookeeper & kafka docker-compose.yml file