gpt4 book ai didi

apache-kafka - Zookeeper 错误 : dataDir is not set

转载 作者:行者123 更新时间:2023-12-04 12:01:37 24 4
gpt4 key购买 nike

我正在使用 kafka 快速入门教程来设置生产者-消费者连接。
https://kafka.apache.org/quickstart

我一直在使用本教程一段时间,直到现在它都运行良好。
当我运行动物园管理员时:

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

我收到以下错误:
[2017-01-14 18:57:18,148] INFO Reading configuration from: config/server.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2017-01-14 18:57:18,159] ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config/server.properties
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:123)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:101)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Caused by: java.lang.IllegalArgumentException: dataDir is not set
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:243)
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:119)
... 2 more
Invalid config, exiting abnormally

这是在手动杀死一些尾部进程之后发生的。我怎样才能克服这个错误?我已经下载了一个新的 kafka quickstart 文件夹,但错误仍然存​​在。我的 zookeeper.config 文件:
...
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# the directory where the snapshot is stored.
dataDir=/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
# disable the per-ip limit on the number of connections since this is a non-production config
maxClientCnxns=0

谢谢!

最佳答案

您的启动命令显示 config/zookeeper.properties但您的错误消息引用了 config/server.properties .

Zookeeper 应该以 zookeeper.properties 启动和 Kafka 应该从 server.properties 开始.

不要把这些搞混,否则都不会开始

关于apache-kafka - Zookeeper 错误 : dataDir is not set,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41655869/

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