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

Failed to start namenode. java.net.BindException Port in use

Solved Go to solution
Highlighted

Failed to start namenode. java.net.BindException Port in use

hi,

when we start the namenode we get Port in use

how to know which port is in use ?

ERROR namenode.NameNode (NameNode.java:main(1774)) - Failed to start namenode. java.net.BindException: Port in use: master01.pp.com:50070 at org.apache.hadoop.http.HttpServer2.constructBindException(HttpServer2.java:983) at org.apache.hadoop.http.HttpServer2.bindForSinglePort(HttpServer2.java:1006) at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:1063) at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:920) at org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:170) at org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:933) at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:746) at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:992) at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:976) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1701) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1769) Caused by: java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216) at org.apache.hadoop.http.HttpServer2.bindListener(HttpServer2.java:971) at org.apache.hadoop.http.HttpServer2.bindForSinglePort(HttpServer2.java:1002) ... 9 more

Michael-Bronson
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Failed to start namenode. java.net.BindException Port in use

Super Mentor

@uri ben-ari

What does the netstat output shows on the NN host?

The "java.net.BindException: Port in use master01.pp.com:50070" indicates that the port is being used by some other process. So please find the Process which is using that port and kill that then try restarting the NN.

# netstat -tnlpa | grep 50070

.

View solution in original post

5 REPLIES 5
Highlighted

Re: Failed to start namenode. java.net.BindException Port in use

Super Mentor

@uri ben-ari

What does the netstat output shows on the NN host?

The "java.net.BindException: Port in use master01.pp.com:50070" indicates that the port is being used by some other process. So please find the Process which is using that port and kill that then try restarting the NN.

# netstat -tnlpa | grep 50070

.

View solution in original post

Highlighted

Re: Failed to start namenode. java.net.BindException Port in use

Super Mentor

@uri ben-ari

The error says port is 50070

Port in use master01.pp.com:50070

.

So you need to kill the Process that is listed in the netstat output.

#  netstat -tnlpa | grep 50070

#  kill  -9  $THE_PID_FROM_ABOVE_COMMAND

.

Highlighted

Re: Failed to start namenode. java.net.BindException Port in use

sorry you right

Michael-Bronson
Highlighted

Re: Failed to start namenode. java.net.BindException Port in use

Explorer

cheers @Jay Kumar SenSharma , that solved my other issue

Highlighted

Re: Failed to start namenode. java.net.BindException Port in use

Don't have an account?