Pekka Enberg
02e0598506
APIClient: Fix error handling if connection to API server fails
Running 'nodetool status' now reports the following if the JMX proxy is not able to connect to an API server: nodetool: Unable to connect to Scylla API server: java.net.ConnectException: Connection refused See 'nodetool help' or 'nodetool help <command>'. instead of the scary-looking: error: javax.ws.rs.ProcessingException (no security manager: RMI class loader disabled) -- StackTrace -- java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:393) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:185) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:214) That happens because the MBean propagates a 'javax.ws.rs.ProcessingException' to nodetool which does not have it in it's classpath and loading via RMI fails. Fixes #25. Message-Id: <1457697628-31792-1-git-send-email-penberg@scylladb.com>
Urchin JMX Interface
This is the JMX interface for Scylla
Compile
To compile do:
mvn install
Run
The maven will create an uber-jar with all dependency under the target directory. You should run it with the remote jmx enable so the nodetool will be able to connect to it.
java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar target/scylla-jmx-1.0.jar
Setting IP and Port
By default the the JMX would connect to a node on the localhost on port 10000.
The jmx API uses the system properties to set the IP address and Port. To change the ip address use the apiaddress property (e.g. -Dapiaddress=1.1.1.1) To change the port use the apiport (e.g. -Dapiport=10001)
Description
Languages
Java
92.4%
Python
4.5%
Shell
3.1%