我正在寻找一个简单的Kafka+Zookeeper容器使用docker运行Kafka的帮助,有人可以帮助我吗?我面临着容器之间的连接问题,在这里我们有docker-compose.yml(这是非常简单的基于互联网教程)。
version: '3'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
broker:
image: confluentinc/cp-kafka:latest
container_name: broker
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
运行docker composite up -d后,在40秒内Kafka容器停止,这里是日志
Kafka -〉
===> User
uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
===> Configuring ...
===> Running preflight checks ...
===> Check if /var/lib/kafka/data is writable ...
===> Check if Zookeeper is healthy ...
[2023-01-24 12:26:06,818] INFO Client environment:zookeeper.version=3.6.3--6401e4ad2087061bc6b9f80dec2d69f2e3c8660a, built on 04/08/2021 16:35 GMT (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:host.name=0f59bcda5daf (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:java.version=11.0.17 (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:java.vendor=Azul Systems, Inc. (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:java.home=/usr/lib/jvm/zulu11-ca (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:java.class.path=/usr/share/java/cp-base-new/jolokia-jvm-1.7.1.jar:/usr/share/java/cp-base-new/jackson-core-2.13.4.jar:/usr/share/java/cp-base-new/lz4-java-1.8.0.jar:/usr/share/java/cp-base-new/slf4j-api-1.7.36.jar:/usr/share/java/cp-base-new/zstd-jni-1.5.2-1.jar:/usr/share/java/cp-base-new/jackson-annotations-2.13.4.jar:/usr/share/java/cp-base-new/audience-annotations-0.5.0.jar:/usr/share/java/cp-base-new/logredactor-1.0.10.jar:/usr/share/java/cp-base-new/disk-usage-agent-7.3.1.jar:/usr/share/java/cp-base-new/scala-java8-compat_2.13-1.0.2.jar:/usr/share/java/cp-base-new/jose4j-0.7.9.jar:/usr/share/java/cp-base-new/utility-belt-7.3.1.jar:/usr/share/java/cp-base-new/jopt-simple-5.0.4.jar:/usr/share/java/cp-base-new/jackson-module-scala_2.13-2.13.4.jar:/usr/share/java/cp-base-new/kafka-server-common-7.3.1-ccs.jar:/usr/share/java/cp-base-new/kafka-raft-7.3.1-ccs.jar:/usr/share/java/cp-base-new/scala-reflect-2.13.10.jar:/usr/share/java/cp-base-new/jackson-datatype-jdk8-2.13.4.jar:/usr/share/java/cp-base-new/scala-logging_2.13-3.9.4.jar:/usr/share/java/cp-base-new/scala-library-2.13.10.jar:/usr/share/java/cp-base-new/jackson-databind-2.13.4.2.jar:/usr/share/java/cp-base-new/jolokia-core-1.7.1.jar:/usr/share/java/cp-base-new/reload4j-1.2.19.jar:/usr/share/java/cp-base-new/kafka-metadata-7.3.1-ccs.jar:/usr/share/java/cp-base-new/argparse4j-0.7.0.jar:/usr/share/java/cp-base-new/minimal-json-0.9.5.jar:/usr/share/java/cp-base-new/metrics-core-4.1.12.1.jar:/usr/share/java/cp-base-new/gson-2.9.0.jar:/usr/share/java/cp-base-new/snappy-java-1.1.8.4.jar:/usr/share/java/cp-base-new/jackson-dataformat-csv-2.13.4.jar:/usr/share/java/cp-base-new/scala-collection-compat_2.13-2.6.0.jar:/usr/share/java/cp-base-new/kafka-storage-7.3.1-ccs.jar:/usr/share/java/cp-base-new/kafka_2.13-7.3.1-ccs.jar:/usr/share/java/cp-base-new/jackson-dataformat-yaml-2.13.4.jar:/usr/share/java/cp-base-new/slf4j-reload4j-1.7.36.jar:/usr/share/java/cp-base-new/metrics-core-2.2.0.jar:/usr/share/java/cp-base-new/json-simple-1.1.1.jar:/usr/share/java/cp-base-new/re2j-1.6.jar:/usr/share/java/cp-base-new/zookeeper-jute-3.6.3.jar:/usr/share/java/cp-base-new/kafka-clients-7.3.1-ccs.jar:/usr/share/java/cp-base-new/logredactor-metrics-1.0.10.jar:/usr/share/java/cp-base-new/snakeyaml-1.32.jar:/usr/share/java/cp-base-new/zookeeper-3.6.3.jar:/usr/share/java/cp-base-new/commons-cli-1.4.jar:/usr/share/java/cp-base-new/paranamer-2.8.jar:/usr/share/java/cp-base-new/jmx_prometheus_javaagent-0.17.2.jar:/usr/share/java/cp-base-new/common-utils-7.3.1.jar:/usr/share/java/cp-base-new/kafka-storage-api-7.3.1-ccs.jar (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:os.version=5.10.0-20-cloud-amd64 (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:user.name=appuser (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:user.home=/home/appuser (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:user.dir=/home/appuser (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:os.memory.free=242MB (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:os.memory.max=4002MB (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,819] INFO Client environment:os.memory.total=252MB (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,824] INFO Initiating client connection, connectString=zookeeper:2181 sessionTimeout=40000 watcher=io.confluent.admin.utils.ZookeeperConnectionWatcher@516be40f (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:06,829] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2023-01-24 12:26:06,837] INFO jute.maxbuffer value is 1048575 Bytes (org.apache.zookeeper.ClientCnxnSocket)
[2023-01-24 12:26:06,845] INFO zookeeper.request.timeout value is 0. feature enabled=false (org.apache.zookeeper.ClientCnxn)
[2023-01-24 12:26:06,875] INFO Opening socket connection to server zookeeper/172.20.0.2:2181. (org.apache.zookeeper.ClientCnxn)
[2023-01-24 12:26:06,876] INFO SASL config status: Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2023-01-24 12:26:46,851] ERROR Timed out waiting for connection to Zookeeper server [zookeeper:2181]. (io.confluent.admin.utils.ClusterStatus)
[2023-01-24 12:26:46,864] WARN Client session timed out, have not heard from server in 40000ms for session id 0x0 (org.apache.zookeeper.ClientCnxn)
[2023-01-24 12:26:46,865] WARN An exception was thrown while closing send thread for session 0x0. (org.apache.zookeeper.ClientCnxn)
org.apache.zookeeper.ClientCnxn$SessionTimeoutException: Client session timed out, have not heard from server in 40000ms for session id 0x0
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1258)
[2023-01-24 12:26:46,974] INFO Session: 0x0 closed (org.apache.zookeeper.ZooKeeper)
[2023-01-24 12:26:46,976] INFO EventThread shut down for session: 0x0 (org.apache.zookeeper.ClientCnxn)
Using log4j config /etc/kafka/log4j.properties
Zookeeper-〉
===> User
uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
===> Configuring ...
===> Running preflight checks ...
===> Check if /var/lib/zookeeper/data is writable ...
===> Check if /var/lib/zookeeper/log is writable ...
===> Launching ...
===> Launching zookeeper ...
[2023-01-24 12:26:05,785] INFO Reading configuration from: /etc/kafka/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-01-24 12:26:05,795] INFO clientPortAddress is 0.0.0.0:2181 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-01-24 12:26:05,795] INFO secureClientPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-01-24 12:26:05,795] INFO observerMasterPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-01-24 12:26:05,795] INFO metricsProvider.className is org.apache.zookeeper.metrics.impl.DefaultMetricsProvider (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-01-24 12:26:05,797] INFO autopurge.snapRetainCount set to 3 (org.apache.zookeeper.server.DatadirCleanupManager)
[2023-01-24 12:26:05,797] INFO autopurge.purgeInterval set to 0 (org.apache.zookeeper.server.DatadirCleanupManager)
[2023-01-24 12:26:05,797] INFO Purge task is not scheduled. (org.apache.zookeeper.server.DatadirCleanupManager)
[2023-01-24 12:26:05,797] WARN Either no config or no quorum defined in config, running in standalone mode (org.apache.zookeeper.server.quorum.QuorumPeerMain)
[2023-01-24 12:26:05,799] INFO Log4j 1.2 jmx support not found; jmx disabled. (org.apache.zookeeper.jmx.ManagedUtil)
[2023-01-24 12:26:05,800] INFO Reading configuration from: /etc/kafka/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-01-24 12:26:05,800] INFO clientPortAddress is 0.0.0.0:2181 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-01-24 12:26:05,800] INFO secureClientPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-01-24 12:26:05,800] INFO observerMasterPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-01-24 12:26:05,800] INFO metricsProvider.className is org.apache.zookeeper.metrics.impl.DefaultMetricsProvider (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2023-01-24 12:26:05,801] INFO Starting server (org.apache.zookeeper.server.ZooKeeperServerMain)
[2023-01-24 12:26:05,815] INFO ServerMetrics initialized with provider org.apache.zookeeper.metrics.impl.DefaultMetricsProvider@41c2284a (org.apache.zookeeper.server.ServerMetrics)
[2023-01-24 12:26:05,819] INFO zookeeper.snapshot.trust.empty : false (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2023-01-24 12:26:05,832] INFO (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,832] INFO ______ _ (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,832] INFO |___ / | | (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,832] INFO / / ___ ___ | | __ ___ ___ _ __ ___ _ __ (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,832] INFO / / / _ \ / _ \ | |/ / / _ \ / _ \ | '_ \ / _ \ | '__| (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,832] INFO / /__ | (_) | | (_) | | < | __/ | __/ | |_) | | __/ | | (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,832] INFO /_____| \___/ \___/ |_|\_\ \___| \___| | .__/ \___| |_| (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,832] INFO | | (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,832] INFO |_| (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,833] INFO (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,835] INFO Server environment:zookeeper.version=3.6.3--6401e4ad2087061bc6b9f80dec2d69f2e3c8660a, built on 04/08/2021 16:35 GMT (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,835] INFO Server environment:host.name=9ab05af3bca1 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,835] INFO Server environment:java.version=11.0.17 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,835] INFO Server environment:java.vendor=Azul Systems, Inc. (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,835] INFO Server environment:java.home=/usr/lib/jvm/zulu11-ca (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,835] INFO Server environment:java.class.path=/usr/bin/../share/java/kafka/jetty-continuation-9.4.48.v20220622.jar:/usr/bin/../share/java/kafka/jline-3.21.0.jar:/usr/bin/../share/java/kafka/jakarta.inject-2.6.1.jar:/usr/bin/../share/java/kafka/hk2-utils-2.6.1.jar:/usr/bin/../share/java/kafka/jakarta.activation-api-1.2.2.jar:/usr/bin/../share/java/kafka/netty-codec-4.1.79.Final.jar:/usr/bin/../share/java/kafka/javax.servlet-api-3.1.0.jar:/usr/bin/../share/java/kafka/javassist-3.27.0-GA.jar:/usr/bin/../share/java/kafka/jersey-server-2.34.jar:/usr/bin/../share/java/kafka/jetty-util-9.4.48.v20220622.jar:/usr/bin/../share/java/kafka/jackson-core-2.13.4.jar:/usr/bin/../share/java/kafka/plexus-utils-3.3.0.jar:/usr/bin/../share/java/kafka/lz4-java-1.8.0.jar:/usr/bin/../share/java/kafka/slf4j-api-1.7.36.jar:/usr/bin/../share/java/kafka/zstd-jni-1.5.2-1.jar:/usr/bin/../share/java/kafka/jetty-http-9.4.48.v20220622.jar:/usr/bin/../share/java/kafka/kafka-tools-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/audience-annotations-0.5.0.jar:/usr/bin/../share/java/kafka/trogdor-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/jersey-container-servlet-core-2.34.jar:/usr/bin/../share/java/kafka/jackson-jaxrs-base-2.13.4.jar:/usr/bin/../share/java/kafka/jetty-util-ajax-9.4.48.v20220622.jar:/usr/bin/../share/java/kafka/netty-common-4.1.79.Final.jar:/usr/bin/../share/java/kafka/jetty-client-9.4.48.v20220622.jar:/usr/bin/../share/java/kafka/connect-api-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/kafka-streams-examples-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/scala-java8-compat_2.13-1.0.2.jar:/usr/bin/../share/java/kafka/jose4j-0.7.9.jar:/usr/bin/../share/java/kafka/jakarta.validation-api-2.0.2.jar:/usr/bin/../share/java/kafka/maven-artifact-3.8.4.jar:/usr/bin/../share/java/kafka/connect-transforms-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/connect-basic-auth-extension-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/jetty-server-9.4.48.v20220622.jar:/usr/bin/../share/java/kafka/jopt-simple-5.0.4.jar:/usr/bin/../share/java/kafka/connect-mirror-client-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/commons-lang3-3.8.1.jar:/usr/bin/../share/java/kafka/jackson-module-scala_2.13-2.13.4.jar:/usr/bin/../share/java/kafka/jetty-security-9.4.48.v20220622.jar:/usr/bin/../share/java/kafka/javax.ws.rs-api-2.1.1.jar:/usr/bin/../share/java/kafka/jaxb-api-2.3.0.jar:/usr/bin/../share/java/kafka/netty-transport-native-epoll-4.1.79.Final.jar:/usr/bin/../share/java/kafka/kafka-streams-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/kafka-server-common-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/jersey-hk2-2.34.jar:/usr/bin/../share/java/kafka/aopalliance-repackaged-2.6.1.jar:/usr/bin/../share/java/kafka/kafka-raft-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/scala-reflect-2.13.10.jar:/usr/bin/../share/java/kafka/jackson-annotations-2.13.3.jar:/usr/bin/../share/java/kafka/jackson-datatype-jdk8-2.13.4.jar:/usr/bin/../share/java/kafka/jackson-module-jaxb-annotations-2.13.4.jar:/usr/bin/../share/java/kafka/scala-logging_2.13-3.9.4.jar:/usr/bin/../share/java/kafka/scala-library-2.13.10.jar:/usr/bin/../share/java/kafka/jackson-databind-2.13.4.2.jar:/usr/bin/../share/java/kafka/jakarta.ws.rs-api-2.1.6.jar:/usr/bin/../share/java/kafka/kafka-streams-scala_2.13-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/hk2-api-2.6.1.jar:/usr/bin/../share/java/kafka/reload4j-1.2.19.jar:/usr/bin/../share/java/kafka/kafka-metadata-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/osgi-resource-locator-1.0.3.jar:/usr/bin/../share/java/kafka/connect-runtime-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/connect-mirror-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/jersey-common-2.34.jar:/usr/bin/../share/java/kafka/netty-buffer-4.1.79.Final.jar:/usr/bin/../share/java/kafka/jersey-client-2.34.jar:/usr/bin/../share/java/kafka/netty-resolver-4.1.79.Final.jar:/usr/bin/../share/java/kafka/argparse4j-0.7.0.jar:/usr/bin/../share/java/kafka/jakarta.xml.bind-api-2.3.3.jar:/usr/bin/../share/java/kafka/activation-1.1.1.jar:/usr/bin/../share/java/kafka/metrics-core-4.1.12.1.jar:/usr/bin/../share/java/kafka/snappy-java-1.1.8.4.jar:/usr/bin/../share/java/kafka/kafka-log4j-appender-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/kafka-shell-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/jackson-dataformat-csv-2.13.4.jar:/usr/bin/../share/java/kafka/jackson-jaxrs-json-provider-2.13.4.jar:/usr/bin/../share/java/kafka/scala-collection-compat_2.13-2.6.0.jar:/usr/bin/../share/java/kafka/hk2-locator-2.6.1.jar:/usr/bin/../share/java/kafka/kafka-storage-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/jetty-io-9.4.48.v20220622.jar:/usr/bin/../share/java/kafka/netty-handler-4.1.79.Final.jar:/usr/bin/../share/java/kafka/reflections-0.9.12.jar:/usr/bin/../share/java/kafka/kafka_2.13-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/slf4j-reload4j-1.7.36.jar:/usr/bin/../share/java/kafka/commons-lang3-3.12.0.jar:/usr/bin/../share/java/kafka/netty-transport-classes-epoll-4.1.79.Final.jar:/usr/bin/../share/java/kafka/metrics-core-2.2.0.jar:/usr/bin/../share/java/kafka/zookeeper-jute-3.6.3.jar:/usr/bin/../share/java/kafka/jakarta.annotation-api-1.3.5.jar:/usr/bin/../share/java/kafka/kafka-clients-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/netty-transport-native-unix-common-4.1.79.Final.jar:/usr/bin/../share/java/kafka/jetty-servlets-9.4.48.v20220622.jar:/usr/bin/../share/java/kafka/netty-transport-4.1.79.Final.jar:/usr/bin/../share/java/kafka/jersey-container-servlet-2.34.jar:/usr/bin/../share/java/kafka/jetty-servlet-9.4.48.v20220622.jar:/usr/bin/../share/java/kafka/swagger-annotations-2.2.0.jar:/usr/bin/../share/java/kafka/zookeeper-3.6.3.jar:/usr/bin/../share/java/kafka/commons-cli-1.4.jar:/usr/bin/../share/java/kafka/rocksdbjni-7.1.2.jar:/usr/bin/../share/java/kafka/paranamer-2.8.jar:/usr/bin/../share/java/kafka/connect-json-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/kafka.jar:/usr/bin/../share/java/kafka/kafka-storage-api-7.3.1-ccs.jar:/usr/bin/../share/java/kafka/kafka-streams-test-utils-7.3.1-ccs.jar:/usr/bin/../share/java/confluent-telemetry/* (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,835] INFO Server environment:java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,835] INFO Server environment:java.io.tmpdir=/tmp (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,835] INFO Server environment:java.compiler=<NA> (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,835] INFO Server environment:os.name=Linux (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO Server environment:os.arch=amd64 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO Server environment:os.version=5.10.0-20-cloud-amd64 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO Server environment:user.name=appuser (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO Server environment:user.home=/home/appuser (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO Server environment:user.dir=/home/appuser (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO Server environment:os.memory.free=491MB (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO Server environment:os.memory.max=512MB (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO Server environment:os.memory.total=512MB (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO zookeeper.enableEagerACLCheck = false (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO zookeeper.digest.enabled = true (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO zookeeper.closeSessionTxn.enabled = true (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO zookeeper.flushDelay=0 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO zookeeper.maxWriteQueuePollTime=0 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,836] INFO zookeeper.maxBatchSize=1000 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,837] INFO zookeeper.intBufferStartingSizeBytes = 1024 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,838] INFO Weighed connection throttling is disabled (org.apache.zookeeper.server.BlueThrottle)
[2023-01-24 12:26:05,839] INFO minSessionTimeout set to 4000 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,839] INFO maxSessionTimeout set to 40000 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,841] INFO Response cache size is initialized with value 400. (org.apache.zookeeper.server.ResponseCache)
[2023-01-24 12:26:05,841] INFO Response cache size is initialized with value 400. (org.apache.zookeeper.server.ResponseCache)
[2023-01-24 12:26:05,842] INFO zookeeper.pathStats.slotCapacity = 60 (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-01-24 12:26:05,842] INFO zookeeper.pathStats.slotDuration = 15 (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-01-24 12:26:05,842] INFO zookeeper.pathStats.maxDepth = 6 (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-01-24 12:26:05,842] INFO zookeeper.pathStats.initialDelay = 5 (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-01-24 12:26:05,842] INFO zookeeper.pathStats.delay = 5 (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-01-24 12:26:05,842] INFO zookeeper.pathStats.enabled = false (org.apache.zookeeper.server.util.RequestPathMetricsCollector)
[2023-01-24 12:26:05,845] INFO The max bytes for all large requests are set to 104857600 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,845] INFO The large request threshold is set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,846] INFO Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 40000 clientPortListenBacklog -1 datadir /var/lib/zookeeper/log/version-2 snapdir /var/lib/zookeeper/data/version-2 (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:05,875] INFO Logging initialized @724ms to org.eclipse.jetty.util.log.Slf4jLog (org.eclipse.jetty.util.log)
[2023-01-24 12:26:06,010] WARN o.e.j.s.ServletContextHandler@47caedad{/,null,STOPPED} contextPath ends with /* (org.eclipse.jetty.server.handler.ContextHandler)
[2023-01-24 12:26:06,011] WARN Empty contextPath (org.eclipse.jetty.server.handler.ContextHandler)
[2023-01-24 12:26:06,041] INFO jetty-9.4.48.v20220622; built: 2022-06-21T20:42:25.880Z; git: 6b67c5719d1f4371b33655ff2d047d24e171e49a; jvm 11.0.17+8-LTS (org.eclipse.jetty.server.Server)
[2023-01-24 12:26:06,083] INFO DefaultSessionIdManager workerName=node0 (org.eclipse.jetty.server.session)
[2023-01-24 12:26:06,083] INFO No SessionScavenger set, using defaults (org.eclipse.jetty.server.session)
[2023-01-24 12:26:06,086] INFO node0 Scavenging every 660000ms (org.eclipse.jetty.server.session)
[2023-01-24 12:26:06,091] WARN ServletContext@o.e.j.s.ServletContextHandler@47caedad{/,null,STARTING} has uncovered http methods for path: /* (org.eclipse.jetty.security.SecurityHandler)
[2023-01-24 12:26:06,104] INFO Started o.e.j.s.ServletContextHandler@47caedad{/,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler)
[2023-01-24 12:26:06,124] INFO Started ServerConnector@14028087{HTTP/1.1, (http/1.1)}{0.0.0.0:8080} (org.eclipse.jetty.server.AbstractConnector)
[2023-01-24 12:26:06,124] INFO Started @973ms (org.eclipse.jetty.server.Server)
[2023-01-24 12:26:06,124] INFO Started AdminServer on address 0.0.0.0, port 8080 and command URL /commands (org.apache.zookeeper.server.admin.JettyAdminServer)
[2023-01-24 12:26:06,134] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory)
[2023-01-24 12:26:06,136] WARN maxCnxns is not configured, using default value 0. (org.apache.zookeeper.server.ServerCnxnFactory)
[2023-01-24 12:26:06,138] INFO Configuring NIO connection handler with 10s sessionless connection timeout, 2 selector thread(s), 16 worker threads, and 64 kB direct buffers. (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2023-01-24 12:26:06,141] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2023-01-24 12:26:06,163] INFO Using org.apache.zookeeper.server.watch.WatchManager as watch manager (org.apache.zookeeper.server.watch.WatchManagerFactory)
[2023-01-24 12:26:06,164] INFO Using org.apache.zookeeper.server.watch.WatchManager as watch manager (org.apache.zookeeper.server.watch.WatchManagerFactory)
[2023-01-24 12:26:06,166] INFO zookeeper.snapshotSizeFactor = 0.33 (org.apache.zookeeper.server.ZKDatabase)
[2023-01-24 12:26:06,166] INFO zookeeper.commitLogCount=500 (org.apache.zookeeper.server.ZKDatabase)
[2023-01-24 12:26:06,176] INFO zookeeper.snapshot.compression.method = CHECKED (org.apache.zookeeper.server.persistence.SnapStream)
[2023-01-24 12:26:06,177] INFO Snapshotting: 0x0 to /var/lib/zookeeper/data/version-2/snapshot.0 (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2023-01-24 12:26:06,183] INFO Snapshot loaded in 17 ms, highest zxid is 0x0, digest is 1371985504 (org.apache.zookeeper.server.ZKDatabase)
[2023-01-24 12:26:06,184] INFO Snapshotting: 0x0 to /var/lib/zookeeper/data/version-2/snapshot.0 (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2023-01-24 12:26:06,185] INFO Snapshot taken in 1 ms (org.apache.zookeeper.server.ZooKeeperServer)
[2023-01-24 12:26:06,201] INFO PrepRequestProcessor (sid:0) started, reconfigEnabled=false (org.apache.zookeeper.server.PrepRequestProcessor)
[2023-01-24 12:26:06,202] INFO zookeeper.request_throttler.shutdownTimeout = 10000 (org.apache.zookeeper.server.RequestThrottler)
[2023-01-24 12:26:06,226] INFO Using checkIntervalMs=60000 maxPerMinute=10000 maxNeverUsedIntervalMs=0 (org.apache.zookeeper.server.ContainerManager)
[2023-01-24 12:26:06,227] INFO ZooKeeper audit is disabled. (org.apache.zookeeper.audit.ZKAuditProvider)
我试着用docker restart重新启动Kafka,但没有成功。我已经试过用不同的docker-composition几次来删除容器+图像并重新创建,但还是遇到了同样的问题。我试着清除docker并重新安装,但我还是遇到了同样的问题,我用的是Debian。有人能帮我吗?我会非常感激的
1条答案
按热度按时间cu6pst1q1#
@filipe_ribeiro你能试试这个吗:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:29092
它是
29092
,你的是9092