0

After a new hadoop single node installation , I got following error in hadoop-root-datanode-localhost.localdomain.log

 2014-06-18 23:43:23,594 ERROR org.apache.hadoop.security.UserGroupInformation:  PriviledgedActionException as:root cause:java.net.ConnectException: Call to localhost/127.0.0.1:54310 failed on connection exception: java.net.ConnectException: Connection refused

2014-06-18 23:43:23,595 INFO org.apache.hadoop.mapred.JobTracker: Problem connecting to HDFS Namenode... re-trying java.net.ConnectException: Call to localhost/127.0.0.1:54310  failed on connection exception: java.net.ConnectException: Connection refusedat org.apache.hadoop.ipc.Client.wrapException(Client.java:1142)

Any idea.?

JPS is not giving any ouput

Core site.xml is updated

<configuration>
<property>
  <name>hadoop.tmp.dir</name>
  <value>/opt/surya/hadoop-1.2.1/tmp</value>
  <description>A base for other temporary directories.</description>
</property>

<property>
  <name>fs.default.name</name>
  <value>hdfs://localhost:54310</value>
  <description>The name of the default file system.  A URI whose
  scheme and authority determine the FileSystem implementation.  The
  uri's scheme determines the config property (fs.SCHEME.impl) naming
  the FileSystem implementation class.  The uri's authority is used to
  determine the host, port, etc. for a filesystem.</description>
</property>

</configuration>

Also , on format using hadoop namenode -format got below aborted error

Re-format filesystem in /tmp/hadoop-root/dfs/name ? (Y or N) y
Format aborted in /tmp/hadoop-root/dfs/name
Surya
  • 3,408
  • 5
  • 27
  • 35

3 Answers3

1

You need to run hadoop namenode -format as the hdfs-superuser. Probably the "hdfs" user itself.

The hint can be seen here:

UserGroupInformation:  PriviledgedActionException as:root cause:java

Another thing to consider: You really want to move your hdfs root to something other than /tmp. You will risk losing your hdfs contents when /tmp is cleaned (which could happen any time)

UPDATE based on OP comments.

RE: JobTracker unable to contact NameNode: Please do not skip steps.

  • First make sure you format the NameNode
  • Then start the NameNode and DataNodes
  • Run some basic HDFS commands such as

    hdfs dfs -put

and

hdfs dfs -get
  • Then you can start the JobTracker and TaskTracker
  • Then (and not earlier) you can try to run some MapReduce job (which uses hdfs)
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560
  • dedicated user solved it, but i am struk up with below error any inputs ...**org.apache.hadoop.mapred.JobTracker: Problem connecting to HDFS Namenode... re-trying** – Surya Jun 19 '14 at 06:43
  • You are skipping steps. I am updating my answer. Please refer to my updated answer about steps you need to follow. – WestCoastProjects Jun 19 '14 at 06:44
  • Here is the error log , 2014-06-19 12:06:11,781 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:root cause:java.net.ConnectException: Call to localhost/127.0.0.1:9099 failed on connection exception: java.net.ConnectException: Connection refused 2014-06-19 12:06:11,782 INFO org.apache.hadoop.mapred.JobTracker: Problem connecting to HDFS Namenode... re-trying – Surya Jun 19 '14 at 06:48
  • 1
    Yes, you are not ready to start the JobTracker yet - the NameNode/hdfs are not set up and started properly. – WestCoastProjects Jun 19 '14 at 06:49
  • Can you advise what needs to be corrected , which file needs to be changed ? – Surya Jun 19 '14 at 06:51
  • 1
    Pls refer to the steps indicated in my updated answer. Each of those steps are amply documented in hadoop docs: I will not try to cover them here. – WestCoastProjects Jun 19 '14 at 06:52
0

1) Please run "jps" in console and show what it outputs
2) Please provide core-site.xml (I think you might have wrong fs.default.name)

0

Concerning this error:

Re-format filesystem in /tmp/hadoop-root/dfs/name ? (Y or N) y
Format aborted in /tmp/hadoop-root/dfs/name

You need to use a capital Y, not a lowercase y in order for it to accept the input and actually do the formatting.

shutch
  • 197
  • 1
  • 1
  • 10