Hadoop datanode 无法与 KDC 通信,但 kinit 可以正常工作

标签 hadoop hdfs kerberos

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/

相关文章:

JAVA: SparkConf 无法转换为 SparkContext

windows - Windows 10 中的 Spark 设置

hadoop - 安装Spark时出错

hadoop - Sqoop 导入错误 : UnsupportedClassVersionError CDH 5. 16

hadoop - cloudera BDR HDFS复制和快照有什么区别

bash - 从 HDFS 获取前两个文件

hadoop - Hadoop config-hdfs-site.xml:我应该在namenode和datanode上使用相同的文件吗?

java - 使用 key 表验证 kerberos token

kerberos - Jaas - 请求可更新的 Kerberos 票证

java - Camel-Kafka 安全协议(protocol) SASL_PLAINTEXT 不支持