2015-10-29 70 views
0

我試圖複製一些本地的文件到HDFS,這個腳本:如何處理Hadoop中的java.net.ConnectException?

bin/hadoop fs -copyFromLocal '/home/czy/IdeaProjects/HadoopInAction/FirstHadoop/src/main/resources/crossView.txt' /user/czy 

它的到來是這樣的:

copyFromLocal: Call From ubuntu/127.0.1.1 to localhost:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused 

但是,當我用這樣的腳本(不HDFS://localhost /),它運行良好:

bin/hadoop fs -copyFromLocal '/home/czy/IdeaProjects/HadoopInAction/FirstHadoop/src/main/resources/crossView.txt' /user/czy 

爲什麼會發生這種情況?爲什麼我將namenode端口配置爲9000時收到to localhost:8020 failed

+0

檢查名稱節點進程運行或不使用sudo jps –

回答