【发布时间】:2014-02-26 16:20:32
【问题描述】:
我有两个 Hadoop 集群,并且都运行相同的 Hadoop 版本。我在两个集群中也都有一个用户“testuser”(示例)(因此两个集群中都存在 testuser keytabs)。
Namenode#1 (source cluster): hdfs://nn1:8020
Namenode#2 (dest cluster): hdfs://nn2:8020
我想使用 hadoop distcp 将一些文件从一个集群复制到另一个集群。示例:在源集群中,我有一个路径为“/user/testuser/temp/file-r-0000”的文件,而在目标集群中,目标目录是“/user/testuser/dest/”。所以我想要的是将文件-r-0000 从源集群复制到目标集群的“dest”目录。
到目前为止我已经尝试过这些:
hadoop distcp hdfs://nn1:8020/user/testuser/temp/file-r-0000 hdfs://nn2:8020/user/testuser/dest
hadoop distcp hftp://nn1:8020/user/testuser/temp/file-r-0000 hdfs://nn2:8020/user/testuser/dest
我相信我不需要使用“hftp://”,因为我有相同版本的 hadoop。同样,我也在两个集群中都尝试了这些,但我得到的只是一些与安全性相关的异常。
使用 hftp 从目标集群运行时:
14/02/26 00:04:45 ERROR security.UserGroupInformation: PriviledgedActionException as:testuser@realm cause:java.net.SocketException: Unexpected end of file from server
14/02/26 00:04:45 ERROR security.UserGroupInformation: PriviledgedActionException as:testuser@realm cause:java.net.SocketException: Unexpected end of file from server
14/02/26 00:04:45 INFO fs.FileSystem: Couldn't get a delegation token from nn1ipaddress:8020
从源集群运行时:
14/02/26 00:05:43 ERROR security.UserGroupInformation: PriviledgedActionException as:testuser@realm1 cause:java.io.IOException: Couldn't setup connection for testuser@realm1 to nn/realm2
With failures, global counters are inaccurate; consider running with -i
Copy failed: java.io.IOException: Call to nn1ipaddress failed on local exception: java.io.IOException: Couldn't setup connection for testuser@realm1 to nn/realm2
Caused by: java.io.IOException: Couldn't setup connection for testuser@realm1 to nn/realm2
at org.apache.hadoop.ipc.Client$Connection$1.run(Client.java:560)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1232)
at org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:513)
at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:616)
at org.apache.hadoop.ipc.Client$Connection.access$2100(Client.java:203)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1254)
at org.apache.hadoop.ipc.Client.call(Client.java:1098)
... 26 more
它还显示 kerberos 数据库中不存在主机地址(我没有确切的日志)
那么,我是否需要以不同的方式配置 kerberos 才能在它们之间使用 discp?或者我在这里错过了什么?
任何信息将不胜感激。提前致谢。
【问题讨论】:
-
目前 kerberos 设置的安全性如何 - 任何信息。在那?
-
嗨@Jasper,我不确定它目前的设置如何。但通常我对上述用户进行 kinit(该用户有一个 keytabs 文件:testuser.headless.keytab),到目前为止所有服务都在这两个集群中工作。我认为 kerberos 与领域有关,对吧?那么每个 kerberos 数据库都应该有关于其他领域的信息还是应该允许其他领域?
-
是的,应该正确设置跨领域身份验证 - 这可能是问题所在。您可以禁用 kerberos 安全性并尝试一次 - 但我想这无论如何都会起作用。
标签: hadoop mapreduce cloud cluster-computing cloudera