title: Ambari HDP 2.2: Port 8020 Connection refused
body: <p>So I have installed ambari over a cluster of three node AWS EC2 instances. All services show green, i.e., they all seem to be working fine. I can do all HDFS file operations. However, whenever I try to run a simple wordcount program on the instance, it says it cannot reach port 8020.</p>
  
  <pre><code>$ hadoop jar /usr/hdp/2.2.6.3-1/hadoop-mapreduce/hadoop-mapreduce-examples-2.6.0.2.2.6.3-1.jar wordcount  /tmp/wordcount/in /tmp/wordcount/out
  15/08/21 05:28:02 INFO impl.TimelineClientImpl: Timeline service address: http://&lt;fqdn for the namenode&gt;:8188/ws/v1/timeline/
  15/08/21 05:28:02 INFO client.RMProxy: Connecting to ResourceManager at &lt;fqdn for the namenode&gt;/10.0.0.55:8050
  java.io.FileNotFoundException: File does not exist: hdfs://&lt;fqdn for the namenode&gt;:8020/hdp/apps/2.2.6.3-1/mapreduce/mapreduce.tar.gz
      at org.apache.hadoop.fs.Hdfs.getFileStatus(Hdfs.java:137)
      at org.apache.hadoop.fs.AbstractFileSystem.resolvePath(AbstractFileSystem.java:460)
      at org.apache.hadoop.fs.FileContext$25.next(FileContext.java:2180)
      at org.apache.hadoop.fs.FileContext$25.next(FileContext.java:2176)
      at org.apache.hadoop.fs.FSLinkResolver.resolve(FSLinkResolver.java:90)
      at org.apache.hadoop.fs.FileContext.resolve(FileContext.java:2176)
      at org.apache.hadoop.fs.FileContext.resolvePath(FileContext.java:595)
      at org.apache.hadoop.mapreduce.JobSubmitter.addMRFrameworkToDistributedCache(JobSubmitter.java:753)
      at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:435)
      at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1296)
      at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1293)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:415)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
      at org.apache.hadoop.mapreduce.Job.submit(Job.java:1293)
      at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1314)
      at org.apache.hadoop.examples.WordCount.main(WordCount.java:87)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:71)
      at org.apache.hadoop.util.ProgramDriver.run(ProgramDriver.java:144)
      at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:74)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
  </code></pre>
  
  <p>The FQDN is the output of the command <code>hostname -f</code> which was used when creating the cluster.</p>
  
  <p>I have tried telnetting too, but there too connection refused.</p>
  
  <pre><code>bt-prod-dev-02@ip-10-0-0-55:~$  telnet localhost 8020
  Trying 127.0.0.1...
  telnet: Unable to connect to remote host: Connection refused
  </code></pre>
  
  <p>I am not sure where to look.</p>