title: Intermittent Timeout Exception using Spark
body: <p>I've a Spark cluster with 10 nodes, and I'm getting this exception after using the Spark Context for the first time:</p>
  
  <pre><code>14/11/20 11:15:13 ERROR UserGroupInformation: PriviledgedActionException as:iuberdata (auth:SIMPLE) cause:java.util.concurrent.TimeoutException: Futures timed out after [120 seconds]
  Exception in thread "main" java.lang.reflect.UndeclaredThrowableException: Unknown exception in doAs
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1421)
      at org.apache.spark.deploy.SparkHadoopUtil.runAsSparkUser(SparkHadoopUtil.scala:52)
      at org.apache.spark.executor.CoarseGrainedExecutorBackend$.run(CoarseGrainedExecutorBackend.scala:113)
      at org.apache.spark.executor.CoarseGrainedExecutorBackend$.main(CoarseGrainedExecutorBackend.scala:156)
      at org.apache.spark.executor.CoarseGrainedExecutorBackend.main(CoarseGrainedExecutorBackend.scala)
  Caused by: java.security.PrivilegedActionException: java.util.concurrent.TimeoutException: Futures timed out after [120 seconds]
      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:1408)
      ... 4 more
  </code></pre>
  
  <p>This <a href="https://stackoverflow.com/q/23884717/1791289">guy</a> have had a similar problem but I've already tried his solution and didn't worked.</p>
  
  <p>The same exception also happens <a href="http://mail-archives.apache.org/mod_mbox/spark-user/201409.mbox/%3CCAMc-71miSp8r-p1tnxEjharnRTUhf1RBtLu2aLzyhbgA042-0A@mail.gmail.com%3E" rel="nofollow noreferrer">here</a> but the problem isn't them same in here as I'm using spark version 1.1.0 in both master or slave and in client.</p>
  
  <p>I've tried to increase the timeout to 120s but it still doesn't solve the problem. </p>
  
  <p>I'm doploying the environment throught scripts and I'm using the context.addJar to include my code into the classpath.
  This problem is intermittend, and I don't have any idea on how to track why is it happening. Anybody has faced this issue when configuring a spark cluster know how to solve it?</p>