Hadoop datanode 无法与 KDC 通信,但 kinit 可以正常工作。
sudo kinit -k -t /etc/hadoop/conf/hdfs.keytab hdfs/symbio5.us-west-1.compute.internal@US-WEST-1.COMPUTE.INTERNAL
UDP端口也可以。
nc symbio5.us-west-1.compute.internal -v -z -u 88
Connection to symbio5.us-west-1.compute.internal 88 port [udp/kerberos] succeeded!
但在 hadoop kerberos 调试输出中,它总是说“接收超时”。
KrbAsReq calling createMessage
KrbAsReq in createMessage
KrbKdcReq send: kdc=symbio5.us-west-1.compute.internal UDP:88, timeout=30000, number of retries =3, #bytes=216
KDCCommunication: kdc=symbio5.us-west-1.compute.internal UDP:88, timeout=30000,Attempt =1, #bytes=216
SocketTimeOutException with attempt: 1
KDCCommunication: kdc=symbio5.us-west-1.compute.internal UDP:88, timeout=30000,Attempt =2, #bytes=216
SocketTimeOutException with attempt: 2
KDCCommunication: kdc=symbio5.us-west-1.compute.internal UDP:88, timeout=30000,Attempt =3, #bytes=216
SocketTimeOutException with attempt: 3
KrbKdcReq send: error trying symbio5.us-west-1.compute.internal java.net.SocketTimeoutException: Receive timed out
但是在 symbio5 本身,有 Namenode 和 KDC 和一个 datanode,没问题。
KrbAsReq calling createMessage
KrbAsReq in createMessage
KrbKdcReq send: kdc=symbio5.us-west-1.compute.internal UDP:88, timeout=30000, number of retries =3, #bytes=217
KDCCommunication: kdc=symbio5.us-west-1.compute.internal UDP:88, timeout=30000,Attempt =1, #bytes=217
KrbKdcReq send: #bytes read=776
KrbKdcReq send: #bytes read=776
KdcAccessibility: remove symbio5.us-west-1.compute.internal
谁能帮我一些忙?非常感谢。
最佳答案
最后我解决了这个问题,只是让 Hadoop 使用 TCP 端口与 Kerberos 通信,而不是 UDP。
sudo vim/etc/krb5.conf
...
[libdefaults]
...
udp_preference_limit =1
...
关于Hadoop datanode 无法与 KDC 通信,但 kinit 可以正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16666683/