Linux安装kafka3.5.1

要在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的官方文档进行相应的配置和使用。

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【【51单片机的红外遥控】】

红外遥控&#xff0c;完全把控 红外遥控 利用红外光进行通信的设备&#xff0c;由红外LED将调制后的信号发出&#xff0c;再由专门的红外接收头进行解调输出 通信方式&#xff1a;单工 异步 红外LED波长&#xff1a;940nm 通信协议标准&#xff1a;NEC标准 用那种一体化红红外…

下级平台级联视频汇聚融合平台EasyCVR,层级显示不正确的原因排查

视频汇聚平台安防监控EasyCVR可拓展性强、视频能力灵活、部署轻快&#xff0c;可支持的主流标准协议有GB28181、RTSP/Onvif、RTMP等&#xff0c;以及厂家私有协议与SDK接入&#xff0c;包括海康Ehome、海大宇等设备的SDK等&#xff0c;能对外分发RTSP、RTMP、FLV、HLS、WebRTC等…

如何使用 After Effects 导出摄像机跟踪数据到 3ds Max

推荐&#xff1a; NSDT场景编辑器助你快速搭建可二次开发的3D应用场景 在本教程中&#xff0c;我将展示如何在After Effects中跟踪实景场景&#xff0c;然后将相机数据导出到3ds Max。 1. 项目设置 步骤 1 打开“后效”。 打开后效果 步骤 2 转到合成>新合成以创建新合…

Rust vs Go:常用语法对比(十二)

题图来自 Rust vs Go in 2023[1] 221. Remove all non-digits characters Create string t from string s, keeping only digit characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. 删除所有非数字字符 package mainimport ( "fmt" "regexp")func main() { s : hei…

运行时数据区

点击下方关注我&#xff0c;然后右上角点击...“设为星标”&#xff0c;就能第一时间收到更新推送啦~~~ 类文件被类装载器加载之后&#xff0c;类中的内容&#xff08;比如&#xff1a;变量、常量、方法、对象等&#xff09;这些数据需要存储起来&#xff0c;存储的位置就是在 …

RabbitMQ 教程 | 客户端开发向导

&#x1f468;&#x1f3fb;‍&#x1f4bb; 热爱摄影的程序员 &#x1f468;&#x1f3fb;‍&#x1f3a8; 喜欢编码的设计师 &#x1f9d5;&#x1f3fb; 擅长设计的剪辑师 &#x1f9d1;&#x1f3fb;‍&#x1f3eb; 一位高冷无情的编码爱好者 大家好&#xff0c;我是 DevO…

JMeter常用内置对象:vars、ctx、prev

在前文 Beanshell Sampler 与 Beanshell 断言 中&#xff0c;初步阐述了JMeter beanshell的使用&#xff0c;接下来归集整理了JMeter beanshell 中常用的内置对象及其使用。 注&#xff1a;示例使用JMeter版本为5.1 1. vars 如 API 文档 所言&#xff0c;这是定义变量的类&a…

【点云处理教程】04 Python 中的点云过滤

一、说明 这是我的“点云处理”教程的第 4 篇文章。“点云处理”教程对初学者友好&#xff0c;我们将在其中简单地介绍从数据准备到数据分割和分类的点云处理管道。 在本教程中&#xff0c;我们将学习如何使用 Open3D 在 python 中过滤点云以进行下采样和异常值去除。使用 Open…

Python将COCO格式实例分割数据集转换为YOLO格式实例分割数据集

Python将COCO格式实例分割数据集转换为YOLO格式实例分割数据集 前言相关介绍COCO格式实例分割数据集转换为YOLO格式实例分割数据集coco格式对应的json文件&#xff0c;以test.json为例格式转换代码&#xff0c;内容如下 前言 由于本人水平有限&#xff0c;难免出现错漏&#xf…

【JAVASE】什么是方法

⭐ 作者&#xff1a;小胡_不糊涂 &#x1f331; 作者主页&#xff1a;小胡_不糊涂的个人主页 &#x1f4c0; 收录专栏&#xff1a;浅谈Java &#x1f496; 持续更文&#xff0c;关注博主少走弯路&#xff0c;谢谢大家支持 &#x1f496; 方法 1. 方法概念及使用1.1 什么是方法1…

Vue『卡片拖拽式课程表』

Vue『卡片拖拽式课程表』 概述 在本篇技术博客中&#xff0c;我们将介绍一个使用Vue实现的『卡片拖拽式课程表』。这个课程表允许用户通过拖拽课程卡片来安排不同的课程在时间表上的位置。我们将逐步讲解代码实现&#xff0c;包括课程表的布局、拖拽功能的实现&#xff0c;以…

6G内存运行Llama2-Chinese-7B-chat模型

6G内存运行Llama2-Chinese-7B-chat模型 Llama2-Chinese中文社区 第一步&#xff1a; 从huggingface下载 Llama2-Chinese-7b-Chat-GGML模型放到本地的某一目录。 第二步&#xff1a; 执行python程序 git clone https://github.com/Rayrtfr/llama2-webui.gitcd llama2-web…

QtC++ 技术分析3 - IOStream

目录 iostreamscanf/printfiostream 整体架构流相关类流缓冲区 模板特化后整体结构文件流文件流对象创建常见文件流操作输出格式设定文件流状态 字符串流字符串流内部缓冲区字符串流使用 流缓冲区用户自定义 IO iostream scanf/printf 几种常见的输入输出流函数 scanf 从键盘…

操作系统4

文件管理 文件的逻辑结构 文件的目录 文件的物理结构 文件存储空间管理 文件的基本操作

【深度学习】以图搜索- 2021sota repVgg来抽取向量 + facebook的faiss的做特征检索, 从环境搭建到运行案例从0到1

文章目录 前言安装小试牛刀用repVgg抽取向量构建Faiss索引进行相似性搜索项目延伸总结 前言 Faiss的全称是Facebook AI Similarity Search。 这是一个开源库&#xff0c;针对高维空间中的海量数据&#xff0c;提供了高效且可靠的检索方法。 暴力检索耗时巨大&#xff0c;对于…

Mac下certificate verify failed: unable to get local issuer certificate

出现这个问题&#xff0c;可以安装证书 在finder中查找 Install Certificates.command找到后双击&#xff0c;或者使用其他终端打开 安装完即可

tcp三次握手python实现和结果

下载抓包工具 安装 使用1 使用2 结果 红色笔为想要发送的数据。 代码 from scapy.all import * import logginglogging.getLogger(scapy.runtime).setLevel(logging.ERROR)target_ip = 172.20.211.4 target_port = 80 data = GET / HTTP/1.0 \r\n\r\ndef start_tcp(target_…

Mac代码编辑器sublime text 4中文注册版下载

Sublime Text 4 for Mac简单实用功能强大&#xff0c;是程序员敲代码必备的代码编辑器&#xff0c;sublime text 4中文注册版支持多种编程语言&#xff0c;包括C、Java、Python、Ruby等&#xff0c;可以帮助程序员快速编写代码。Sublime Text的界面简洁、美观&#xff0c;支持多…

上传图片到腾讯云对象存储桶cos 【腾讯云对象存储桶】【cos】【el-upload】【vue3】【上传头像】【删除】

1、首先登录腾讯云官网控制台 进入对象存储页面 2、找到跨越访问CIRS设置 配置规则 点击添加规则 填写信息 3、书写代码 这里用VUE3书写 第一种用按钮出发事件形式 <template><div><input type"file" change"handleFileChange" /><…

【设计模式】详解观察者模式

文章目录 1、简介2、观察者模式简单实现抽象主题&#xff08;Subject&#xff09;具体主题&#xff08;ConcreteSubject&#xff09;抽象观察者&#xff08;Observer&#xff09;具体观察者&#xff08;ConcrereObserver&#xff09;测试&#xff1a; 观察者设计模式优缺点观察…