From 7255b7847e267d7893119cfa5a64232fc4d0ddf5 Mon Sep 17 00:00:00 2001 From: Amnon Heiman Date: Tue, 22 Sep 2015 10:14:03 +0300 Subject: [PATCH] JMX run scripts: Set the rmi port to listen on the jmx port This set the rmi port to listen on the jmx port, so the java will not choose a random port for it. Signed-off-by: Amnon Heiman Signed-off-by: Pekka Enberg --- dist/redhat/scripts/jmx_run | 2 +- scripts/scylla-jmx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/redhat/scripts/jmx_run b/dist/redhat/scripts/jmx_run index 3d5e825..22c5762 100755 --- a/dist/redhat/scripts/jmx_run +++ b/dist/redhat/scripts/jmx_run @@ -1,5 +1,5 @@ #!/bin/sh -e -args="-Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.port=$JMX_LOCAL_PORT -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" +args="-Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.port=$JMX_LOCAL_PORT -Dcom.sun.management.jmxremote.rmi.port=$JMX_LOCAL_PORT -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" exec /usr/lib/jvm/jre-1.8.0/bin/java $args -jar /usr/lib/scylla/jmx/urchin-mbean-1.0.jar diff --git a/scripts/scylla-jmx b/scripts/scylla-jmx index be66cf3..5e489b7 100755 --- a/scripts/scylla-jmx +++ b/scripts/scylla-jmx @@ -62,4 +62,4 @@ do esac done -java -Dapiaddress=$API_ADDR -Dapiport=$API_PORT -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=$JMX_PORT -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar $LOCATION/urchin-mbean-1.0.jar +java -Dapiaddress=$API_ADDR -Dapiport=$API_PORT -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=$JMX_PORT -Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar $LOCATION/urchin-mbean-1.0.jar