Azhar Ak
Azhar Ak

Reputation: 155

$ bin/hadoop namenode -format STARTUP_MSG: host = java.net.UnknownHostException:

I'm currently learning Hadoop by http://tecadmin.net/steps-to-install-hadoop-on-centosrhel-6/ in the 5th step when I apply this command $ bin/hadoop namenode -format I get following error enter image description here

I also have checked these links for resolving my problem "hadoop namenode -format" returns a java.net.UnknownHostException java.net.UnknownHostException: Invalid hostname for server: local I don't know where is domain name in the configuration files for replacing it by localhost. also I went to /etc/hosts file and replaced text by localhost.. still I haven't resolve the problem please someone help me.

Upvotes: 2

Views: 6360

Answers (3)

Nagarjuna D N
Nagarjuna D N

Reputation: 561

Problem: If anyone facing:

SHUTDOWN_MSG: Shutting down NameNode at java.net.UnknownHostException: ubuntu: ubuntu: unknown error

Solution:

  • Go to /etc/hosts
  • Disable/Remove if any IPV6 configuration maintained in /etc/hosts file
  • Save the file and try again

Upvotes: 0

Azhar Ak
Azhar Ak

Reputation: 155

With the help of Aadil's answer I resolved The unknownHostException by the following steps:

Step-1 Go to /etc/hosts Step-2 Edit the "hosts" file with IP 127.0.0.1 [space/tab] localhost [space/tab] HostName (e.g. static.98.35.ebonenet.com) Step-3 Save the file and try again

Upvotes: 1

Aadil
Aadil

Reputation: 189

The unknownHostException could be resolved by the following steps:

  • Go to /etc/hosts
  • Edit the "hosts" file with IP 127.0.0.1 [space] HostName (e.g. static.98.35.ebonenet.com)
  • Save the file and try again

Upvotes: 6

Related Questions