“hadoop namenode -format” returns a java.net.UnknownHostException

前端 未结 4 477
走了就别回头了
走了就别回头了 2020-12-16 05:36

I\'m currently learning hadoop and I\'m trying to setup a single node test as defined in http://hadoop.apache.org/common/docs/current/single_node_setup.html

I\'ve co

相关标签:
4条回答
  • 2020-12-16 05:50

    First get the host name of your computer. It can be obtained by running $hostname command. Then add 127.0.0.1 localhost hostname into the /etc/hosts file. That should solve the problem.

    0 讨论(0)
  • 2020-12-16 05:58

    Appending the below to /etc/hosts may help:

    127.0.0.1   localhost   yourhostname
    
    0 讨论(0)
  • 2020-12-16 06:08

    UnknownHostException is thrown when hadoop tries to resolve the DNS name (srv-clc-04.univ-nantes.prive3) to an ip address. This fails.

    Look for the domain name in the configuration files and replace it by "localhost". (Or update the DNS up resolve the name to an ip address)

    0 讨论(0)
  • 2020-12-16 06:09

    The tmp directory that you have created should have ownership issues. That is why hadoop is not able to write to the tmp directoy to fix it run the following commands

    sudo chown hduser:hadoop /app/<your hadoop tmp dir>
    
    0 讨论(0)
提交回复
热议问题