title: Unable to initialize spark context using java
body: <p>i am trying a simple work count program using spark , but its fails when i try to initialize spark context.
  Below is my code </p>
  
  <pre><code>conf = new SparkConf(true).
                  setAppName("WordCount").
                  setMaster("spark://192.168.0.104:7077");
  
          sc = new JavaSparkContext(conf);
  </code></pre>
  
  <p>Now few things i wanted to clarify  i am using Spark version 2.1.1 , my java code is on windows  10 and my server is running on VM box.
  I have disabled firewall in VM and can access URL <a href="http://192.168.0.104:8080/" rel="nofollow noreferrer">http://192.168.0.104:8080/</a> from windows.</p>
  
  <p>However i am getting below stacktrace when running the code</p>
  
  <pre><code>17/08/06 18:44:15 INFO SparkUI: Bound SparkUI to 0.0.0.0, and started at http://192.168.0.103:4040
  17/08/06 18:44:15 INFO StandaloneAppClient$ClientEndpoint: Connecting to master spark://192.168.0.104:7077...
  17/08/06 18:44:15 INFO TransportClientFactory: Successfully created connection to /192.168.0.104:7077 after 41 ms (0 ms spent in bootstraps)
  17/08/06 18:44:15 WARN StandaloneAppClient$ClientEndpoint: Failed to connect to master 192.168.0.104:7077
  org.apache.spark.SparkException: Exception thrown in awaitResult
      at org.apache.spark.rpc.RpcTimeout$$anonfun$1.applyOrElse(RpcTimeout.scala:77)
      at org.apache.spark.rpc.RpcTimeout$$anonfun$1.applyOrElse(RpcTimeout.scala:75)
      at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)
      at org.apache.spark.rpc.RpcTimeout$$anonfun$addMessageIfTimeout$1.applyOrElse(RpcTimeout.scala:59)
      at org.apache.spark.rpc.RpcTimeout$$anonfun$addMessageIfTimeout$1.applyOrElse(RpcTimeout.scala:59)
  </code></pre>
  
  <p>Can some one help ?</p>