在sasl安全合流服务器上启动ksql时,出现错误“value not specified for key”â' “在jaas配置中”

hrysbysz  于 2021-06-07  发布在  Kafka
关注(0)|答案(0)|浏览(1568)

使用ksql-server.properties文件启动ksql时:

sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required \
        username="<username>" \
        password="<password with @ and special chars>";
security.protocol=SASL_PLAINTEXT
sasl.mechanism=SCRAM-SHA-256

我得到一个错误:

ERROR Failed to start KSQL (io.confluent.ksql.rest.server.KsqlServerMain:48)
org.apache.kafka.common.KafkaException: Failed create new KafkaAdminClient
    at org.apache.kafka.clients.admin.KafkaAdminClient.createInternal(KafkaAdminClient.java:370)
    at org.apache.kafka.clients.admin.AdminClient.create(AdminClient.java:62)
    at io.confluent.ksql.util.KafkaTopicClientImpl.<init>(KafkaTopicClientImpl.java:66)
    at io.confluent.ksql.KsqlEngine.<init>(KsqlEngine.java:120)
    at io.confluent.ksql.rest.server.KsqlRestApplication.buildApplication(KsqlRestApplication.java:252)
    at io.confluent.ksql.rest.server.KsqlServerMain.createExecutable(KsqlServerMain.java:83)
    at io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java:45)
Caused by: java.lang.IllegalArgumentException: Value not specified for key 'â' in JAAS config
    at org.apache.kafka.common.security.JaasConfig.parseAppConfigurationEntry(JaasConfig.java:116)
    at org.apache.kafka.common.security.JaasConfig.<init>(JaasConfig.java:63)
    at org.apache.kafka.common.security.JaasContext.load(JaasContext.java:90)
    at org.apache.kafka.common.security.JaasContext.loadClientContext(JaasContext.java:84)
    at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:119)
    at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:65)
    at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:88)
    at org.apache.kafka.clients.admin.KafkaAdminClient.createInternal(KafkaAdminClient.java:346)

具体来说,错误是:

Value not specified for key 'â' in JAAS config

把我甩了-jaas配置中的密钥应该只有用户名和密码-对吗?
在我的confluent服务器中创建了一个client.properties文件,使用完全相同的用户名密码和sasl\ u明文。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题