pan3793 opened a new issue, #7142: URL: https://github.com/apache/kyuubi/issues/7142
### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) ### Search before asking - [x] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues. ### Describe the bug We hit a strange error when trying to configure the Kafka log4j2 appender for the Spark engine, where Kafka uses SASL/PLAIN authentication, the `log4j2.xml` looks like ``` <?xml version="1.0" encoding="UTF-8"?> <Configuration status="WARN"> <Appenders> <Console name="stdout" target="SYSTEM_OUT"> <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %p %c{1}: %m%n%ex"/> </Console> <Kafka name="kafka" topic="spark_logs" syncSend="false"> <JsonTemplateLayout eventTemplateUri="classpath:org/apache/spark/SparkLayout.json"/> <Property name="bootstrap.servers" value="kafka-1:9091,kafka-2:9091,kafka-3:9091"/> <Property name="security.protocol" value="SASL_PLAINTEXT"/> <Property name="sasl.mechanism" value="PLAIN"/> <Property name="sasl.jaas.config"> org.apache.kafka.common.security.plain.PlainLoginModule required username="foo" password="***"; </Property> <Property name="compression.type" value="gzip"/> </Kafka> </Appenders> <Loggers> <Root level="INFO"> <AppenderRef ref="stdout"/> <AppenderRef ref="kafka"/> </Root> <!-- Avoid recursive logging --> <Logger name="org.apache.kafka" level="INFO" additivity="false"> <AppenderRef ref="stdout"/> </Logger> </Loggers> </Configuration> ``` ### Affects Version(s) All ### Kyuubi Server Log Output ```logtalk ``` ### Kyuubi Engine Log Output ```logtalk 2025-07-17 19:53:08 ERROR TThreadPoolServer: Error occurred during processing of message. org.apache.kafka.common.errors.SaslAuthenticationException: Authentication failed: credentials for user could not be verified Caused by: javax.security.auth.callback.UnsupportedCallbackException at org.apache.kyuubi.service.authentication.PlainSASLHelper$PlainServerCallbackHandler.$anonfun$handle$1(PlainSASLHelper.scala:63) at org.apache.kyuubi.service.authentication.PlainSASLHelper$PlainServerCallbackHandler.$anonfun$handle$1$adapted(PlainSASLHelper.scala:56) at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36) at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:198) at org.apache.kyuubi.service.authentication.PlainSASLHelper$PlainServerCallbackHandler.handle(PlainSASLHelper.scala:56) at org.apache.kafka.common.security.plain.internals.PlainSaslServer.evaluateResponse(PlainSaslServer.java:106) at org.apache.kyuubi.shaded.thrift.transport.TSaslTransport$SaslParticipant.evaluateChallengeOrResponse(TSaslTransport.java:507) at org.apache.kyuubi.shaded.thrift.transport.TSaslTransport.open(TSaslTransport.java:250) at org.apache.kyuubi.shaded.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:44) at org.apache.kyuubi.shaded.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:199) at org.apache.kyuubi.shaded.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:227) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2025-07-17 19:53:08 ERROR SparkSQLEngine: RECEIVED SIGNAL 15: TERM ``` ### Kyuubi Server Configurations ```yaml ``` ### Kyuubi Engine Configurations ```yaml ``` ### Additional context _No response_ ### Are you willing to submit PR? - [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix. - [ ] No. I cannot submit a PR at this time. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
