Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Failed to start datanode due to bind exception

Failed to start datanode due to bind exception

New Contributor

I have been repeatedly trying to start datanode but it fails with bind exception saying address is already in use even though port is free

 

I used below commands to check

netstat -a -t --numeric-ports -p | grep 500

 

I have overridden default port 50070 with 50081 but the issue still persists.

 

Starting DataNode with maxLockedMemory = 0
Opened streaming server at /172.19.7.160:50081
Balancing bandwith is 10485760 bytes/s
Number threads for balancing is 5
Waiting for threadgroup to exit, active threads is 0
Shutdown complete.
Exception in secureMain
java.net.BindException: bind(2) error: Address already in use when trying to bind to '/var/run/hdfs-sockets/datanode'
    at org.apache.hadoop.net.unix.DomainSocket.bind0(Native Method)
    at org.apache.hadoop.net.unix.DomainSocket.bindAndListen(DomainSocket.java:191)
    at org.apache.hadoop.hdfs.net.DomainPeerServer.<init>(DomainPeerServer.java:40)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.getDomainPeerServer(DataNode.java:907)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.initDataXceiver(DataNode.java:873)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:1066)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:411)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:2297)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:2184)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:2231)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:2407)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:2431)
Exiting with status 1

 

1 REPLY 1

Re: Failed to start datanode due to bind exception

New Contributor

Hi,

Restart cloudera agent on that datanode and then try to restart datanode..Datanode should come up

Don't have an account?
Coming from Hortonworks? Activate your account here