【问题标题】:How run the Apache Zookeeper server as Background service in Windows如何在 Windows 中将 Apache Zookeeper 服务器作为后台服务运行
【发布时间】:2023-03-30 01:14:01
【问题描述】:

我能够从 Windows 上的命令提示符运行 Zookeeper 服务器。

今天我希望它作为后台服务运行,并在操作系统启动时自动启动。

我能够使用以下命令创建服务。

sc.exe create ZookeeperService binPath= “C:\zookeeper\apache-zookeeper-3.5.5\bin\zkServer.cmd”

…但它没有启动并出现以下错误:

那么我应该如何将 Zookeeper 服务器作为自动启动服务运行呢?

【问题讨论】:

    标签: apache-zookeeper


    【解决方案1】:

    我遇到了和你一样的问题,使用 NSSM 是唯一对我有用的解决方案。

    sc.exe create
    

    ... 不适用于批处理文件,因为它不像 .exe 文件那样实现 Windows 服务接口。

    可能的解决方案:

    【讨论】:

    • 感谢重播。我可以使用 nssm。
    • 我去了nssm website,发现最新版本是2014-08-31,令人担忧。
    • 警告:如果您在 windows 上使用 Zookeeper for Kafka,我想提以下几点:建议仅将 Kafka 在 windows 上用于开发目的。 Kafka 在 Windows (kafka.apache.org/documentation/#os) 上没有得到很好的支持。不幸的是,这在 Apache 上并没有清楚地显示出来。因此,您只有在看到由于关闭代理的授权问题而导致日志清理器在 Windows 下无法顺利运行时才意识到。 (2013 年门票:issues.apache.org/jira/browse/KAFKA-1194
    猜你喜欢
    • 1970-01-01
    • 2012-11-17
    • 1970-01-01
    • 2018-04-18
    • 1970-01-01
    • 1970-01-01
    • 2017-01-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多