【问题标题】:Confluent KSQL server on Windows - could not find or load main classWindows 上的 Confluent KSQL 服务器 - 无法找到或加载主类
【发布时间】:2020-05-14 00:22:06
【问题描述】:

我想连接到我自己的 Kafka 实例以尝试 KSQL。我下载了最新版的Confluent开源平台-https://www.confluent.io/download/

我关注https://docs.confluent.io/current/ksql/docs/installation/server-config/index.html 并尝试从 Git Bash 在我的 Windows 10 机器上启动 KSQL 服务器:

ksql-server-start ksql-server.properties

但它失败并出现以下错误:

Error: Could not find or load main class io.confluent.ksql.rest.server.KsqlServe                                                                                                                                                                                               rMain

我做错了什么以及如何正确启动它?

【问题讨论】:

  • 您是否尝试过使用 CMD 或 PowerShell?
  • 我添加了confluentinc/cp-ksql-server:5.0.0,现在可以通过另一个 CLI 映像连接到该服务器。请查看我的更新答案
  • 如果您已经回答了您的问题,请将其放在下方,而不是更新问题。此外,Docker 只是解决问题的一种方法

标签: apache-kafka windows-10 confluent-platform ksqldb


【解决方案1】:

我添加了confluentinc/cp-ksql-server:5.0.0 Docker 镜像(下面是 Maven io.fabric8 docker-maven-plugin 代码):

<image>
    <name>confluentinc/cp-ksql-server:5.0.0</name>
    <alias>cp-ksql-server</alias>
    <run>
        <ports>
            <port>8088:8088</port>
        </ports>
        <links>
            <link>kafka:kafka</link>
        </links>
        <env>
            <KSQL_BOOTSTRAP_SERVERS>${local.ip}:9092</KSQL_BOOTSTRAP_SERVERS>
            <KSQL_LISTENERS>http://0.0.0.0:8088/</KSQL_LISTENERS>
            <KSQL_KSQL_SERVICE_ID>confluent_test_2</KSQL_KSQL_SERVICE_ID>
        </env>
    </run>
</image>

现在可以通过以下 CLI 映像连接到 KSQL CLI:

docker run -it confluentinc/cp-ksql-cli http://172.22.160.1:8088 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-26
    • 2020-06-28
    • 1970-01-01
    • 2014-09-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多