You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/01/30 17:47:00 UTC

[jira] [Commented] (KAFKA-8162) IBM JDK Class not found error when handling SASL authentication exception

    [ https://issues.apache.org/jira/browse/KAFKA-8162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17026882#comment-17026882 ] 

ASF GitHub Bot commented on KAFKA-8162:
---------------------------------------

mimaison commented on pull request #6524: KAFKA-8162: IBM JDK Class not found error when handling SASL
URL: https://github.com/apache/kafka/pull/6524
 
 
   
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> IBM JDK Class not found error when handling SASL authentication exception
> -------------------------------------------------------------------------
>
>                 Key: KAFKA-8162
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8162
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients, core
>    Affects Versions: 2.1.0, 2.2.0, 2.1.1
>         Environment: Any with IBM JDK 8 SR5 FP10
>            Reporter: Arkadiusz Firus
>            Assignee: Edoardo Comar
>            Priority: Major
>
> When there is a problem with SASL authentication then enum KerberosError is being used to retrieve the error code. When IBM JDK is being used it tries to load a class com.ibm.security.krb5.internal.KrbException which is not present in all IBM JDK versions. This leads to NoClassDefFoundError which is not handled.
> I tested it on:
>  java version "1.8.0_161"
>  Java(TM) SE Runtime Environment (build 8.0.5.10 - pxa6480sr5fp10-20180214_01(SR5 FP10))
>  IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64 Compressed References 20180208_378436 (JIT enabled, AOT enabled)
> In this version of JDK class KrbException is in package com.ibm.security.krb5 (without internal). So the fully class name is: com.ibm.security.krb5.KrbException
> Full stack trace from the logs:
> [2019-03-27 06:50:00,113] ERROR Processor got uncaught exception. (kafka.network.Processor)
> java.lang.NoClassDefFoundError: org.apache.kafka.common.security.kerberos.KerberosError (initialization failure)
>         at java.lang.J9VMInternals.initializationAlreadyFailed(J9VMInternals.java:96)
>         at org.apache.kafka.common.security.authenticator.SaslServerAuthenticator.handleSaslToken(SaslServerAuthenticator.java:384)
>         at org.apache.kafka.common.security.authenticator.SaslServerAuthenticator.authenticate(SaslServerAuthenticator.java:256)
>         at org.apache.kafka.common.network.KafkaChannel.prepare(KafkaChannel.java:132)
>         at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:532)
>         at org.apache.kafka.common.network.Selector.poll(Selector.java:467)
>         at kafka.network.Processor.poll(SocketServer.scala:689)
>         at kafka.network.Processor.run(SocketServer.scala:594)
>         at java.lang.Thread.run(Thread.java:811)
> Caused by: org.apache.kafka.common.KafkaException: Kerberos exceptions could not be initialized
>         at org.apache.kafka.common.security.kerberos.KerberosError.<clinit>(KerberosError.java:59)
>         ... 8 more
> Caused by: java.lang.ClassNotFoundException: com.ibm.security.krb5.internal.KrbException
>         at java.lang.Class.forNameImpl(Native Method)
>         at java.lang.Class.forName(Class.java:297)
>         at org.apache.kafka.common.security.kerberos.KerberosError.<clinit>(KerberosError.java:53)
>         ... 8 more



--
This message was sent by Atlassian Jira
(v8.3.4#803005)