DataStax Help Center

Setting SPARK_LOCAL_IP is not advised in DSE 4.5-4.8


There is a bug in the Spark project SPARK–12963 where the SPARK_LOCAL_IP set in the resulted in an inability to successfully complete jobs when using the flag --deploy-mode cluster when submitting jobs.


Often as a workaround to the following error one will set SPARK_LOCAL_IP

Exception in thread "main" Failed to bind to: / <>: Service 'Driver' failed after 16 retries!

however this breaks the --deploy-mode cluster flag and will make errors like the following occur:

Exception in thread "main" Failed to bind to: / <>: Service 'sparkDriver' failed after 16 retries!


Cluster mode unfortunately uses the SPARK_LOCAL_IP to bind the driver to the that IP, which can result in an incorrect setting if the driver does not happen to start on that node. This is not an intended behavior but affects all versions of Spark running the standalone scheduler up to 1.6.0.


So the workaround to all this is pretty simple:

Never ever set SPARK_LOCAL_IP until there is a fix for SPARK–12963
For all other commands pass the appropriate IP address, this is more effort but it just works:

  • dse spark-submit –deploy-mode client –conf <routeable ip>
  • dse spark –master spark://<master ip you want>:7077
  • dse spark-sql –master spark://<master ip you want>:7077
  • dse spark-submit --deploy-mode cluster  # don't have to pass with --deploy-mode cluster


Pending. Once the Spark project has fixed SPARK-12963 a later release of DSE can incorporate this.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk