Support Questions
Find answers, ask questions, and share your expertise

HDFS JAVA API from Windows

Hi Team,

am trying to write data into hdp data lake using java api from windows machine. but am getting the fallowing exception.file could only be replicated to 0 nodes instead of minReplication (=1). There are 1 datanode(s) running and 1 node(s) are excluded in this operation. at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget4NewBlock(

I have single node cluster , data node as enough space. am assuming some how from my machine am unable to connect to data node private ip provided by namenode. can some one provide guidence on this.




Check firewall rules, make sure that ports are port forwardedin your virtualizer properties

@Artem Ervits Am using AWS instance and open for all trafic .


@V_A n then make sure you're using public IPs when you interact with cluster and place the entry in the /etc/hosts

@Artem Ervits am able to perform operations like list where only interaction with name node is enough. But when am trying to use read/write where datanode interaction needs an getting fallowing error. Btw yes am using public ip only.


@Artem Ervits I am able to connect to cluster and perform operations like list . But when am trying to do write/read operations then am getting fallowing error. My assumption is am able to connect to Name mode but not with datannode from my client.


I would confirm the list of open ports, chance is you missed a few.


Did that resolve your issue, can you close the thread be accepting the answer.