title: How to connect master and slaves in Apache-Spark? (Standalone Mode)
body: <p>I'm using <a href="https://spark.apache.org/docs/latest/spark-standalone.html">Spark Standalone Mode</a> tutorial page to install Spark in Standalone mode.</p>
  
  <p>1- I have started a master by:</p>
  
  <pre><code>./sbin/start-master.sh
  </code></pre>
  
  <p>2- I have started a worker by:</p>
  
  <pre><code>./bin/spark-class org.apache.spark.deploy.worker.Worker spark://ubuntu:7077
  </code></pre>
  
  <p>Note: <code>spark://ubuntu:7077</code> is my master name, which I can see it in <code>Master-WebUI</code>.</p>
  
  <p><strong>Problem:</strong> By second command, a worker started successfully. But it couldn't associate with master. It tries repeatedly and then give this message:</p>
  
  <pre><code>15/02/08 11:30:04 WARN Remoting: Tried to associate with unreachable    remote address [akka.tcp://sparkMaster@ubuntu:7077]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: Connection refused: ubuntu/127.0.1.1:7077
  15/02/08 11:30:04 INFO RemoteActorRefProvider$RemoteDeadLetterActorRef: Message [org.apache.spark.deploy.DeployMessages$RegisterWorker] from Actor[akka://sparkWorker/user/Worker#-1296628173] to Actor[akka://sparkWorker/deadLetters] was not delivered. [20] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
  15/02/08 11:31:15 ERROR Worker: All masters are unresponsive! Giving up.
  </code></pre>
  
  <p>What is the problem?</p>
  
  <p>Thanks</p>