Address already in use: bind: Service 'SparkUI' failed after 16 retries

运行时报错,Address already in use: bind: Service 'SparkUI' failed after 16 retries (starting from 4040)! 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.修改为SparkSession.builder().config("spark.port.maxRetries",128)后依旧报错,只是16变成128,查询站内资料也是添加这个语句,但是我依然运行不了求解

亲亲,bug信息说端口被占用了,你的4040已经再运行一个服务,所以重新分配端口号,比如下面分配5051或者11111.

spark-submit --conf spark.ui.port=5051 <other arguments>`<br>`spark-shell --conf spark.ui.port=5051
spark-shell -c spark.ui.port=11111