Skip to content

Commit 3a0e3f1

Browse files
committed
Add Port Configuration Suggestion on Bind Exceptions
1 parent 4d535d1 commit 3a0e3f1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/scala/org/apache/spark/util/Utils.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2014,8 +2014,10 @@ private[spark] object Utils extends Logging {
20142014
} catch {
20152015
case e: Exception if isBindCollision(e) =>
20162016
if (offset >= maxRetries) {
2017-
val exceptionMessage =
2018-
s"${e.getMessage}: Service$serviceString failed after $maxRetries retries!"
2017+
val exceptionMessage = s"${e.getMessage}: Service$serviceString failed after " +
2018+
s"$maxRetries retries! Consider explicitly setting the appropriate port for the " +
2019+
s"service$serviceString (for example spark.ui.port for SparkUI) to an available " +
2020+
"port or increasing spark.port.maxRetries."
20192021
val exception = new BindException(exceptionMessage)
20202022
// restore original stack trace
20212023
exception.setStackTrace(e.getStackTrace)

0 commit comments

Comments
 (0)