hadoop fsck不起作用

时间:2012-09-17 15:12:59

标签: hadoop mapreduce hdfs

我尝试使用hadoop fsck实用程序,但它不起作用。 在这台机器上安装了CDH3(通过cloudera管理器)。 但是使用ssh我可以连接到mynamenode。 记录下:

[18:54]hdfs@datanode2:~$ hadoop fsck -fs "hdfs://namenode:8020/" /
12/09/17 18:55:01 ERROR security.UserGroupInformation: PriviledgedActionException as:hdfs (auth:SIMPLE) cause:java.net.ConnectException: Connection refused
Exception in thread "main" java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:483)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:213)
        at sun.net.www.http.HttpClient.New(HttpClient.java:300)
        at sun.net.www.http.HttpClient.New(HttpClient.java:316)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:992)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:928)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:846)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1296)
        at org.apache.hadoop.hdfs.tools.DFSck$1.run(DFSck.java:141)
        at org.apache.hadoop.hdfs.tools.DFSck$1.run(DFSck.java:110)
        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:1177)
        at org.apache.hadoop.hdfs.tools.DFSck.run(DFSck.java:110)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.hdfs.tools.DFSck.main(DFSck.java:182)
[18:55]hdfs@datanode2:~$ ssh namenode
Last login: Thu Jul 19 18:57:29 2012 from 10.162.72.241

Appliance:      cloudera-demo-vm appliance 3.0
Hostname:       namenode
IP Address:     10.162.72.240

[18:55]hdfs@namenode:~$

我不明白如何调试这个问题...... 我希望有人可以帮助我。

2 个答案:

答案 0 :(得分:1)

我认为您是从Datanode或任何DFS客户端运行它,从Namenode运行它。

答案 1 :(得分:0)

您需要提供hadoop.sh fsck /haddop.sh fsck /hbase(例如)