1

我尝试使用 hadoop fsck 实用程序,但它不起作用。在这台机器上安装了 CDH3(通过 cloudera manager)。但是使用 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:~$

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

4

2 回答 2

1

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

于 2013-01-14T06:58:32.757 回答
0

您需要给出hadoop.sh fsck /haddop.sh fsck /hbase(例如)

于 2012-10-17T20:39:40.630 回答