sujitha
sujitha

Reputation: 81

Error in copying files to HDFS

I tried installing hadoop in two nodes. Both the nodes are up and running. The namenode runs on Ubuntu 10.10 and Datanode on Fedora 13. While copying the file from local file system to hdfs I encountered the following errors.

The terminal showed:

    12/04/12 02:19:15 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.io.OException: Bad connect ack with firstBadLink as 10.211.87.162:9200
    12/04/12 02:19:15 INFO hdfs.DFSClient: Abandoning block blk_-1069539184735421145_1014

The log file in namenode showed:

   2012-10-16 16:17:56,723 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: DatanodeRegistration(10.6.2.26:50010, storageID=DS-880164535-10.18.13.10-50010-1349721715148, infoPort=50075, ipcPort=50020):DataXceiver
   java.net.NoRouteToHostException: No route to host
         at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
         at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
         at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
         at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:404)
         at org.apache.hadoop.hdfs.server.datanode.DataXceiver.writeBlock(DataXceiver.java:282)
         at org.apache.hadoop.hdfs.server.datanode.DataXceiver.run(DataXceiver.java:103)
         at java.lang.Thread.run(Thread.java:662)

Datanodes available are indicated as 2. I've disabled the firewall and selinux. The following changes have also been made in the hdfs-site.xml

dfs.socket.timeout -> 360000

dfs.datanode.socket.write.timeout -> 3600000

dfs.datanode.max.xcievers -> 1048576

Both the nodes run sun-java6-jdk, The datanode contains Openjdk but the path settings have been made for sun java.

Yet the same error persists.

What might be the solution.

Upvotes: 4

Views: 5724

Answers (2)

ssgao
ssgao

Reputation: 5521

That's because your firewall is on.

try

sudo /etc/init.d/iptables stop

If you are on Ubuntu, do

sudo ufw disable

this should solve the issue.

Upvotes: 3

pensz
pensz

Reputation: 1881

The exception log mentioned tha the failure reason is No route to host.

Try ping 10.6.2.26 to test your network connection.

Upvotes: 0

Related Questions