Windows上的融合KSQL服务器-找不到或加载主类

时间:2018-08-25 15:32:48

标签: apache-kafka windows-10 confluent ksql

我想连接到我自己的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

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

1 个答案:

答案 0 :(得分: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