Runnning Spark on cluster: Initial job has not accepted any resources
<ol>
<li>I have a remote Ubuntu server on <a href="http://linode.com" rel="nofollow noreferrer">linode.com</a> with 4 cores and 8G RAM</li>
<li>I have a Spark-2 cluster consisting of 1 master and 1 slave on my remote Ubuntu server.</li>
<li><p>I have started PySpark shell locally on my MacBook, connected to my master node on remote server by:</p>

<pre><code>$ PYSPARK_PYTHON=python3 /vagrant/spark-2.0.0-bin-hadoop2.7/bin/pyspark --master spark://[server-ip]:7077
</code></pre></li>
<li><p>I tried executing simple Spark example from website:</p>

<pre class="lang-py prettyprint-override"><code>from pyspark.sql import SparkSession

spark = SparkSession \
    .builder \
    .appName("Python Spark SQL basic example") \
    .config("spark.some.config.option", "some-value") \
    .getOrCreate()
df = spark.read.json("/path/to/spark-2.0.0-bin-hadoop2.7/examples/src/main/resources/people.json")
</code></pre></li>
<li><p>I have got error</p>

<blockquote>
  <p>Initial job has not accepted any resources; check your cluster UI to
  ensure that workers are registered and have sufficient resources</p>
</blockquote></li>
<li><p>I have enough memory on my server and also on my local machine, but I am getting this weird error again and again. I have 6G for my Spark cluster, my script is using only 4 cores with 1G memory per node. </p>

<p>[<img src="https://i.stack.imgur.com/Xxm35.png" alt="Spark admin screenshot]"></p></li>
<li><p>I have Googled for this error and tried to setup different memory configs, also disabled firewall on both machines, but it does not helped me. I have no idea how to fix it.</p></li>
<li><p>Is someone faced the same problem? Any ideas?</p></li>
</ol>