1

When I am running the following query in hive:

hive> select count(*) from testsql;

I am getting the following error:

Error 
FAILED: RuntimeException java.net.ConnectException: Call From impetus-1466/192.168.49.77          to impetus-1466:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

The jps looks like:

[impadmin@impetus-1466 hadoop-1.0.3.15]$ jps
 26380 TaskTracker
 26709 Jps
 26230 JobTracker
 25943 NameNode

I started the

$ start-all.sh
$ start-dfs.sh
$ start-mapred.sh

How could this be solved?

Thanks

GoingMyWay
  • 16,802
  • 32
  • 96
  • 149
user2876812
  • 326
  • 1
  • 4
  • 15
  • Your datanode and secondary name node services are not running. Try to stop all services then restart it again. If all the services are not running then you might need to format the Namenode. – Mukesh S Jul 10 '14 at 13:29

2 Answers2

1

If you can open the http://localhost:8088/cluster but can't open http://localhost:50070/. Maybe datanode didn't start-up or namenode didn't formated.

And check hadoop.tmp.dir in core-site.xml, if it is not set, the default directory of it is /tmp, so set hadoop.tmp.dir in core-site.xml

<property>
    <name>hadoop.tmp.dir</name>
    <value>/path/to/hadoop/tmp</value>
</property>

Then stop hadoop and reformat hdfs namenode -format, then restart the hadoop.

Similar question http://localhost:50070 does not work HADOOP

Community
  • 1
  • 1
GoingMyWay
  • 16,802
  • 32
  • 96
  • 149
0

The reason for this is, either there are no datanodes in your cluster or the datanodes do not know their namenode. This might be the result of namenode format at least twice. The cluster id of namenode got changed but this change was not reflected to the datanodes.

The below links might be helpful: Datanode not starts correctly http://hortonworks.com/community/forums/topic/clusterid-mismatch-for-namenode-and-datanodes-in-fully-distributed-cluster/

Community
  • 1
  • 1
New Coder
  • 499
  • 4
  • 22