Error while launching spark shell


#1

Unable to launch spark-shell

ERROR SparkUI: Failed to bind SparkUI
java.net.BindException: Address already in use: Service ‘SparkUI’ failed after 16 retries! Consider explicitly setting the appropriate port for the service ‘SparkUI’ (for example spark.ui.port for SparkUI) to an available port or increasing spark.port.maxRetries.

Please check.


#2

@respond474

You can resolve it either following any one of following solutions:

Solution-1: Set Spark UI Port explicitly as shown below

spark-shell --conf “spark.ui.port=10101”
//Here we are explicitly setting spark ui port to some random port which is not in use and in above example I chosen 10101 but you can choose any proper port number

Solution-2: Increase spark.port.maxRetries as shown below

spark-shell --conf “spark.port.maxRetries=100”
//Here we are setting spark.port.maxRetries to 100 so it will try maximum of 100 instead of 16 to find some unused port


#3

thank you !! its working


#4