gpt4 book ai didi

windows - 尝试在 Windows 中启动 Zookeeper 时出现 "log4j.properties was unexpected at this time"

转载 作者:可可西里 更新时间:2023-11-01 09:36:45 25 4
gpt4 key购买 nike

我正在使用从 Confluent ( http://www.confluent.io/product/kafka-streams/) 下载的 kafka 流。

我按照说明在 Windows 上运行 Zookeeper 和 Kafka。但是当我尝试使用命令启动 ZooKeeper 时D:\Softwares\confluent-3.0.1\bin\windows>zookeeper-server-start.bat ./etc/kafka/zookeeper.properties,我得到错误

D:\Softwares\confluent-3.0.1\bin\windows../../etc/kafka/log4j.properties was unexpected at this time.

如果我检查“zookeeper-server-start.bat”文件,命令看起来没问题,如下所示。目录 confluent-3.0.1\etc\kafka 下还存在 log4j.properties 文件


IF [%1] EQU [] (
echo USAGE: %0 zookeeper.properties
EXIT /B 1
)


SetLocal
IF ["%KAFKA_LOG4J_OPTS%"] EQU [""] (
if exists %~dp0../../etc/kafka/log4j.properties (
set KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:%~dp0../../etc/kafka/log4j.properties
) else (
set KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:%~dp0../../config/log4j.properties
)
)

IF ["%KAFKA_HEAP_OPTS%"] EQU [""] (
set KAFKA_HEAP_OPTS=-Xmx512M -Xms512M
)

%~dp0kafka-run-class.bat org.apache.zookeeper.server.quorum.QuorumPeerMain %*
EndLocal

最佳答案

当我将 kafka 下载的分发版放在 C:\Program Files (x86) 中时,我遇到了同样的错误。将 kafka 下载的分发版移动到 c 驱动器以外的其他驱动器对我有用。

找到以下工作命令:D:\kafka_2.12-2.2.0\kafka_2.12-2.2.0>bin\windows\zookeeper-server-start.bat config/zookeeper.properties

Kafka 是从它的官方网站下载的:

https://kafka.apache.org/quickstart

关于windows - 尝试在 Windows 中启动 Zookeeper 时出现 "log4j.properties was unexpected at this time",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39569570/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com