Skip to content

Commit cb8cc76

Browse files
committed
do not use port 1 - 1024
1 parent c5414b6 commit cb8cc76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,7 @@ private[spark] object Utils extends Logging {
14371437
val serviceString = if (serviceName.isEmpty) "" else s" '$serviceName'"
14381438
for (offset <- 0 to maxRetries) {
14391439
// Do not increment port if startPort is 0, which is treated as a special port
1440-
val tryPort = if (startPort == 0) startPort else (startPort + offset) % 65536
1440+
val tryPort = if (startPort == 0) startPort else (startPort + offset) % (65536 - 1024) + 1024
14411441
try {
14421442
val (service, port) = startService(tryPort)
14431443
logInfo(s"Successfully started service$serviceString on port $port.")

0 commit comments

Comments
 (0)