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

Failed to start name node with the below error

New Contributor

ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: Failed to start namenode.
java.net.SocketException: Unresolved address
        at sun.nio.ch.Net.translateToSocketException(Net.java:157)
        at sun.nio.ch.Net.translateException(Net.java:183)
        at sun.nio.ch.Net.translateException(Net.java:189)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:76)
        at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
        at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:887)
        at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:828)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:142)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:751)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:638)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:810)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:794)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1487)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1553)
Caused by: java.nio.channels.UnresolvedAddressException
        at sun.nio.ch.Net.checkAddress(Net.java:127)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:208)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        ... 10 more

6 REPLIES 6

New Contributor

Please help me in resolving the issue...

Please verify if name resolution is working properly on the node? What does
this say?

# python -c "import socket; print socket.getfqdn(); print
socket.gethostbyname(socket.getfqdn())"


Regards,
Gautam Gopalakrishnan

New Contributor

Hi Gautam,

 

Thanks for your quick response

 

Below is the output

 

test.cent.com

127.0.0.1

 

Please let me know if i need to configure the same in any place

 

Thanks,

Jona

New Contributor
Here test is the name of the machine..

Please provide the contents of /etc/hosts and /etc/nsswitch.conf

Regards,
Gautam Gopalakrishnan

New Contributor

Below are the /etc/hosts details

 

127.0.0.1   test.cent.com localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

 

Below are the /etc/nsswitch.conf details

 

passwd:     files sss
shadow:     files sss
group:      files sss
#initgroups: files

#hosts:     db files nisplus nis dns
hosts:      files dns myhostname

# Example - obey only what nisplus tells us...
#services:   nisplus [NOTFOUND=return] files
#networks:   nisplus [NOTFOUND=return] files
#protocols:  nisplus [NOTFOUND=return] files
#rpc:        nisplus [NOTFOUND=return] files
#ethers:     nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files     

bootparams: nisplus [NOTFOUND=return] files

ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files sss

netgroup:   files sss

publickey:  nisplus

automount:  files
aliases:    files nisplus