Reputation: 73
I'm getting this error when trying to putfile into hdfs.
org.apache.hadoop.net.ConnectTimeoutException: 60000 millis timeout while
waiting for channel to be ready for connect. ch :
java.nio.channels.SocketChannel[connection-pending remote=/10.1.1.14:50010]
I've looked up solutions and I see that you need to add this property to hdfs-site.xml:
<property>
<name>dfs.client.use.datanode.hostname</name>
<value>true</value>
</property>
I'm using ambari to manage my hadoop services. How to add the property without it resetting to defaults after I restart hdfs on ambari? I am on a single node cluster running HDP 2.6.1.0.
Update: Managed to add properties to hdfs-site.xml
<property>
<name>dfs.datanode.use.datanode.hostname</name>
<value>true</value>
</property>
<property>
<name>dfs.client.use.datanode.hostname</name>
<value>true</value>
</property>
However, I am still getting the same Timeout error.
Upvotes: 0
Views: 5206
Reputation:
Use this in hdfs site xml
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/path/to/hadoop/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/path/to/hadoop/datanode</value>
</property>
Upvotes: 0