nodetool stopdaemon errors out

patch by Robert Stupp; reviewed by Alex Petrov for CASSANDRA-12646
This commit is contained in:
Robert Stupp 2016-10-13 15:18:56 +02:00 committed by Robert Stupp
parent 7a274dd36c
commit 6c6407411f
3 changed files with 13 additions and 4 deletions

View File

@ -1,4 +1,5 @@
3.0.10
* nodetool stopdaemon errors out (CASSANDRA-12646)
* Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
* mx4j does not work in 3.0.8 (CASSANDRA-12274)
* Abort cqlsh copy-from in case of no answer after prolonged period of time (CASSANDRA-12740)

View File

@ -25,6 +25,7 @@ import java.lang.management.MemoryUsage;
import java.lang.management.RuntimeMXBean;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.rmi.ConnectException;
import java.rmi.server.RMIClientSocketFactory;
import java.rmi.server.RMISocketFactory;
import java.util.AbstractMap;
@ -224,7 +225,7 @@ public class NodeProbe implements AutoCloseable
mbeanServerConn, ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class);
}
private RMIClientSocketFactory getRMIClientSocketFactory() throws IOException
private RMIClientSocketFactory getRMIClientSocketFactory()
{
if (Boolean.parseBoolean(System.getProperty("ssl.enable")))
return new SslRMIClientSocketFactory();
@ -234,7 +235,15 @@ public class NodeProbe implements AutoCloseable
public void close() throws IOException
{
jmxc.close();
try
{
jmxc.close();
}
catch (ConnectException e)
{
// result of 'stopdaemon' command - i.e. if close() call fails, the daemon is shutdown
System.out.println("Cassandra has shutdown.");
}
}
public int forceKeyspaceCleanup(int jobs, String keyspaceName, String... tables) throws IOException, ExecutionException, InterruptedException

View File

@ -37,6 +37,5 @@ public class StopDaemon extends NodeToolCmd
JVMStabilityInspector.inspectThrowable(e);
// ignored
}
System.out.println("Cassandra has shutdown.");
}
}
}