我尝试使用 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:~$
而且我不明白如何调试这个问题......我希望有人能帮助我。