title: ERROR security.UserGroupInformation: PriviledgedActionException as:hdfs
body: <p>This error is observed when the i try to run "sudo -u hdfs  hadoop jar /usr/lib/hadoop-0.20-mapreduce/hadoop-examples.jar grep input output 'dfs[a-z.]+'" </p>
  
  <pre><code>    ERROR security.UserGroupInformation: PriviledgedActionException as:hdfs (auth:SIMPLE) cause:java.net.ConnectException: Call From vagrant-centos64.vagrantup.com/127.0.0.1 to localhost:8021 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
          java.net.ConnectException: Call From vagrant-centos64.vagrantup.com/127.0.0.1 to localhost:8021 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:534)
              at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:782)
              at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:729)
              at org.apache.hadoop.ipc.Client.call(Client.java:1242)
              at org.apache.hadoop.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:225)
              at org.apache.hadoop.mapred.$Proxy10.getStagingAreaDir(Unknown Source)
              at org.apache.hadoop.mapred.JobClient.getStagingAreaDir(JobClient.java:1340)
              at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:102)
              at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:954)
              at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:948)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:416)
              at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
              at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:948)
              at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:922)
              at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1384)
              at org.apache.hadoop.examples.Grep.run(Grep.java:69)
              at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
              at org.apache.hadoop.examples.Grep.main(Grep.java:93)
              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:622)
              at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:72)
              at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:144)
              at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64)
              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:622)
              at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
          Caused by: java.net.ConnectException: Connection refused
              at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
              at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:601)
              at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:207)
              at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:528)
              at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:492)
              at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:510)
              at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:604)
              at org.apache.hadoop.ipc.Client$Connection.access$2100(Client.java:252)
              at org.apache.hadoop.ipc.Client.getConnection(Client.java:1291)
              at org.apache.hadoop.ipc.Client.call(Client.java:1209)
              ... 27 more
  </code></pre>