spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject spark git commit: [SPARK-13810][CORE] Add Port Configuration Suggestions on Bind Exceptions
Date Sun, 13 Mar 2016 10:18:32 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.6 db4795a7e -> 5e08db30d


[SPARK-13810][CORE] Add Port Configuration Suggestions on Bind Exceptions

## What changes were proposed in this pull request?
Currently, when a java.net.BindException is thrown, it displays the following message:

java.net.BindException: Address already in use: Service '$serviceName' failed after 16 retries!

This change adds port configuration suggestions to the BindException, for example, for the
UI, it now displays

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

## How was this patch tested?
Manual tests

Author: Bjorn Jonsson <bjornjon@gmail.com>

Closes #11644 from bjornjon/master.

(cherry picked from commit 515e4afbc7ec957609451ea75772d6ef1b914908)
Signed-off-by: Sean Owen <sowen@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5e08db30
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5e08db30
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5e08db30

Branch: refs/heads/branch-1.6
Commit: 5e08db30d55a6be8996d9de452720f9a465ebcc5
Parents: db4795a
Author: Bjorn Jonsson <bjornjon@gmail.com>
Authored: Sun Mar 13 10:18:24 2016 +0000
Committer: Sean Owen <sowen@cloudera.com>
Committed: Sun Mar 13 10:18:43 2016 +0000

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/util/Utils.scala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/5e08db30/core/src/main/scala/org/apache/spark/util/Utils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala
index 7cedbbb..93b756d 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -2028,8 +2028,10 @@ private[spark] object Utils extends Logging {
       } catch {
         case e: Exception if isBindCollision(e) =>
           if (offset >= maxRetries) {
-            val exceptionMessage =
-              s"${e.getMessage}: Service$serviceString failed after $maxRetries retries!"
+            val exceptionMessage = s"${e.getMessage}: Service$serviceString failed after
" +
+              s"$maxRetries retries! Consider explicitly setting the appropriate port for
the " +
+              s"service$serviceString (for example spark.ui.port for SparkUI) to an available
" +
+              "port or increasing spark.port.maxRetries."
             val exception = new BindException(exceptionMessage)
             // restore original stack trace
             exception.setStackTrace(e.getStackTrace)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message