Hasoop "ipc.Client: Retrying to connect to server"

There are many ideas on how to resolve this hadoop error

15/04/17 10:59:57 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 0 time(s).

      

However, I tried everything and still see this error! Here are my config

1) core-site.xml

$ cat ../../apache/hadoop-1.0.2/conf/core-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
  <name>fs.default.name</name>
  <value>hdfs://localhost:54310</value>
</property>
</configuration>

      

2) mapred-site.xml

$ cat ../../apache/hadoop-1.0.2/conf/mapred-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
  <name>mapred.job.tracker</name>
  <value>localhost:54311</value>
</property>
<property>
  <name>mapred.child.java.opts</name>
  <value>-Xmx512m</value>
</property>
</configuration>

      

3) iptables for port

# cat /etc/sysconfig/iptables
*filter
:INP UT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 54310 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 54311 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

# /etc/init.d/iptables restart
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]

$ netstat -an | grep 54310
$ netstat -an | grep 54311
tcp        0      0 ::ffff:127.0.0.1:54311     :::*                        LISTEN
tcp      238      0 ::ffff:127.0.0.1:54311      ::ffff:127.0.0.1:44216      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:44216      ::ffff:127.0.0.1:54311      ESTABLISHED

      

4) start hadoop

$ $HADOOP_HOME/bin/start-all.sh
Warning: $HADOOP_HOME is deprecated.

starting namenode, logging to /home/mahmood/bigdatabench/apache/hadoop-1.0.2/libexec/../logs/hadoop-mahmood-namenode-tiger.out
mahmood@localhost password:
localhost: Warning: $HADOOP_HOME is deprecated.
localhost:
localhost: starting datanode, logging to /home/mahmood/bigdatabench/apache/hadoop-1.0.2/libexec/../logs/hadoop-mahmood-datanode-tiger.out
mahmood@localhost password:
localhost: Warning: $HADOOP_HOME is deprecated.
localhost:
localhost: secondarynamenode running as process 7583. Stop it first.
jobtracker running as process 7792. Stop it first.
mahmood@localhost password:
localhost: Warning: $HADOOP_HOME is deprecated.
localhost:
localhost: tasktracker running as process 8019. Stop it first.

      

5) check java processes

$ jps
10292 Jps
8019 TaskTracker
7792 JobTracker
7583 SecondaryNameNode

      

6) Still I get this error

$ hadoop fs -ls hdfs://localhost:54310/
Warning: $HADOOP_HOME is deprecated.

15/04/17 10:59:57 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 0 time(s).
15/04/17 10:59:58 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 1 time(s).
15/04/17 10:59:59 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 2 time(s).
15/04/17 11:00:00 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 3 time(s).
15/04/17 11:00:01 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 4 time(s).
15/04/17 11:00:02 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 5 time(s).
15/04/17 11:00:03 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 6 time(s).
15/04/17 11:00:04 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 7 time(s).
15/04/17 11:00:05 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 8 time(s).
15/04/17 11:00:06 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 9 time(s).
Bad connection to FS. command aborted. exception: Call to localhost/127.0.0.1:54310 failed on connection exception: java.net.ConnectException: Connection refused

      

UPDATE:

While I thought I was formatting the filesystem, it turned out that the hdfs format command was aborted and I didn't notice. The reason for this I answered this question Re-format filesystem in /home/mahmood/bigdatabench/apache/hadoop-1.0.2/folders/name ? (Y or N)

with y . However, the correct answer is to press Y (capital letter !!).

So the right steps

1- stop-all.sh

2-nazod-designation -format

3- start-all.sh

The ipc error is gone :)

How can I fix this?

+5


source to share


2 answers


I think you are using this command from a client machine, in your config files you need to specify ip address / hostname instead of localhost to avoid similar problems. Try specifying hostnames in your config files and try again.



0


source


This error has been handled now.

Please check below for a list of configurations to be done on master and datododes.



Wizard: 1) Disable IP v6 2) Disable firewall 3) Use physical IP address in hdfs-site.xml and mapered XML file instead of localhost. 4) In the etc / hosts file, please comment out all entries except the main physical IP and the datanode's physical IP. All IPs starting from 127. *** and IP v6 must be commented out.

Datode: 1) In the etc / hosts file, please comment out all entries except the main physical IP and the physical IP of the datode. All IPs starting from 127. *** and IP v6 must be commented out. 2) Use Physical IP in hdfs-site.xml and mapered XML file instead of localhost.

0


source







All Articles