jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1822898 - /jmeter/trunk/src/core/org/apache/jmeter/rmi/SSLRMIServerSocketFactory.java
Date Thu, 01 Feb 2018 19:36:53 GMT
Author: fschumacher
Date: Thu Feb  1 19:36:53 2018
New Revision: 1822898

URL: http://svn.apache.org/viewvc?rev=1822898&view=rev
Log:
Catch BindException and add the used address to get more information
why nightly builds are not completing.

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/rmi/SSLRMIServerSocketFactory.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/rmi/SSLRMIServerSocketFactory.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/rmi/SSLRMIServerSocketFactory.java?rev=1822898&r1=1822897&r2=1822898&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/rmi/SSLRMIServerSocketFactory.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/rmi/SSLRMIServerSocketFactory.java Thu Feb  1
19:36:53 2018
@@ -21,6 +21,7 @@ package org.apache.jmeter.rmi;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.Serializable;
+import java.net.BindException;
 import java.net.InetAddress;
 import java.net.ServerSocket;
 import java.rmi.server.RMIServerSocketFactory;
@@ -130,8 +131,13 @@ public class SSLRMIServerSocketFactory i
                     "Unable to obtain SSLServerSocketFactory for provided KeyStore");
         }
 
-        SSLServerSocket socket = (SSLServerSocket) factory
-                .createServerSocket(port, 0, localAddress);
+        SSLServerSocket socket;
+        try {
+            socket = (SSLServerSocket) factory
+                    .createServerSocket(port, 0, localAddress);
+        } catch (BindException e) {
+            throw new IOException("Could not bind to " + localAddress + " using port " +
port, e);
+        }
         socket.setNeedClientAuth(clientAuth);
         LOGGER.info("Created SSLSocket: {}", socket);
         return socket;



Mime
View raw message