Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Unable to create new block

avatar
Contributor

I am trying to put one small file in newly created cluster and it gives me error

java.io.IOException: Unable to create new block. at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1284)

Detailed error is

[WARN ]: org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Exception in component tHDFSPut_1
java.net.ConnectException: Connection timed out: no further information
[WARN ]: org.apache.hadoop.hdfs.DFSClient - DataStreamer Exception
java.io.IOException: Unable to create new block.
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1284)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:464)
[WARN ]: org.apache.hadoop.hdfs.DFSClient - Could not get block locations. Source file "/tmp/swapnil/Info.txt" - Aborting...
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531)
at org.apache.hadoop.hdfs.DFSOutputStream.createSocketForPipeline(DFSOutputStream.java:1577)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1318)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1271)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:464)
3 REPLIES 3

avatar
Master Mentor

@Swapnil Prabhu is your cluster up? Please check Ambari whether hdfs service is up. The other issue you may have is native library, search HCC for instructions to fix "unable to load native-hadoop library"

avatar
Contributor

Cluster absolutely up and running

2506-2016-03-01-12-57-05-ambari-swapnil.png

avatar
Master Mentor

@Swapnil Prabhu please run HDFS service check and report results.