Home > other >  Kafka configuration can't work normally after the kerberos GSSHeader did not find the right tag
Kafka configuration can't work normally after the kerberos GSSHeader did not find the right tag

Time:09-16


Kafka configured kerberos after can normal boot, you can also create topic
But not into the topic to write message cannot receive
Kafka version: kafka - 2.0.1-1.2.0.1. P0.5
The JDK: jdk1.7.0 _67 - cloudera

Kerberos: krb5 - server - 1.10.3-57. El6. X86_64
Krb5 - auth dialog - 0.13-5. El6. X86_64
Krb5 - workstation - 1.10.3-57. El6. X86_64
Krb5 - devel - 1.10.3-57. El6. X86_64
Krb5 - libs - 1.10.3-57. El6. X86_64

System: centos6.7 X64

# klist -e
Ticket cache: FILE:/TMP/krb5cc_0
The Default principal: [email protected]

Valid starting Expires Service principal
05/30/16 14:00:31 05/31/16 14:00:31 krbtgt/[email protected]
Renew until 06/06/16 14:00:31, Etype (skey, TKT) : aes256 - CTS - hmac - sha1-96, aes256 - CTS - hmac - sha1-96


Jce7 under JCE file is from oracle's website and replace the corresponding files, restart the KDC, kafka services such as
An error is as follows:
# kafka - the console - consumer - the topic test - zookeeper hadoop2:2181, hadoop3:2181, hadoop4:2181
[15:11:24 2016-05-30, 650] WARN [console a519fe _hadoop2 consumer - 10846-1464592282973-78 - leader - finder - thread], Failed to find leader for the Set ([test, 0]) (kafka. Consumer. ConsumerFetcherManager $LeaderFinderThread)
Kafka.com mon. BrokerEndPointNotAvailableException: End point PLAINTEXT not found for broker 112
The at kafka. Cluster. Broker. GetBrokerEndPoint (Broker. Scala: 141)
The at kafka. Utils. ZkUtils $$$getAllBrokerEndPointsForChannel anonfun $1. Apply (ZkUtils. Scala: 171)

.


# kafka - consolproducer - topic test - broker - list hadoop4:9092, hadoop3:9092, hadoop2:9092
123
[15:16:41 2016-05-30, 993] ERROR ERROR when sending a message to the topic test with key: null value: 3 bytes with the ERROR: Failed to update metadata after 60000 Ms. (org. Apache. Kafka. Clients. Producer. The internals. ErrorLoggingCallback)

.
Log in the following message:
The 2016-05-30 15:16:45, DEBUG 109 org.apache.kafka.common.net work. The Selector: Connection with/172.16.0.6 disconnected
Java. IO. IOException: javax.mail. Security. Sasl. SaslException: GSS initiate failed [under Caused by GSSException: Defective token detected (Mechanism level: GSSHeader did not find the right tag)]
At org.apache.kafka.com, mon. Security. The authenticator. SaslServerAuthenticator. Authenticate (SaslServerAuthenticator. Java: 170)
Work at org.apache.kafka.common.net. KafkaChannel. Prepare (KafkaChannel. Java: 63)
Work at org.apache.kafka.common.net. The Selector. PollSelectionKeys (318) the Selector. Java:
Work at org.apache.kafka.common.net. The Selector. Poll (283) the Selector. Java:
Work at kafka.net. The Processor. The run (413). SocketServer scala:
The at Java. Lang. Thread. The run (Thread. Java: 745)
Under Caused by: javax.mail. Security. Sasl. SaslException: GSS initiate failed [under Caused by GSSException: Defective token detected (Mechanism level: GSSHeader did not find the right tag)]
At com. Sun. Security. Sasl. Gsskerb. GssKrb5Server. EvaluateResponse (GssKrb5Server. Java: 177)
At org.apache.kafka.com, mon. Security. The authenticator. SaslServerAuthenticator. Authenticate (SaslServerAuthenticator. Java: 164)
. 5 more
Under Caused by: GSSException: Defective token detected (Mechanism level: GSSHeader did not find the right tag)
At sun. Security. JGSS. GSSHeader. & lt; init> (GSSHeader. Java: 97)
At sun. Security. JGSS. GSSContextImpl. AcceptSecContext (GSSContextImpl. Java: 306)
At sun. Security. JGSS. GSSContextImpl. AcceptSecContext (GSSContextImpl. Java: 285)
At com. Sun. Security. Sasl. Gsskerb. GssKrb5Server. EvaluateResponse (GssKrb5Server. Java: 155)
. Six more



# # # # # # # # # # # # # # # # # # # # #

Kerberos related configuration is as follows:
Krb5.conf
[logging]
The default=FILE:/var/log/krb5libs log
KDC=FILE:/var/log/krb5kdc. Log
Admin_server=FILE:/var/log/kadmind log

[libdefaults]
Default_realm=ATM.COM
Dns_lookup_realm=false
Dns_lookup_kdc=false
Ticket_lifetime=24 h
Renew_lifetime=7 d
Forwardable=true

[realms]
ATM.COM={
KDC=hadoop5
Admin_server=hadoop5
}

[domain_realm]
Hadoop5=ATM.COM
Hadoop4=ATM.COM
Hadoop2=ATM.COM
Hadoop3=ATM.COM



# cat/var/kerberos/krb5kdc/KDC. Conf
[kdcdefaults]
Kdc_ports=88
Kdc_tcp_ports=88

[realms]
ATM.COM={
# master_key_type=aes256 - CTS
Max_life=1 d
Max_renewable_life=7 d
Acl_file=/var/kerberos/krb5kdc/kadm5 acl
Dict_file=/usr/share/dict/words
Admin_keytab=/var/kerberos/krb5kdc/kadm5 keytab
Supported_enctypes=aes256 - CTS: normal either aes128 - CTS: normal des3 hmac - sha1: normal arcfour - hmac: normal des - hmac - sha1: normal des - CBC - md5: normal des - CBC - CRC: normal
Default_principal_flags=+ renewable, + forwardable
}

CodePudding user response:

What is your problem solved? I can say today is also encounter this problem, your solution? I am using Kafka0.9.2

CodePudding user response:

The building Lord, in? Your problem solved? I also encountered this problem today, kafka I with 0.9.0

CodePudding user response:

API version?

CodePudding user response:

null
  • Related