Spark2-shell error message while launching shell

When i am launching spark2-shell using webconsole , i am getting the below error message

Error Message : Address already in use: Service ‘SparkUI’ failed after 16 retries (starting from 4040)! Consider explicitly setting the appropriate port for the service ‘SparkUI’ (for e
xample spark.ui.port for SparkUI) to an available port or increasing spark.port.maxRetries.
at Method)

Learn Spark 1.6.x or Spark 2.x on our state of the art big data labs

  • Click here for access to state of the art 13 node Hadoop and Spark Cluster

@dilipmantena Use below command to launch spark-shell:

spark2-shell --master yarn --conf spark.ui.port=12335

Thank you annapurna for the quick response