Hadoop cluster setup - java.net.ConnectException: Connection refused

后端 未结 15 726
心在旅途
心在旅途 2020-11-29 02:31

I want to setup a hadoop-cluster in pseudo-distributed mode. I managed to perform all the setup-steps, including startuping a Namenode, Datanode, Jobtracker and a Tasktracke

相关标签:
15条回答
  • 2020-11-29 03:04

    I was getting the same issue and found that OpenSSH service was not running and it was causing the issue. After starting the SSH service it worked.

    To check if SSH service is running or not:

    ssh localhost
    

    To start the service, if OpenSSH is already installed:

    sudo /etc/init.d/ssh start
    
    0 讨论(0)
  • 2020-11-29 03:05

    For me these steps worked

    1. stop-all.sh
    2. hadoop namenode -format
    3. start-all.sh
    0 讨论(0)
  • 2020-11-29 03:06

    I resolved the same issue by adding this property to hdfs-site.xml

    <property>
      <name>fs.default.name</name>
      <value>hdfs://localhost:9000</value>
      </property>
    
    0 讨论(0)
  • 2020-11-29 03:06
    • Stop it by-: stop-all.sh

    • format the namenode-: hadoop namenode -format

    • again start-: start-all.sh

    0 讨论(0)
  • 2020-11-29 03:10

    Hi Edit your conf/core-site.xml and change localhost to 0.0.0.0. Use the conf below. That should work.

    <configuration>
      <property>
     <name>fs.default.name</name>
     <value>hdfs://0.0.0.0:9000</value>
    </property>
    
    0 讨论(0)
  • 2020-11-29 03:11

    hduser@marta-komputer:/usr/local/hadoop$ jps

    11696 ResourceManager

    11842 NodeManager

    11171 NameNode

    11523 SecondaryNameNode

    12167 Jps

    Where is your DataNode? Connection refused problem might also be due to no active DataNode. Check datanode logs for issues.

    UPDATED:

    For this error:

    15/03/01 00:59:34 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032 java.net.ConnectException: Call From marta-komputer.home/192.168.1.8 to marta-komputer:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

    Add these lines in yarn-site.xml:

    <property>
    <name>yarn.resourcemanager.address</name>
    <value>192.168.1.8:8032</value>
    </property>
    <property>
    <name>yarn.resourcemanager.scheduler.address</name>
    <value>192.168.1.8:8030</value>
    </property>
    <property>
    <name>yarn.resourcemanager.resource-tracker.address</name>
    <value>192.168.1.8:8031</value>
    </property>
    

    Restart the hadoop processes.

    0 讨论(0)
提交回复
热议问题