我正在运行ansible在一台服务器上安装Kafka。(在Dev env上,独立设置)但我的剧本在列出Kafka主题的任务列表时失败了。下面是日志。
-- Logs begin at Thu 2020-11-19 01:05:17 IST. --
Nov 19 22:33:08 <HOSTNAME> zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:118)
Nov 19 22:33:08 <HOSTNAME> zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:122)
Nov 19 22:33:08 <HOSTNAME> zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:89)
Nov 19 22:33:08 <HOSTNAME> zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:55)
Nov 19 22:33:08 <HOSTNAME> zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:119)
Nov 19 22:33:08 <HOSTNAME> zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:81)
Nov 19 22:33:09 <HOSTNAME> systemd[1]: zookeeper.service: main process exited, code=exited, status=1/FAILURE
Nov 19 22:33:09 <HOSTNAME> systemd[1]: zookeeper.service: control process exited, code=exited status=1
Nov 19 22:33:09 <HOSTNAME> systemd[1]: Unit zookeeper.service entered failed state.
Nov 19 22:33:09 <HOSTNAME> systemd[1]: zookeeper.service failed.
journalctl -fu kafka.service
-- Logs begin at Thu 2020-11-19 01:05:17 IST. --
Nov 19 22:23:30 <HOSTNAME> systemd[1]: Started kafka.service.
Nov 19 22:23:40 <HOSTNAME> systemd[1]: kafka.service: main process exited, code=exited, status=1/FAILURE
Nov 19 22:23:40 <HOSTNAME> systemd[1]: kafka.service: control process exited, code=exited status=1
Nov 19 22:23:40 <HOSTNAME> systemd[1]: Unit kafka.service entered failed state.
Nov 19 22:23:40 <HOSTNAME> systemd[1]: kafka.service failed.
Nov 19 22:33:08 <HOSTNAME> systemd[1]: Started kafka.service.
Nov 19 22:33:17 <HOSTNAME> systemd[1]: kafka.service: main process exited, code=exited, status=1/FAILURE
Nov 19 22:33:17 <HOSTNAME> systemd[1]: kafka.service: control process exited, code=exited status=1
Nov 19 22:33:17 <HOSTNAME> systemd[1]: Unit kafka.service entered failed state.
Nov 19 22:33:17 <HOSTNAME> systemd[1]: kafka.service failed.
/opt/kafka/kafka_2.12-2.2.2/bin/kafka-topics.sh --zookeeper <ip of localhost>:5181 --list
systemctl status kafka.service -l
● kafka.service
Loaded: loaded (/etc/systemd/system/kafka.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-11-19 22:33:17 IST; 5min ago
Process: 5448 ExecStop=/opt/kafka/kafka_2.12-2.2.2/bin/kafka-server-stop.sh (code=exited, status=1/FAILURE)
Process: 4742 ExecStart=/bin/sh -c /opt/kafka/kafka_2.12-2.2.2/bin/kafka-server-start.sh /opt/kafka/kafka_2.12-2.2.2/config/server.properties > /opt/kafka/kafka_2.12-2.2.2/kafka.log 2>&1 (code=exited, status=1/FAILURE)
Main PID: 4742 (code=exited, status=1/FAILURE)
Nov 19 22:33:08 <HOSTNAME> systemd[1]: Started kafka.service.
Nov 19 22:33:17 <HOSTNAME> systemd[1]: kafka.service: main process exited, code=exited, status=1/FAILURE
Nov 19 22:33:17 <HOSTNAME> systemd[1]: kafka.service: control process exited, code=exited status=1
Nov 19 22:33:17 <HOSTNAME> systemd[1]: Unit kafka.service entered failed state.
Nov 19 22:33:17 <HOSTNAME> systemd[1]: kafka.service failed.
systemctl status zookeeper.service -l
● zookeeper.service
Loaded: loaded (/etc/systemd/system/zookeeper.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-11-19 22:33:09 IST; 5min ago
Process: 5281 ExecStop=/opt/kafka/kafka_2.12-2.2.2/bin/zookeeper-server-stop.sh (code=exited, status=1/FAILURE)
Process: 4448 ExecStart=/opt/kafka/kafka_2.12-2.2.2/bin/zookeeper-server-start.sh /opt/kafka/kafka_2.12-2.2.2/config/zookeeper.properties (code=exited, status=1/FAILURE)
Main PID: 4448 (code=exited, status=1/FAILURE)
Nov 19 22:33:08 zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:118)
Nov 19 22:33:08 zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:122)
Nov 19 22:33:08 zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:89)
Nov 19 22:33:08 zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:55)
Nov 19 22:33:08 zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:119)
Nov 19 22:33:08 zookeeper-server-start.sh[4448]: at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:81)
Nov 19 22:33:09 systemd[1]: zookeeper.service: main process exited, code=exited, status=1/FAILURE
Nov 19 22:33:09 systemd[1]: zookeeper.service: control process exited, code=exited status=1
Nov 19 22:33:09 systemd[1]: Unit zookeeper.service entered failed state.
Nov 19 22:33:09 systemd[1]: zookeeper.service failed.
[2020-11-19 22:33:09,853] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2020-11-19 22:33:10,584] INFO starting (kafka.server.KafkaServer)
[2020-11-19 22:33:10,585] INFO Connecting to zookeeper on <ip of localhost>:5181 (kafka.server.KafkaServer)
[2020-11-19 22:33:10,640] INFO [ZooKeeperClient] Initializing a new session to <ip of localhost>:5181. (kafka.zookeeper.ZooKeeperClient)
[2020-11-19 22:33:10,646] INFO Client environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,646] INFO Client environment:host.name=<FQDN> (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,646] INFO Client environment:java.version=1.8.0_221 (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,646] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,646] INFO Client environment:java.home=/opt/jre1.8.0_221 (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,646] INFO Client environment:java.class.path=/opt/kafka/kafka_2.12-2.2.2/bin/../libs/activation-1.1.1.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/aopalliance-repackaged-2.5.0-b42.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/argparse4j-0.7.0.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/audience-annotations-0.5.0.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/commons-lang3-3.8.1.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/connect-api-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/connect-basic-auth-extension-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/connect-file-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/connect-json-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/connect-runtime-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/connect-transforms-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/guava-20.0.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/hk2-api-2.5.0-b42.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/hk2-locator-2.5.0-b42.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/hk2-utils-2.5.0-b42.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jackson-annotations-1.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.inject-1.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.inject-2.5.0-b42.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.servlet-api-3.1.0.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.ws.rs-api-2.1.1.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.ws.rs-api-2.1.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jaxb-api-2.3.0.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-client-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-common-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-container-servlet-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-container-servlet-core-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-hk2-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-media-jaxb-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-server-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jetty-client-9.4.14.v20181114.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jetty-continuation-9.4.14.v20181114.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/kafka-streams-examples-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/kafka-streams-scala_2.12-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/kafka-streams-test-utils-2.2.2.jar:/opt/kafka/kafka_2.12-2-2.2.2/bin/../libs/validation-api-1.1.0.Final.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/zkclient-0.11.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/zookeeper-3.4.13.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/zstd-jni-1.3.8-1.jar (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,646] INFO Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,646] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,647] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,647] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,647] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,647] INFO Client environment:os.version=3.10.0-1062.el7.x86_64 (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,647] INFO Client environment:user.name=kafka (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,647] INFO Client environment:user.home=/home/kafka (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,647] INFO Client environment:user.dir=/ (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,648] INFO Initiating client connection, connectString=<ip of localhost>:5181 sessionTimeout=6000 watcher=kafka.zookeeper.ZooKeeperClient$ZooKeeperClientWatcher$@3c419631 (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:10,667] INFO Opening socket connection to server <FQDN>/<ip of localhost>:5181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:10,673] INFO Socket error occurred: <FQDN>/<ip of localhost>:5181: Connection refused (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:10,676] INFO [ZooKeeperClient] Waiting until connected. (kafka.zookeeper.ZooKeeperClient)
[2020-11-19 22:33:11,796] INFO Opening socket connection to server <FQDN>/<ip of localhost>:5181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:11,797] INFO Socket error occurred: <FQDN>/<ip of localhost>:5181: Connection refused (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:12,897] INFO Opening socket connection to server <FQDN>/<ip of localhost>:5181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:12,898] INFO Socket error occurred: <FQDN>/<ip of localhost>:5181: Connection refused (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:13,999] INFO Opening socket connection to server <FQDN>/<ip of localhost>:5181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:13,999] INFO Socket error occurred: <FQDN>/<ip of localhost>:5181: Connection refused (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:15,101] INFO Opening socket connection to server <FQDN>/<ip of localhost>:5181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:15,101] INFO Socket error occurred: <FQDN>/<ip of localhost>:5181: Connection refused (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:16,202] INFO Opening socket connection to server <FQDN>/<ip of localhost>:5181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:16,202] INFO Socket error occurred: <FQDN>/<ip of localhost>:5181: Connection refused (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:16,678] INFO [ZooKeeperClient] Closing. (kafka.zookeeper.ZooKeeperClient)
[2020-11-19 22:33:17,303] INFO Opening socket connection to server <FQDN>/<ip of localhost>:5181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:17,406] INFO Session: 0x0 closed (org.apache.zookeeper.ZooKeeper)
[2020-11-19 22:33:17,407] INFO EventThread shut down for session: 0x0 (org.apache.zookeeper.ClientCnxn)
[2020-11-19 22:33:17,409] INFO [ZooKeeperClient] Closed. (kafka.zookeeper.ZooKeeperClient)
[2020-11-19 22:33:17,412] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected$3(ZooKeeperClient.scala:242)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:251)
at kafka.zookeeper.ZooKeeperClient.waitUntilConnected(ZooKeeperClient.scala:238)
at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:96)
at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1825)
at kafka.server.KafkaServer.createZkClient$1(KafkaServer.scala:361)
at kafka.server.KafkaServer.initZkClient(KafkaServer.scala:385)
at kafka.server.KafkaServer.startup(KafkaServer.scala:205)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
at kafka.Kafka$.main(Kafka.scala:75)
at kafka.Kafka.main(Kafka.scala)
[2020-11-19 22:33:17,415] INFO shutting down (kafka.server.KafkaServer)
[2020-11-19 22:33:17,422] INFO shut down completed (kafka.server.KafkaServer)
[2020-11-19 22:33:17,422] ERROR Exiting Kafka. (kafka.server.KafkaServerStartable)
[2020-11-19 22:33:17,426] INFO shutting down (kafka.server.KafkaServer)
Nov 19 18:16:07 <HOSTNAME> ansible-command: Invoked with creates=None executable=None _uses_shell=False strip_empty_ends=True _raw_params=/opt/kafka/kafka_
2.12-2.2.2/bin/kafka-topics.sh --zookeeper <FQDN>:5181 --list removes=None argv=None warn=True chdir=None stdin_add_newline=True stdin=None
Nov 19 18:16:07 <HOSTNAME> ansible-command: Invoked with creates=None executable=None _uses_shell=False strip_empty_ends=True _raw_params=/opt/kafka/kafka_
2.12-2.2.2/bin/kafka-topics.sh --zookeeper <FQDN>:5181 --list removes=None argv=None warn=True chdir=None stdin_add_newline=True stdin=None
Nov 19 18:16:07 <HOSTNAME> ansible-command: Invoked with creates=None executable=None _uses_shell=False strip_empty_ends=True _raw_params=/opt/kafka/kafka_
2.12-2.2.2/bin/kafka-topics.sh --zookeeper <FQDN>:5181 --list removes=None argv=None warn=True chdir=None stdin_add_newline=True stdin=None
Nov 19 18:16:07 <HOSTNAME> heartbeat: 2020-11-19T18:16:07.941+0530#011INFO#011kafka/log.go:53#011client/metadata fetching metadata for [heartbeat] from bro
ker <ip of localhost>:3997
Nov 19 18:16:07 <HOSTNAME> heartbeat: 2020-11-19T18:16:07.942+0530#011INFO#011kafka/log.go:53#011Failed to connect to broker <ip of localhost>:3997: dial tcp
<ip of localhost>:3997: connect: connection refused
Nov 19 18:16:07 <HOSTNAME> heartbeat: 2020-11-19T18:16:07.942+0530#011INFO#011kafka/log.go:53#011client/metadata got error from broker -1 while fetching me
tadata: dial tcp <ip of localhost>:3997: connect: connection refused
Nov 19 18:16:07 <HOSTNAME> heartbeat: 2020-11-19T18:16:07.942+0530#011INFO#011kafka/log.go:53#011kafka message: client/metadata no available broker to send
metadata request to
Nov 19 18:16:07 <HOSTNAME> heartbeat: 2020-11-19T18:16:07.942+0530#011INFO#011kafka/log.go:53#011client/brokers resurrecting 1 dead seed brokers
Nov 19 18:16:07 <HOSTNAME> heartbeat: 2020-11-19T18:16:07.942+0530#011INFO#011[publisher]#011pipeline/retry.go:155#011Drop batch
Nov 19 18:16:07 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:07,962] INFO Reading configuration from: /opt/kafka/kafka_2.12-2.2.2/config/zookeep
er.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,009] INFO Resolved hostname: <FQDN> to address: <FQDN>/<ip of localhost> (org.apache.zookeeper.server.quorum.QuorumPeer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,009] ERROR Invalid configuration, only one server specified (ignoring) (org.apac
he.zookeeper.server.quorum.QuorumPeerConfig)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,011] INFO autopurge.snapRetainCount set to 3 (org.apache.zookeeper.server.Datadi
rCleanupManager)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,011] INFO autopurge.purgeInterval set to 0 (org.apache.zookeeper.server.DatadirC
leanupManager)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,011] INFO Purge task is not scheduled. (org.apache.zookeeper.server.DatadirCleanupManager)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,011] WARN Either no config or no quorum defined in config, running in standalone mode (org.apache.zookeeper.server.quorum.QuorumPeerMain
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,027] INFO Reading configuration from: /opt/kafka/kafka_2.12-2.2.2/config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,027] INFO Resolved hostname: <FQDN> to address: <FQDN>/<ip of localhost> (org.apache.zookeeper.server.quorum.QuorumPeer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,027] ERROR Invalid configuration, only one server specified (ignoring) (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,027] INFO Starting server (org.apache.zookeeper.server.ZooKeeperServerMain)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,033] INFO Server environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,033] INFO Server environment:host.name=<FQDN> (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,033] INFO Server environment:java.version=1.8.0_221 (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,033] INFO Server environment:java.vendor=Oracle Corporation (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,033] INFO Server environment:java.home=/opt/jre1.8.0_221 (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,033] INFO Server environment:java.class.path=/opt/kafka/kafka_2.12-2.2.2/bin/../libs/activation-1.1.1.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/aopalliance-repackaged-2.5.0-b42.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/argparse4j-extension-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/connect-transforms-2.10.0.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jackson-core-CR2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.annotation-api-1.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.inject-1.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.inject-2.5.0-b42.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.servlet-api-3.1.0.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.ws.rs-api-2.1.1.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/javax.ws.rs-api-2.1.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jaxb-api-2.3.0.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-client-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-common-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-container-servlet-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jersey-container-servlet-core-2.27.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jetty-client-9.4.14.v20181114.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/jetty-continuation-9.4.14.v20181114.jar:/opt/kafka/kafka_2.12-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/kafka-streams-scala_2.12-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/kafka-streams-test-utils-2.2.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/metrics-core-2.2.0.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/osgi-resource-locator-1.0.1.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/plexus-utils-3.1.0.jar:/opt/kafka/kafka_2.12-1.1.7.2.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/validation-api-1.1.0.Final.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/zkclient-3.4.13.jar:/opt/kafka/kafka_2.12-2.2.2/bin/../libs/zstd-jni-1.3.8-1.jar (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,034] INFO Server environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,034] INFO Server environment:java.io.tmpdir=/tmp (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,034] INFO Server environment:java.compiler=<NA> (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,034] INFO Server environment:os.name=Linux (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,034] INFO Server environment:os.arch=amd64 (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,034] INFO Server environment:os.version=3.10.0-1062.el7.x86_64 (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,034] INFO Server environment:user.name=kafka (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,034] INFO Server environment:user.home=/home/kafka (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,034] INFO Server environment:user.dir=/ (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,043] INFO tickTime set to 3000 (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,043] INFO minSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,044] INFO maxSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,049] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,054] INFO binding to port 0.0.0.0/0.0.0.0:5181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: [2020-11-19 18:16:08,131] ERROR Unexpected exception, exiting abnormally (org.apache.zookeeper.server.ZooKeeperServerMain)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: java.io.EOFException
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at java.io.DataInputStream.readInt(DataInputStream.java:392)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.persistence.FileHeader.deserialize(FileHeader.java:66)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.inStreamCreated(FileTxnLog.java:585)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.createInputArchive(FileTxnLog.java:604)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.goToNextLog(FileTxnLog.java:570)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next(FileTxnLog.java:650)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.persistence.FileTxnSnapLog.fastForwardFromEdits(FileTxnSnapLog.java:219)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:176)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:217)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:284)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:407)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:118)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:122)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:89)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:55)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:119)
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-start.sh: at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:81)
Nov 19 18:16:08 <HOSTNAME> systemd: zookeeper.service: main process exited, code=exited, status=1/FAILURE
Nov 19 18:16:08 <HOSTNAME> zookeeper-server-stop.sh: No zookeeper server to stop
Nov 19 18:16:08 <HOSTNAME> systemd: zookeeper.service: control process exited, code=exited status=1
Nov 19 18:16:08 <HOSTNAME> systemd: Unit zookeeper.service entered failed state.
Nov 19 18:16:08 <HOSTNAME> systemd: zookeeper.service failed.
broker.id=1
advertised.listeners=PLAINTEXT://hostname of localhost:3997
listeners=PLAINTEXT://hostname of localhost:3997
delete.topic.enable=true
auto.create.topics.enable=True
offsets.topic.replication.factor=1
# The number of threads handling network requests
num.network.threads=3
# The number of threads doing disk I/O
num.io.threads=6
# The send buffer (SO_SNDBUF) used by the socket server
#socket.send.buffer.bytes=102400
# The receive buffer (SO_RCVBUF) used by the socket server
#socket.receive.buffer.bytes=102400
# The maximum size of a request that the socket server will accept (protection against OOM)
#socket.request.max.bytes=104857600
# A comma seperated list of directories under which to store log files
log.dirs=/var/log/kafka
# The default number of log partitions per topic.
num.partitions=3
# Default Replication Factor
default.replication.factor=1
# The minimum age of a log file to be eligible for deletion
log.retention.hours=168
# A size-based retention policy for logs. Segments are pruned from the log as long as the remaining
# segments don't drop below log.retention.bytes.
#log.retention.bytes=1073741824
# The maximum size of a log segment file. When this size is reached a new log segment will be created.
log.segment.bytes=1073741824
# The interval at which log segments are checked to see if they can be deleted according
# to the retention policies
log.retention.check.interval.ms=300000
zookeeper.connect= <ip of localhost>:5181
zookeeper.connection.timeout.ms=6000
/opt/kafka/kafka\u 2.12-2.2.2/config/zookeeper。属性
# clientPortBindAddress=localhost
clientPort=5181
dataDir=/var/data/zookeeper
dataLogDir=/var/data/logs/zookeeper
maxClientCnxns=0
# time for inital synchronization
initLimit=10
# how many ticks can pass before timeout
syncLimit=5
server.1=<hostname of localhost>:2888:3888
动物园管理员。服务
[Unit]
Requires=network.target remote-fs.target
After=network.target remote-fs.target
[Service]
Type=simple
User=kafka
ExecStart=/opt/kafka/kafka_2.12-2.2.2/bin/zookeeper-server-start.sh /opt/kafka/kafka_2.12-2.2.2/config/zookeeper.properties
ExecStop=/opt/kafka/kafka_2.12-2.2.2/bin/zookeeper-server-stop.sh
Restart=on-abnormal
[Install]
WantedBy=multi-user.target
在拒绝连接的情况下,所有四个词都命令(stat、ruok)。
我移动了所有文件(log.1、log.103、log.142、log.16a、log.17d-所有具有oct时间戳的文件)存在于/var/data/logs/zoomaster/version-2/
中到其他一些目录并启动zoomaster,然后kafka,两者都启动并运行。我现在可以列出主题。现在我看到log.1文件已创建。(它的二进制文件,所以看不到里面)
有人能知道它背后的原因吗?为什么它在移动这些似乎有点旧的log*文件后有效。
不确定从现在起1个月后,如果再次发生相同的问题,是否必须这样做。
我们想通过spring-kafka列出所有Kafka主题,以获得类似于kafka命令的结果: 在下面的服务中运行 getTopics() 方法时,我们会得到 配置: 服务: Kafka已经启动并运行,我们可以成功地从应用程序向主题发送消息。
在我们的docker-swarm中运行kafka connect,使用以下撰写文件: kafka connect节点成功启动,我可以设置任务并查看这些任务的状态······ 我是否在撰写文件或任务配置中缺少某些配置?
因为我是新的Kafka,所以我能够从文件中读取记录,并通过生产者将消息发送到Kafka主题,但不能通过消费者消费相同的主题。 注意:您可以从任何文本文件中读取数据,我使用的是Kafka2.11-0.9。0.0版本 这是我的密码: 下面是输出:
Debezium连接器的Kafka connect事件是Avro编码的。 在传递给Kafka connect standalone服务的connect-standalone.properties中提到了以下内容。 使用这些属性配置Kafka使用者代码: 在消费者实现中,下面是读取键和值组件的代码。我使用REST从模式注册表中获取键和值的模式。 解析密钥工作正常。在解析消息的值部分时,我得到了Arr
下面的json数据示例 下面的错误消息 线程“main”org.apache.spark.sql.analysisException中出现异常:未能找到数据源:Kafka。请按照“结构化流+Kafka集成指南”的部署部分部署应用程序。;在org.apache.spark.sql.execution.datasources.datasource$.lookupdatasource(datasourc
我有一个Kafka集群(版本:0.10.1.0),有9个代理和10个分区。 我尝试使用camel kafka从java应用程序中获取消息。这是我的pom。xml 这只是我使用的与骆驼Kafka相关的依赖项。下面是骆驼Kafka消费者代码。 我正在使用文档中指定的KafkaURIhttps://camel.apache.org/components/latest/kafka-component.ht