title: Spark cluster submission can't bind to slave address
body: <pre><code>ERROR netty.NettyTransport: failed to bind to spark.master/172.28.128.3:0, shutting down Netty transport
  15/03/16 04:08:50 WARN util.Utils: Service 'Driver' could not bind on port 0. Attempting port 1.
  </code></pre>
  
  <p>That ^^^ is the error that I'm getting from my slave log. I'm submitting my job with spark-submit. This makes no sense since the slaves are able to connect to the master as shown in the web-ui. I thought I've configured the correct ports as shown bellow are my configurations on all machines.</p>
  
  <p>Spark-Env.sh</p>
  
  <pre><code>export SPARK_LOCAL_IP=$(ip addr  | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
  export SPARK_MASTER_IP=spark.master
  export HADOOP_CONF_DIR=/usr/local/hadoop/etc/hadoop
  export SPARK_WORKER_PORT=9919
  </code></pre>
  
  <p>Spark-Defaults.Conf</p>
  
  <pre><code>spark.master                        spark://spark.master:7077
  spark.eventLog.enabled              true
  spark.eventLog.dir                  hdfs://spark.master:8020/spark-log
  spark.yarn.submit.file.replication  3
  spark.app.name                      quant
  spark.ui.port                       4040
  spark.driver.port                   9929
  spark.executor.port                 9939
  spark.driver.host                   spark.slave
  </code></pre>
  
  <p>This on my slave and master nodes. When I submit a job, I'm using the bash command =></p>
  
  <pre><code>/usr/local/spark/bin/spark-submit --class dev.quant.App --deploy-mode cluster hdfs:///spark/my-app.jar
  </code></pre>
  
  <p>spark-env.sh and spark-defaults.conf are chmod 775 so they should be running.</p>
  
  <p>The log from my master is:</p>
  
  <pre><code>15/03/16 04:08:51 INFO master.Master: Removing driver: driver-20150316040848-0002
  15/03/16 04:08:54 INFO master.Master: akka.tcp://driverClient@spark.master:55303 got disassociated, removing it.
  15/03/16 04:08:54 WARN remote.ReliableDeliverySupervisor: Association with remote system [akka.tcp://driverClient@spark.master:55303] has failed, address is now gated for [5000] ms. Reason is: [Disassociated].
  15/03/16 04:08:54 INFO master.Master: akka.tcp://driverClient@spark.master:55303 got disassociated, removing it.
  15/03/16 04:08:54 INFO actor.LocalActorRef: Message [akka.remote.transport.ActorTransportAdapter$DisassociateUnderlying] from Actor[akka://sparkMaster/deadLetters] to Actor[akka://sparkMaster/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2FsparkMaster%40172.28.128.3%3A32995-5#678153583] was not delivered. [3] 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'.
  </code></pre>
  
  <p>From what I heard, launching in cluster mode is not supported, which makes no sense to me since standalone spark is supposed to be a cluster solution. So I've also tried launching in client mode which gives me ClassNotFoundException: dev.quant.App which makes no sense to me since my jar clearly has it + all dependencies are packed together as denoted in the assembly. I've been trying to get this stupid thing set up for too long and it would be nice to have a break. Lastly I have scala 2.10.5 installed and my app is packaged with 2.10.5 if that matters.</p>