title: Apache Spark: workers are connected and free, but do not accept tasks
body: <p>I have a simple Spark cluster - one master, and one slave. Worker is free and has no busy resources.</p>
  
  <p><a href="http://i.stack.imgur.com/u3Mio.png" rel="nofollow">Web UI screenshot</a></p>
  
  <p>But when I try execute any application (e.g. 'sc.parallelize(1 to 10).foreach(println)' in spark-shell) I see the following error:</p>
  
  <pre><code>WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
  </code></pre>
  
  <p>However when application is launched at the same server as the slave, it runs successfully. Looks like somethings listens a wrong network interface. </p>
  
  <p>The configuration is default, cloned with spark from <a href="https://github.com/apache/spark" rel="nofollow">github</a>.</p>
  
  <p>I start master the following way:</p>
  
  <pre><code>192.168.111.204@spark &gt; ./sbin/start-master.sh -h 192.168.111.204
  </code></pre>
  
  <p>slave:</p>
  
  <pre><code>192.168.111.230@spark &gt; ./sbin/start-slave.sh  spark://192.168.111.204:7077 -h 192.168.111.230
  </code></pre>
  
  <p>application:</p>
  
  <pre><code>192.168.111.229@spark &gt; ./bin/spark-shell --master spark://192.168.111.204:7077
  </code></pre>
  
  <p>What should I check?</p>
  
  <p>UPD: just tried the same with two virtual machines. Works fine. Maybe servers have some problems with hostnames.</p>