Linux安装kafka3.5.1

news2024/11/16 12:41:38

要在Ubuntu上安装Apache Kafka,请按照以下步骤操作:

1、安装Java运行时环境(Ubuntu):

如果已经安装jdk不用执行

sudo apt update
sudo apt install default-jre

2、下载Kafka:

wget https://downloads.apache.org/kafka/3.5.1/kafka_2.12-3.5.1.tgz

3、解压下载的文件:

tar -xzf kafka_2.12-3.5.1.tgz

4、进入Kafka目录:

cd kafka_2.12-3.5.1

 5、启动Zookeeper服务器。在单独的终端窗口中执行以下命令:

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

root@ubuntu2203:/usr/local/kafka_2.12-3.5.1# bin/zookeeper-server-start.sh config/zookeeper.properties
[2023-07-29 08:22:37,807] INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,810] WARN config/zookeeper.properties is relative. Prepend ./ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,817] INFO clientPortAddress is 0.0.0.0:2181 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,818] INFO secureClientPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,818] INFO observerMasterPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,818] INFO metricsProvider.className is org.apache.zookeeper.metrics.impl.DefaultMetricsProvider (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,822] INFO autopurge.snapRetainCount set to 3 (org.apache.zookeeper.server.DatadirCleanupManager)
[2023-07-29 08:22:37,822] INFO autopurge.purgeInterval set to 0 (org.apache.zookeeper.server.DatadirCleanupManager)
[2023-07-29 08:22:37,822] INFO Purge task is not scheduled. (org.apache.zookeeper.server.DatadirCleanupManager)
[2023-07-29 08:22:37,822] WARN Either no config or no quorum defined in config, running in standalone mode (org.apache.zookeeper.server.quorum.QuorumPeerMain)
[2023-07-29 08:22:37,824] INFO Log4j 1.2 jmx support not found; jmx disabled. (org.apache.zookeeper.jmx.ManagedUtil)
[2023-07-29 08:22:37,825] INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,825] WARN config/zookeeper.properties is relative. Prepend ./ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,826] INFO clientPortAddress is 0.0.0.0:2181 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,826] INFO secureClientPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,826] INFO observerMasterPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,826] INFO metricsProvider.className is org.apache.zookeeper.metrics.impl.DefaultMetricsProvider (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-07-29 08:22:37,827] INFO Starting server (org.apache.zookeeper.server.ZooKeeperServerMain)
[2023-07-29 08:22:37,852] INFO ServerMetrics initialized with provider org.apache.zookeeper.metrics.impl.DefaultMetricsProvider@23282c25 (org.apache.zookeeper.server.ServerMetrics)
[2023-07-29 08:22:37,858] INFO zookeeper.snapshot.trust.empty : false (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2023-07-29 08:22:37,872] INFO  (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,872] INFO   ______                  _                                           (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,872] INFO  |___  /                 | |                                          (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,872] INFO     / /    ___     ___   | | __   ___    ___   _ __     ___   _ __    (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,872] INFO    / /    / _ \   / _ \  | |/ /  / _ \  / _ \ | '_ \   / _ \ | '__| (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,872] INFO   / /__  | (_) | | (_) | |   <  |  __/ |  __/ | |_) | |  __/ | |     (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,872] INFO  /_____|  \___/   \___/  |_|\_\  \___|  \___| | .__/   \___| |_| (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,872] INFO                                               | |                      (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,872] INFO                                               |_|                      (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,873] INFO  (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,898] INFO Server environment:zookeeper.version=3.6.4--d65253dcf68e9097c6e95a126463fd5fdeb4521c, built on 12/18/2022 18:10 GMT (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,898] INFO Server environment:host.name=ubuntu2203 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,899] INFO Server environment:java.version=11.0.19 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,899] INFO Server environment:java.vendor=Ubuntu (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:java.home=/usr/lib/jvm/java-11-openjdk-amd64 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:java.class.path=/usr/local/kafka_2.12-3.5.1/bin/../libs/activation-1.1.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/aopalliance-repackaged-2.6.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/argparse4j-0.7.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/audience-annotations-0.13.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/commons-cli-1.4.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/commons-lang3-3.8.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-api-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-basic-auth-extension-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-json-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-mirror-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-mirror-client-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-runtime-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-transforms-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/hk2-api-2.6.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/hk2-locator-2.6.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/hk2-utils-2.6.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-annotations-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-core-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-databind-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-dataformat-csv-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-datatype-jdk8-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-jaxrs-base-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-jaxrs-json-provider-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-module-jaxb-annotations-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-module-scala_2.12-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.activation-api-1.2.2.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.annotation-api-1.3.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.inject-2.6.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.validation-api-2.0.2.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.ws.rs-api-2.1.6.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.xml.bind-api-2.3.3.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/javassist-3.29.2-GA.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/javax.activation-api-1.2.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/javax.annotation-api-1.3.2.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/javax.servlet-api-3.1.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/javax.ws.rs-api-2.1.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jaxb-api-2.3.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-client-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-common-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-container-servlet-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-container-servlet-core-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-hk2-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-server-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-client-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-continuation-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-http-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-io-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-security-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-server-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-servlet-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-servlets-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-util-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-util-ajax-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jline-3.22.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jopt-simple-5.0.4.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jose4j-0.9.3.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka_2.12-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-clients-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-group-coordinator-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-log4j-appender-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-metadata-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-raft-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-server-common-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-shell-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-storage-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-storage-api-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-streams-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-streams-examples-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-streams-scala_2.12-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-streams-test-utils-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-tools-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-tools-api-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/lz4-java-1.8.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/maven-artifact-3.8.8.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/metrics-core-2.2.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/metrics-core-4.1.12.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-buffer-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-codec-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-common-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-handler-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-resolver-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-transport-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-transport-classes-epoll-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-transport-native-epoll-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-transport-native-unix-common-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/osgi-resource-locator-1.0.3.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/paranamer-2.8.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/plexus-utils-3.3.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/reflections-0.9.12.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/reload4j-1.2.25.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/rocksdbjni-7.1.2.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/scala-collection-compat_2.12-2.10.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/scala-java8-compat_2.12-1.0.2.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/scala-library-2.12.15.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/scala-logging_2.12-3.9.4.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/scala-reflect-2.12.15.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/slf4j-api-1.7.36.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/slf4j-reload4j-1.7.36.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/snappy-java-1.1.10.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/swagger-annotations-2.2.8.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/trogdor-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/zookeeper-3.6.4.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/zookeeper-jute-3.6.4.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/zstd-jni-1.5.5-1.jar (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:java.library.path=/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:java.io.tmpdir=/tmp (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:java.compiler=<NA> (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:os.name=Linux (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:os.arch=amd64 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:os.version=5.19.0-50-generic (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:user.name=root (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:user.home=/root (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,900] INFO Server environment:user.dir=/usr/local/kafka_2.12-3.5.1 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,901] INFO Server environment:os.memory.free=490MB (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,901] INFO Server environment:os.memory.max=512MB (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,901] INFO Server environment:os.memory.total=512MB (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,901] INFO zookeeper.enableEagerACLCheck = false (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,902] INFO zookeeper.digest.enabled = true (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,902] INFO zookeeper.closeSessionTxn.enabled = true (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,902] INFO zookeeper.flushDelay=0 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,902] INFO zookeeper.maxWriteQueuePollTime=0 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,903] INFO zookeeper.maxBatchSize=1000 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,903] INFO zookeeper.intBufferStartingSizeBytes = 1024 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,905] INFO Weighed connection throttling is disabled (org.apache.zookeeper.server.BlueThrottle)
[2023-07-29 08:22:37,907] INFO minSessionTimeout set to 6000 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,907] INFO maxSessionTimeout set to 60000 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,909] INFO Response cache size is initialized with value 400. (org.apache.zookeeper.server.ResponseCache)
[2023-07-29 08:22:37,910] INFO Response cache size is initialized with value 400. (org.apache.zookeeper.server.ResponseCache)
[2023-07-29 08:22:37,911] INFO zookeeper.pathStats.slotCapacity = 60 (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-07-29 08:22:37,911] INFO zookeeper.pathStats.slotDuration = 15 (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-07-29 08:22:37,911] INFO zookeeper.pathStats.maxDepth = 6 (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-07-29 08:22:37,911] INFO zookeeper.pathStats.initialDelay = 5 (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-07-29 08:22:37,912] INFO zookeeper.pathStats.delay = 5 (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-07-29 08:22:37,912] INFO zookeeper.pathStats.enabled = false (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-07-29 08:22:37,919] INFO The max bytes for all large requests are set to 104857600 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,919] INFO The large request threshold is set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,919] INFO Created server with tickTime 3000 minSessionTimeout 6000 maxSessionTimeout 60000 clientPortListenBacklog -1 datadir /tmp/zookeeper/version-2 snapdir /tmp/zookeeper/version-2 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:37,942] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory)
[2023-07-29 08:22:37,945] WARN maxCnxns is not configured, using default value 0. (org.apache.zookeeper.server.ServerCnxnFactory)
[2023-07-29 08:22:37,947] INFO Configuring NIO connection handler with 10s sessionless connection timeout, 1 selector thread(s), 4 worker threads, and 64 kB direct buffers. (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2023-07-29 08:22:37,958] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2023-07-29 08:22:37,982] INFO Using org.apache.zookeeper.server.watch.WatchManager as watch manager (org.apache.zookeeper.server.watch.WatchManagerFactory)
[2023-07-29 08:22:37,982] INFO Using org.apache.zookeeper.server.watch.WatchManager as watch manager (org.apache.zookeeper.server.watch.WatchManagerFactory)
[2023-07-29 08:22:37,988] INFO zookeeper.snapshotSizeFactor = 0.33 (org.apache.zookeeper.server.ZKDatabase)
[2023-07-29 08:22:37,988] INFO zookeeper.commitLogCount=500 (org.apache.zookeeper.server.ZKDatabase)
[2023-07-29 08:22:38,002] INFO zookeeper.snapshot.compression.method = CHECKED (org.apache.zookeeper.server.persistence.SnapStream)
[2023-07-29 08:22:38,002] INFO Snapshotting: 0x0 to /tmp/zookeeper/version-2/snapshot.0 (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2023-07-29 08:22:38,008] INFO Snapshot loaded in 19 ms, highest zxid is 0x0, digest is 1371985504 (org.apache.zookeeper.server.ZKDatabase)
[2023-07-29 08:22:38,008] INFO Snapshotting: 0x0 to /tmp/zookeeper/version-2/snapshot.0 (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2023-07-29 08:22:38,009] INFO Snapshot taken in 1 ms (org.apache.zookeeper.server.ZooKeeperServer)
[2023-07-29 08:22:38,033] INFO zookeeper.request_throttler.shutdownTimeout = 10000 (org.apache.zookeeper.server.RequestThrottler)
[2023-07-29 08:22:38,033] INFO PrepRequestProcessor (sid:0) started, reconfigEnabled=false (org.apache.zookeeper.server.PrepRequestProcessor)
[2023-07-29 08:22:38,091] INFO Using checkIntervalMs=60000 maxPerMinute=10000 maxNeverUsedIntervalMs=0 (org.apache.zookeeper.server.ContainerManager)
[2023-07-29 08:22:38,092] INFO ZooKeeper audit is disabled. (org.apache.zookeeper.audit.ZKAuditProvider)
[2023-07-29 08:23:02,288] INFO Creating new log file: log.1 (org.apache.zookeeper.server.persistence.FileTxnLog)

6、启动Kafka服务器。在另一个终端窗口中执行以下命令:

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

 

root@ubuntu2203:/usr/local/kafka_2.12-3.5.1# bin/kafka-server-start.sh config/server.properties
[2023-07-29 08:23:01,586] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2023-07-29 08:23:02,087] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2023-07-29 08:23:02,177] INFO Registered signal handlers for TERM, INT, HUP (org.apache.kafka.common.utils.LoggingSignalHandler)
[2023-07-29 08:23:02,179] INFO starting (kafka.server.KafkaServer)
[2023-07-29 08:23:02,180] INFO Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer)
[2023-07-29 08:23:02,200] INFO [ZooKeeperClient Kafka server] Initializing a new session to localhost:2181. (kafka.zookeeper.ZooKeeperClient)
[2023-07-29 08:23:02,214] INFO Client environment:zookeeper.version=3.6.4--d65253dcf68e9097c6e95a126463fd5fdeb4521c, built on 12/18/2022 18:10 GMT (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,215] INFO Client environment:host.name=ubuntu2203 (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,215] INFO Client environment:java.version=11.0.19 (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,215] INFO Client environment:java.vendor=Ubuntu (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,215] INFO Client environment:java.home=/usr/lib/jvm/java-11-openjdk-amd64 (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,215] INFO Client environment:java.class.path=/usr/local/kafka_2.12-3.5.1/bin/../libs/activation-1.1.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/aopalliance-repackaged-2.6.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/argparse4j-0.7.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/audience-annotations-0.13.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/commons-cli-1.4.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/commons-lang3-3.8.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-api-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-basic-auth-extension-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-json-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-mirror-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-mirror-client-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-runtime-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/connect-transforms-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/hk2-api-2.6.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/hk2-locator-2.6.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/hk2-utils-2.6.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-annotations-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-core-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-databind-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-dataformat-csv-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-datatype-jdk8-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-jaxrs-base-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-jaxrs-json-provider-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-module-jaxb-annotations-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jackson-module-scala_2.12-2.13.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.activation-api-1.2.2.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.annotation-api-1.3.5.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.inject-2.6.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.validation-api-2.0.2.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.ws.rs-api-2.1.6.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jakarta.xml.bind-api-2.3.3.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/javassist-3.29.2-GA.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/javax.activation-api-1.2.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/javax.annotation-api-1.3.2.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/javax.servlet-api-3.1.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/javax.ws.rs-api-2.1.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jaxb-api-2.3.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-client-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-common-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-container-servlet-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-container-servlet-core-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-hk2-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jersey-server-2.39.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-client-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-continuation-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-http-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-io-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-security-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-server-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-servlet-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-servlets-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-util-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jetty-util-ajax-9.4.51.v20230217.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jline-3.22.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jopt-simple-5.0.4.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/jose4j-0.9.3.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka_2.12-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-clients-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-group-coordinator-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-log4j-appender-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-metadata-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-raft-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-server-common-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-shell-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-storage-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-storage-api-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-streams-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-streams-examples-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-streams-scala_2.12-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-streams-test-utils-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-tools-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/kafka-tools-api-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/lz4-java-1.8.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/maven-artifact-3.8.8.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/metrics-core-2.2.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/metrics-core-4.1.12.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-buffer-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-codec-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-common-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-handler-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-resolver-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-transport-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-transport-classes-epoll-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-transport-native-epoll-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/netty-transport-native-unix-common-4.1.94.Final.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/osgi-resource-locator-1.0.3.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/paranamer-2.8.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/plexus-utils-3.3.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/reflections-0.9.12.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/reload4j-1.2.25.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/rocksdbjni-7.1.2.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/scala-collection-compat_2.12-2.10.0.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/scala-java8-compat_2.12-1.0.2.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/scala-library-2.12.15.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/scala-logging_2.12-3.9.4.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/scala-reflect-2.12.15.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/slf4j-api-1.7.36.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/slf4j-reload4j-1.7.36.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/snappy-java-1.1.10.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/swagger-annotations-2.2.8.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/trogdor-3.5.1.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/zookeeper-3.6.4.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/zookeeper-jute-3.6.4.jar:/usr/local/kafka_2.12-3.5.1/bin/../libs/zstd-jni-1.5.5-1.jar (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,216] INFO Client environment:java.library.path=/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,216] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,216] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,216] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,217] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,217] INFO Client environment:os.version=5.19.0-50-generic (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,217] INFO Client environment:user.name=root (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,217] INFO Client environment:user.home=/root (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,217] INFO Client environment:user.dir=/usr/local/kafka_2.12-3.5.1 (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,217] INFO Client environment:os.memory.free=972MB (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,218] INFO Client environment:os.memory.max=1024MB (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,218] INFO Client environment:os.memory.total=1024MB (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,223] INFO Initiating client connection, connectString=localhost:2181 sessionTimeout=18000 watcher=kafka.zookeeper.ZooKeeperClient$ZooKeeperClientWatcher$@50313382 (org.apache.zookeeper.ZooKeeper)
[2023-07-29 08:23:02,238] INFO jute.maxbuffer value is 4194304 Bytes (org.apache.zookeeper.ClientCnxnSocket)
[2023-07-29 08:23:02,248] INFO zookeeper.request.timeout value is 0. feature enabled=false (org.apache.zookeeper.ClientCnxn)
[2023-07-29 08:23:02,253] INFO [ZooKeeperClient Kafka server] Waiting until connected. (kafka.zookeeper.ZooKeeperClient)
[2023-07-29 08:23:02,259] INFO Opening socket connection to server localhost/127.0.0.1:2181. (org.apache.zookeeper.ClientCnxn)
[2023-07-29 08:23:02,274] INFO Socket connection established, initiating session, client: /127.0.0.1:36080, server: localhost/127.0.0.1:2181 (org.apache.zookeeper.ClientCnxn)
[2023-07-29 08:23:02,305] INFO Session establishment complete on server localhost/127.0.0.1:2181, session id = 0x100001b5f850000, negotiated timeout = 18000 (org.apache.zookeeper.ClientCnxn)
[2023-07-29 08:23:02,310] INFO [ZooKeeperClient Kafka server] Connected. (kafka.zookeeper.ZooKeeperClient)
[2023-07-29 08:23:02,565] INFO Cluster ID = hfzaja9tQf-FzxKNUMCT5A (kafka.server.KafkaServer)
[2023-07-29 08:23:02,569] WARN No meta.properties file under dir /tmp/kafka-logs/meta.properties (kafka.server.BrokerMetadataCheckpoint)
[2023-07-29 08:23:02,667] INFO KafkaConfig values: 
	advertised.listeners = null
	alter.config.policy.class.name = null
	alter.log.dirs.replication.quota.window.num = 11
	alter.log.dirs.replication.quota.window.size.seconds = 1
	authorizer.class.name = 
	auto.create.topics.enable = true
	auto.include.jmx.reporter = true
	auto.leader.rebalance.enable = true
	background.threads = 10
	broker.heartbeat.interval.ms = 2000
	broker.id = 0
	broker.id.generation.enable = true
	broker.rack = null
	broker.session.timeout.ms = 9000
	client.quota.callback.class = null
	compression.type = producer
	connection.failed.authentication.delay.ms = 100
	connections.max.idle.ms = 600000
	connections.max.reauth.ms = 0
	control.plane.listener.name = null
	controlled.shutdown.enable = true
	controlled.shutdown.max.retries = 3
	controlled.shutdown.retry.backoff.ms = 5000
	controller.listener.names = null
	controller.quorum.append.linger.ms = 25
	controller.quorum.election.backoff.max.ms = 1000
	controller.quorum.election.timeout.ms = 1000
	controller.quorum.fetch.timeout.ms = 2000
	controller.quorum.request.timeout.ms = 2000
	controller.quorum.retry.backoff.ms = 20
	controller.quorum.voters = []
	controller.quota.window.num = 11
	controller.quota.window.size.seconds = 1
	controller.socket.timeout.ms = 30000
	create.topic.policy.class.name = null
	default.replication.factor = 1
	delegation.token.expiry.check.interval.ms = 3600000
	delegation.token.expiry.time.ms = 86400000
	delegation.token.master.key = null
	delegation.token.max.lifetime.ms = 604800000
	delegation.token.secret.key = null
	delete.records.purgatory.purge.interval.requests = 1
	delete.topic.enable = true
	early.start.listeners = null
	fetch.max.bytes = 57671680
	fetch.purgatory.purge.interval.requests = 1000
	group.consumer.assignors = []
	group.consumer.heartbeat.interval.ms = 5000
	group.consumer.max.heartbeat.interval.ms = 15000
	group.consumer.max.session.timeout.ms = 60000
	group.consumer.max.size = 2147483647
	group.consumer.min.heartbeat.interval.ms = 5000
	group.consumer.min.session.timeout.ms = 45000
	group.consumer.session.timeout.ms = 45000
	group.coordinator.new.enable = false
	group.coordinator.threads = 1
	group.initial.rebalance.delay.ms = 0
	group.max.session.timeout.ms = 1800000
	group.max.size = 2147483647
	group.min.session.timeout.ms = 6000
	initial.broker.registration.timeout.ms = 60000
	inter.broker.listener.name = null
	inter.broker.protocol.version = 3.5-IV2
	kafka.metrics.polling.interval.secs = 10
	kafka.metrics.reporters = []
	leader.imbalance.check.interval.seconds = 300
	leader.imbalance.per.broker.percentage = 10
	listener.security.protocol.map = PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
	listeners = PLAINTEXT://:9092
	log.cleaner.backoff.ms = 15000
	log.cleaner.dedupe.buffer.size = 134217728
	log.cleaner.delete.retention.ms = 86400000
	log.cleaner.enable = true
	log.cleaner.io.buffer.load.factor = 0.9
	log.cleaner.io.buffer.size = 524288
	log.cleaner.io.max.bytes.per.second = 1.7976931348623157E308
	log.cleaner.max.compaction.lag.ms = 9223372036854775807
	log.cleaner.min.cleanable.ratio = 0.5
	log.cleaner.min.compaction.lag.ms = 0
	log.cleaner.threads = 1
	log.cleanup.policy = [delete]
	log.dir = /tmp/kafka-logs
	log.dirs = /tmp/kafka-logs
	log.flush.interval.messages = 9223372036854775807
	log.flush.interval.ms = null
	log.flush.offset.checkpoint.interval.ms = 60000
	log.flush.scheduler.interval.ms = 9223372036854775807
	log.flush.start.offset.checkpoint.interval.ms = 60000
	log.index.interval.bytes = 4096
	log.index.size.max.bytes = 10485760
	log.message.downconversion.enable = true
	log.message.format.version = 3.0-IV1
	log.message.timestamp.difference.max.ms = 9223372036854775807
	log.message.timestamp.type = CreateTime
	log.preallocate = false
	log.retention.bytes = -1
	log.retention.check.interval.ms = 300000
	log.retention.hours = 168
	log.retention.minutes = null
	log.retention.ms = null
	log.roll.hours = 168
	log.roll.jitter.hours = 0
	log.roll.jitter.ms = null
	log.roll.ms = null
	log.segment.bytes = 1073741824
	log.segment.delete.delay.ms = 60000
	max.connection.creation.rate = 2147483647
	max.connections = 2147483647
	max.connections.per.ip = 2147483647
	max.connections.per.ip.overrides = 
	max.incremental.fetch.session.cache.slots = 1000
	message.max.bytes = 1048588
	metadata.log.dir = null
	metadata.log.max.record.bytes.between.snapshots = 20971520
	metadata.log.max.snapshot.interval.ms = 3600000
	metadata.log.segment.bytes = 1073741824
	metadata.log.segment.min.bytes = 8388608
	metadata.log.segment.ms = 604800000
	metadata.max.idle.interval.ms = 500
	metadata.max.retention.bytes = 104857600
	metadata.max.retention.ms = 604800000
	metric.reporters = []
	metrics.num.samples = 2
	metrics.recording.level = INFO
	metrics.sample.window.ms = 30000
	min.insync.replicas = 1
	node.id = 0
	num.io.threads = 8
	num.network.threads = 3
	num.partitions = 1
	num.recovery.threads.per.data.dir = 1
	num.replica.alter.log.dirs.threads = null
	num.replica.fetchers = 1
	offset.metadata.max.bytes = 4096
	offsets.commit.required.acks = -1
	offsets.commit.timeout.ms = 5000
	offsets.load.buffer.size = 5242880
	offsets.retention.check.interval.ms = 600000
	offsets.retention.minutes = 10080
	offsets.topic.compression.codec = 0
	offsets.topic.num.partitions = 50
	offsets.topic.replication.factor = 1
	offsets.topic.segment.bytes = 104857600
	password.encoder.cipher.algorithm = AES/CBC/PKCS5Padding
	password.encoder.iterations = 4096
	password.encoder.key.length = 128
	password.encoder.keyfactory.algorithm = null
	password.encoder.old.secret = null
	password.encoder.secret = null
	principal.builder.class = class org.apache.kafka.common.security.authenticator.DefaultKafkaPrincipalBuilder
	process.roles = []
	producer.id.expiration.check.interval.ms = 600000
	producer.id.expiration.ms = 86400000
	producer.purgatory.purge.interval.requests = 1000
	queued.max.request.bytes = -1
	queued.max.requests = 500
	quota.window.num = 11
	quota.window.size.seconds = 1
	remote.log.index.file.cache.total.size.bytes = 1073741824
	remote.log.manager.task.interval.ms = 30000
	remote.log.manager.task.retry.backoff.max.ms = 30000
	remote.log.manager.task.retry.backoff.ms = 500
	remote.log.manager.task.retry.jitter = 0.2
	remote.log.manager.thread.pool.size = 10
	remote.log.metadata.manager.class.name = null
	remote.log.metadata.manager.class.path = null
	remote.log.metadata.manager.impl.prefix = null
	remote.log.metadata.manager.listener.name = null
	remote.log.reader.max.pending.tasks = 100
	remote.log.reader.threads = 10
	remote.log.storage.manager.class.name = null
	remote.log.storage.manager.class.path = null
	remote.log.storage.manager.impl.prefix = null
	remote.log.storage.system.enable = false
	replica.fetch.backoff.ms = 1000
	replica.fetch.max.bytes = 1048576
	replica.fetch.min.bytes = 1
	replica.fetch.response.max.bytes = 10485760
	replica.fetch.wait.max.ms = 500
	replica.high.watermark.checkpoint.interval.ms = 5000
	replica.lag.time.max.ms = 30000
	replica.selector.class = null
	replica.socket.receive.buffer.bytes = 65536
	replica.socket.timeout.ms = 30000
	replication.quota.window.num = 11
	replication.quota.window.size.seconds = 1
	request.timeout.ms = 30000
	reserved.broker.max.id = 1000
	sasl.client.callback.handler.class = null
	sasl.enabled.mechanisms = [GSSAPI]
	sasl.jaas.config = null
	sasl.kerberos.kinit.cmd = /usr/bin/kinit
	sasl.kerberos.min.time.before.relogin = 60000
	sasl.kerberos.principal.to.local.rules = [DEFAULT]
	sasl.kerberos.service.name = null
	sasl.kerberos.ticket.renew.jitter = 0.05
	sasl.kerberos.ticket.renew.window.factor = 0.8
	sasl.login.callback.handler.class = null
	sasl.login.class = null
	sasl.login.connect.timeout.ms = null
	sasl.login.read.timeout.ms = null
	sasl.login.refresh.buffer.seconds = 300
	sasl.login.refresh.min.period.seconds = 60
	sasl.login.refresh.window.factor = 0.8
	sasl.login.refresh.window.jitter = 0.05
	sasl.login.retry.backoff.max.ms = 10000
	sasl.login.retry.backoff.ms = 100
	sasl.mechanism.controller.protocol = GSSAPI
	sasl.mechanism.inter.broker.protocol = GSSAPI
	sasl.oauthbearer.clock.skew.seconds = 30
	sasl.oauthbearer.expected.audience = null
	sasl.oauthbearer.expected.issuer = null
	sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000
	sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000
	sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100
	sasl.oauthbearer.jwks.endpoint.url = null
	sasl.oauthbearer.scope.claim.name = scope
	sasl.oauthbearer.sub.claim.name = sub
	sasl.oauthbearer.token.endpoint.url = null
	sasl.server.callback.handler.class = null
	sasl.server.max.receive.size = 524288
	security.inter.broker.protocol = PLAINTEXT
	security.providers = null
	server.max.startup.time.ms = 9223372036854775807
	socket.connection.setup.timeout.max.ms = 30000
	socket.connection.setup.timeout.ms = 10000
	socket.listen.backlog.size = 50
	socket.receive.buffer.bytes = 102400
	socket.request.max.bytes = 104857600
	socket.send.buffer.bytes = 102400
	ssl.cipher.suites = []
	ssl.client.auth = none
	ssl.enabled.protocols = [TLSv1.2, TLSv1.3]
	ssl.endpoint.identification.algorithm = https
	ssl.engine.factory.class = null
	ssl.key.password = null
	ssl.keymanager.algorithm = SunX509
	ssl.keystore.certificate.chain = null
	ssl.keystore.key = null
	ssl.keystore.location = null
	ssl.keystore.password = null
	ssl.keystore.type = JKS
	ssl.principal.mapping.rules = DEFAULT
	ssl.protocol = TLSv1.3
	ssl.provider = null
	ssl.secure.random.implementation = null
	ssl.trustmanager.algorithm = PKIX
	ssl.truststore.certificates = null
	ssl.truststore.location = null
	ssl.truststore.password = null
	ssl.truststore.type = JKS
	transaction.abort.timed.out.transaction.cleanup.interval.ms = 10000
	transaction.max.timeout.ms = 900000
	transaction.remove.expired.transaction.cleanup.interval.ms = 3600000
	transaction.state.log.load.buffer.size = 5242880
	transaction.state.log.min.isr = 1
	transaction.state.log.num.partitions = 50
	transaction.state.log.replication.factor = 1
	transaction.state.log.segment.bytes = 104857600
	transactional.id.expiration.ms = 604800000
	unclean.leader.election.enable = false
	unstable.api.versions.enable = false
	zookeeper.clientCnxnSocket = null
	zookeeper.connect = localhost:2181
	zookeeper.connection.timeout.ms = 18000
	zookeeper.max.in.flight.requests = 10
	zookeeper.metadata.migration.enable = false
	zookeeper.session.timeout.ms = 18000
	zookeeper.set.acl = false
	zookeeper.ssl.cipher.suites = null
	zookeeper.ssl.client.enable = false
	zookeeper.ssl.crl.enable = false
	zookeeper.ssl.enabled.protocols = null
	zookeeper.ssl.endpoint.identification.algorithm = HTTPS
	zookeeper.ssl.keystore.location = null
	zookeeper.ssl.keystore.password = null
	zookeeper.ssl.keystore.type = null
	zookeeper.ssl.ocsp.enable = false
	zookeeper.ssl.protocol = TLSv1.2
	zookeeper.ssl.truststore.location = null
	zookeeper.ssl.truststore.password = null
	zookeeper.ssl.truststore.type = null
 (kafka.server.KafkaConfig)
[2023-07-29 08:23:02,751] INFO [ThrottledChannelReaper-Fetch]: Starting (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2023-07-29 08:23:02,755] INFO [ThrottledChannelReaper-Request]: Starting (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2023-07-29 08:23:02,762] INFO [ThrottledChannelReaper-Produce]: Starting (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2023-07-29 08:23:02,765] INFO [ThrottledChannelReaper-ControllerMutation]: Starting (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2023-07-29 08:23:02,784] INFO Log directory /tmp/kafka-logs not found, creating it. (kafka.log.LogManager)
[2023-07-29 08:23:02,809] INFO Loading logs from log dirs ArrayBuffer(/tmp/kafka-logs) (kafka.log.LogManager)
[2023-07-29 08:23:02,816] INFO No logs found to be loaded in /tmp/kafka-logs (kafka.log.LogManager)
[2023-07-29 08:23:02,833] INFO Loaded 0 logs in 23ms (kafka.log.LogManager)
[2023-07-29 08:23:02,836] INFO Starting log cleanup with a period of 300000 ms. (kafka.log.LogManager)
[2023-07-29 08:23:02,839] INFO Starting log flusher with a default period of 9223372036854775807 ms. (kafka.log.LogManager)
[2023-07-29 08:23:02,923] INFO [kafka-log-cleaner-thread-0]: Starting (kafka.log.LogCleaner$CleanerThread)
[2023-07-29 08:23:02,969] INFO [feature-zk-node-event-process-thread]: Starting (kafka.server.FinalizedFeatureChangeListener$ChangeNotificationProcessorThread)
[2023-07-29 08:23:02,996] INFO Feature ZK node at path: /feature does not exist (kafka.server.FinalizedFeatureChangeListener)
[2023-07-29 08:23:03,029] INFO [zk-broker-0-to-controller-forwarding-channel-manager]: Starting (kafka.server.BrokerToControllerRequestThread)
[2023-07-29 08:23:03,468] INFO Updated connection-accept-rate max connection creation rate to 2147483647 (kafka.network.ConnectionQuotas)
[2023-07-29 08:23:03,491] INFO [SocketServer listenerType=ZK_BROKER, nodeId=0] Created data-plane acceptor and processors for endpoint : ListenerName(PLAINTEXT) (kafka.network.SocketServer)
[2023-07-29 08:23:03,506] INFO [zk-broker-0-to-controller-alter-partition-channel-manager]: Starting (kafka.server.BrokerToControllerRequestThread)
[2023-07-29 08:23:03,539] INFO [ExpirationReaper-0-Produce]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2023-07-29 08:23:03,540] INFO [ExpirationReaper-0-Fetch]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2023-07-29 08:23:03,543] INFO [ExpirationReaper-0-DeleteRecords]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2023-07-29 08:23:03,547] INFO [ExpirationReaper-0-ElectLeader]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2023-07-29 08:23:03,565] INFO [LogDirFailureHandler]: Starting (kafka.server.ReplicaManager$LogDirFailureHandler)
[2023-07-29 08:23:03,592] INFO Creating /brokers/ids/0 (is it secure? false) (kafka.zk.KafkaZkClient)
[2023-07-29 08:23:03,615] INFO Stat of the created znode at /brokers/ids/0 is: 25,25,1690590183606,1690590183606,1,0,0,72057711604596736,204,0,25
 (kafka.zk.KafkaZkClient)
[2023-07-29 08:23:03,617] INFO Registered broker 0 at path /brokers/ids/0 with addresses: PLAINTEXT://ubuntu2203:9092, czxid (broker epoch): 25 (kafka.zk.KafkaZkClient)
[2023-07-29 08:23:03,714] INFO [ExpirationReaper-0-topic]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2023-07-29 08:23:03,721] INFO [ExpirationReaper-0-Heartbeat]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2023-07-29 08:23:03,732] INFO [ExpirationReaper-0-Rebalance]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2023-07-29 08:23:03,739] INFO Successfully created /controller_epoch with initial epoch 0 (kafka.zk.KafkaZkClient)
[2023-07-29 08:23:03,761] INFO Feature ZK node created at path: /feature (kafka.server.FinalizedFeatureChangeListener)
[2023-07-29 08:23:03,777] INFO [GroupCoordinator 0]: Starting up. (kafka.coordinator.group.GroupCoordinator)
[2023-07-29 08:23:03,787] INFO [GroupCoordinator 0]: Startup complete. (kafka.coordinator.group.GroupCoordinator)
[2023-07-29 08:23:03,803] INFO [TransactionCoordinator id=0] Starting up. (kafka.coordinator.transaction.TransactionCoordinator)
[2023-07-29 08:23:03,812] INFO [MetadataCache brokerId=0] Updated cache from existing <empty> to latest FinalizedFeaturesAndEpoch(features=Map(), epoch=0). (kafka.server.metadata.ZkMetadataCache)
[2023-07-29 08:23:03,817] INFO [TransactionCoordinator id=0] Startup complete. (kafka.coordinator.transaction.TransactionCoordinator)
[2023-07-29 08:23:03,825] INFO [TxnMarkerSenderThread-0]: Starting (kafka.coordinator.transaction.TransactionMarkerChannelManager)
[2023-07-29 08:23:03,867] INFO [ExpirationReaper-0-AlterAcls]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2023-07-29 08:23:03,930] INFO [/config/changes-event-process-thread]: Starting (kafka.common.ZkNodeChangeNotificationListener$ChangeEventProcessThread)
[2023-07-29 08:23:03,965] INFO [SocketServer listenerType=ZK_BROKER, nodeId=0] Enabling request processing. (kafka.network.SocketServer)
[2023-07-29 08:23:03,973] INFO Awaiting socket connections on 0.0.0.0:9092. (kafka.network.DataPlaneAcceptor)
[2023-07-29 08:23:04,105] INFO Kafka version: 3.5.1 (org.apache.kafka.common.utils.AppInfoParser)
[2023-07-29 08:23:04,106] INFO Kafka commitId: 2c6fb6c54472e90a (org.apache.kafka.common.utils.AppInfoParser)
[2023-07-29 08:23:04,106] INFO Kafka startTimeMs: 1690590184097 (org.apache.kafka.common.utils.AppInfoParser)
[2023-07-29 08:23:04,118] INFO [KafkaServer id=0] started (kafka.server.KafkaServer)
[2023-07-29 08:23:04,172] INFO [zk-broker-0-to-controller-forwarding-channel-manager]: Recorded new controller, from now on will use node ubuntu2203:9092 (id: 0 rack: null) (kafka.server.BrokerToControllerRequestThread)
[2023-07-29 08:23:04,217] INFO [zk-broker-0-to-controller-alter-partition-channel-manager]: Recorded new controller, from now on will use node ubuntu2203:9092 (id: 0 rack: null) (kafka.server.BrokerToControllerRequestThread)

现在,Kafka已成功安装并在本地运行。

注意:默认情况下,Kafka会使用本地文件系统作为消息存储和日志存储。如果你希望修改配置,请编辑config/server.properties文件进行相应的更改。

如果你需要创建主题(topic)、发送消息、消费消息等操作,请参考Kafka的官方文档进行相应的配置和使用。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/806071.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Docker容器基本操作之启动-停止-重启

一、安装启动RabbitMQ容器 此处以rabbitmq容器为例 前提&#xff1a;需要安装配置好docker(设置镜像源、配置阿里云加速)、开启docker&#xff0c;停止(stop)或者禁用(disable)手动解压缩安装的rabbitmq,以防与docker中安装的rabbitmq冲突。 //查看docker状态 systemctl stat…

android Glide加载gif动图和本地视频,Java

droid Glide加载gif动图和本地视频&#xff0c;Java //从手机存储本地加载视频 String filePath "/storage/emulated/0/Pictures/my_video.mp4"; Glide .with( context ).load( Uri.fromFile( new File( filePath ) ) ).into( imageView );//加载gif Glide .with(…

用群晖NAS搭建个人音乐库

安装教程 勾选启动NTP服务 1. 群晖安装Audio Station 2. filestation会生成一个music文件夹&#xff0c;把下载好的音乐丢进music即可&#xff08;音乐平台听不到的歌也顺带通过下载解决了&#xff09;这时候你就可以在audio station直接听歌了不过咱们大部分时候听歌是在手机…

恒运资本:深市半年报预告规定?

依据深圳证券交易所等法律法规和业务规范的要求&#xff0c;应当及时、公平、精确发表成绩预告、成绩快报、中报、年度报告等信息。涉及中长期成绩情况的&#xff0c;还应当发表未来发展计划、运营战略、面对的风险与应战以及处理措施等中长期内容。 半年报成绩预告发表规则&am…

【PGMPY】 1. DAG基础结构

pgmpy 贝叶斯网络的纯python实现&#xff0c; 用途&#xff1a; 结构学习、 参数估计、 近似&#xff08;基于采样&#xff09; 精确推理 因果推理 安装 pip install pgmpyconda install -c ankurankan pgmpyconda install -c ankurankan pgmpy文档 https://pgmpy.org/index…

C++多线程编程(包含c++20内容)

C多线程编程(包含c20内容) 文章目录 C多线程编程(包含c20内容)线程通过函数指针创建线程通过函数对象创建线程通过lambda创建线程通过成员函数创建线程线程本地存储取消线程自动join线程从线程获得结果 原子操作库原子操作原子智能指针原子引用使用原子类型等待原子变量 互斥互…

Java【Spring】项目创建、存储和获取 Bean 的基本方式

文章目录 前言一、创建 Spring 项目1, 创建 Maven 项目2, 添加 Spring 依赖3, 创建启动类 二、存储 Bean 的基本方式1, 创建 Bean2, 存储 Bean 三、获取 Bean 的基本方式1, 获取上下文对象2, 获取 Bean3, 使用 Bean 总结 前言 各位读者好, 我是小陈, 这是我的个人主页, 希望我的…

tinkerCAD案例:18. Glow Circuit Assembly 发光电路组件

tinkerCAD案例&#xff1a;18. Glow Circuit Assembly 发光电路组件 In this tutorial, we’ll walk through how to use the Glow circuit assembly. 在本教程中&#xff0c;我们将演练如何使用 Glow 电路程序集。 Using the Glow circuit assembly, you’ll build a pengui…

使用Jetpack Glance创建Android Widget

使用Jetpack Glance创建Android Widget Jetpack Glance发布&#xff0c;让我们使用Google提供的Jetpack Glance创建一个联系人列表小部件。 https://developer.android.com/jetpack/compose/glance 什么是Glance&#xff1f; Jetpack Glance是一个使用Kotlin API创建小型、轻…

APP流量变现逻辑,流量变现收益如何最大化?

开发者首先通过买量的方式将用户引入APP中&#xff1b;用户在使用APP过程中的行为&#xff0c;诸如与游戏关卡的互动等&#xff0c;则不断地产生流量&#xff1b;最后&#xff0c;流量将成为“商品”&#xff0c;被运输至Facebook Audience Network或Google AdMob等平台进行售卖…

cmd命令查看电脑端口

操作是window系统的 其他系统原理类似 但也是有细微差别的 操作 netstat -na //135只是一个举例 netstat -ano | findstr 135//查看被占用端口对应的PID asklist | findstr 135//查看是哪个进程或者程序占用了端口指令 在Windows上&#xff1a; 使用以下命令查找占用指定…

Docker创建tomcat容器实例后无法访问(HTTP状态 404 - 未找到)

天行健&#xff0c;君子以自强不息&#xff1b;地势坤&#xff0c;君子以厚德载物。 每个人都有惰性&#xff0c;但不断学习是好好生活的根本&#xff0c;共勉&#xff01; 文章均为学习整理笔记&#xff0c;分享记录为主&#xff0c;如有错误请指正&#xff0c;共同学习进步。…

python基础1——环境安装

文章目录 一、Windows安装二、Linux安装三、pycharm安装3.1 软件安装3.2 个性化设置3.3 基本使用3.3.1 定义变量3.3.2 查看数据类型3.3.3 运算符3.3.4 操作符3.3.5 转义符 一、Windows安装 1、下载软件安装包&#xff0c;官网 2、开始安装。 2.查看是否安装成功。 3.安装…

【从零开始学习JAVA | 第三十三篇】File类

目录 前言&#xff1a; File类&#xff1a; 构造方法&#xff1a; 常见成员方法&#xff1a; 总结&#xff1a; 前言&#xff1a; 本文我们将为大家介绍JAVA中一个比较使用的类&#xff1a;File类&#xff0c;他为我们提供了存储数据的功能&#xff0c;使得程序的数据不至…

Python(一)

要做到坚韧不拔&#xff0c;最要紧的是坚持到底。——陀思妥耶夫斯基 2023 6 14~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --根据你自己的操作系统下载对应的。 -- pyhton 文档 --交互方式 使用的工具 --如何启动工具 -- 交互式方式一般在数据分析中…

认识什么是架构

目录 ​编辑 一、架构是什么 1.1 系统与子系统 1.1.1 系统 1.1.1.1 关联 1.1.1.2 规则 1.1.1.3 能力 1.1.2 子系统 1.2 模块与组件 1.2.1 模块 1.2.2 组件 1.3 框架与架构 1.3.1 框架 1.3.2 架构 1.3.2.1 架构定义 1.3.2.2 架构组成 1.3.2.2.1 要素 1.3.2.2.2 结构 1.3.2…

YAML+PyYAML笔记 7 | PyYAML源码之yaml.compose_all(),yaml.load(),yaml.load_all()

7 | PyYAML源码之yaml.compose_all&#xff0c;yaml.load,yaml.load_all 1 yaml.compose_all()2 yaml.load()3 yaml.load_all() 1 yaml.compose_all() 源码&#xff1a; 作用&#xff1a;分析流中的所有YAML文档&#xff0c;并产生相应的表示树。解析&#xff1a; # -*- codi…

IDEA配置远程docker解释器及无编码提示/关联不到python依赖问题

文章目录 1. 修改docker默认配置以支持远程连接2. 配置docker远程解释器3 .IDE配置project SDK4. 本地代码与Linux目录映射5.运行配置 1. 修改docker默认配置以支持远程连接 vim /lib/systemd/system/docker.service,修改docker启动参数 #ExecStart/usr/bin/dockerd -H fd://…

后台管理系统中重定向业务功能的实现

实现 退出登录组件中获取到当前路由路径并且传递query参数给登录页面 // 组件内 const logout()>{// 获取当前路由路径const redirectroute.fullPathuseStore.logout(redirect) }// pinia/store仓库 async logout(redirect:string){... // 清空仓库业务router.push({name:…

机器人状态估计:robot_localization 功能包基本参数详解

机器人状态估计&#xff1a;robot_localization 功能包基本参数详解 前言功能包简介相关参数基本参数 前言 移动机器人的状态估计需要用到很多传感器&#xff0c;因为对单一的传感器来讲&#xff0c;都存在各自的优缺点&#xff0c;所以需要一种多传感器融合技术&#xff0c;将…