2/23/2014

Cassandra: ReflectionException: Signature mismatch for operation forceRepairAsync

When running nodetool -h somewherelse you may encounter the above exception:
Exception in thread "main" java.io.IOException: java.lang.reflect.UndeclaredThrowableException
at org.apache.cassandra.tools.NodeProbe.forceRepairAsync(NodeProbe.java:230)
at org.apache.cassandra.tools.NodeCmd.optionalKSandCFs(NodeCmd.java:1502)
at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:1221)
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy0.forceRepairAsync(Unknown Source)
at org.apache.cassandra.tools.RepairRunner.repairAndWait(NodeProbe.java:1019)
at org.apache.cassandra.tools.NodeProbe.forceRepairAsync(NodeProbe.java:225)
... 2 more
Caused by: javax.management.ReflectionException: Signature mismatch for operation forceRepairAsync: (java.lang.String, boolean, java.util.Collection, boolean, [Ljava.lang.String;) should be (java.lang.String, boolean, boolean, boolean, [Ljava.lang.String;)
at com.sun.jmx.mbeanserver.PerInterface.noSuchMethod(PerInterface.java:170)
view raw exception.sh hosted with ❤ by GitHub
This exception was thrown because there is a Cassandra version mismatch between from where you ran this command and the Cassandra version installed on somewhereelse. The installed version can be verified with:
# On host 1 (from where "nodetool -h somewhereelse" was run)
ls -ls /usr/share/cassandra/*.jar
3304 -rw-r--r-- 1 cassandra cassandra 3380834 Jan 13 21:12 /usr/share/cassandra/apache-cassandra-2.0.4.jar
0 lrwxrwxrwx 1 cassandra cassandra 26 Jan 13 21:12 /usr/share/cassandra/apache-cassandra.jar -> apache-cassandra-2.0.4.jar
1816 -rw-r--r-- 1 cassandra cassandra 1855571 Jan 13 21:12 /usr/share/cassandra/apache-cassandra-thrift-2.0.4.jar
80 -rw-r--r-- 1 cassandra cassandra 78965 Jan 13 21:12 /usr/share/cassandra/stress.jar
# On host 2 (somewhereelse)
ls -ls /usr/share/cassandra/*.jar
3192 -rw-r--r-- 1 cassandra cassandra 3265362 Sep 5 20:26 /usr/share/cassandra/apache-cassandra-2.0.0.jar
0 lrwxrwxrwx 1 cassandra cassandra 26 Sep 5 20:26 /usr/share/cassandra/apache-cassandra.jar -> apache-cassandra-2.0.0.jar
1660 -rw-r--r-- 1 cassandra cassandra 1695791 Sep 5 20:26 /usr/share/cassandra/apache-cassandra-thrift-2.0.0.jar
80 -rw-r--r-- 1 cassandra cassandra 78552 Sep 5 20:26 /usr/share/cassandra/stress.jar
view raw cassandra.sh hosted with ❤ by GitHub
So the solution is simply to install the same Cassandra version on both node.
« »
 
 
Made with on a hot august night from an airplane the 19th of March 2017.