0

I'm running Cassandra 2.0.9 with Java 1.7.0 on Windows. I can run nodetool normally from the Windows command line, but I'm not able to run it from the Git Bash (directly from terminal or through a sh script) or Cygwin when running .sh files that call NodeTool (but otherwise can run it).

The exact error I get is: Error: Could not find or load main class org.apache.cassandra.tools.NodeCmd

I haven't done any kind of extra configuration outside of the recommended changes Datastax recommends, and I haven't had any other issues with Cassandra. I don't think I have any environment screw ups (but who knows what could be wrong). Has anyone else run into this issue before? Thanks!

cliffycheng
  • 381
  • 1
  • 4
  • 13
  • I can reproduce the same thing, but not sure exactly what is causing it. If near the top of nodetool you add a `set -x` line, then run again, you'll see how the Java classpath is assembled. I suspect the problem is in the mix of Windows and Unix/Linux paths (forward- and back-slashes). As a workaround I guess you could keep running Cassandra commands from a separate Cmd window. – BrianC Jan 13 '15 at 21:47
  • I get the feeling it's a weird mix of how I installed Cygwin/MinGW that's got my environment all messed up. When I get off work, will try this on my own personal machine that doesn't have anything installed besides Java, I have a feeling that it won't have any issues there. I was actually hoping to use nodetool through a sh script... Windows and Cassandra don't seem to mix all that well :( – cliffycheng Jan 13 '15 at 21:58
  • In my case I tried a clean install of Cassandra (DSC community edition with Windows installer), then Git Bash. The only extra config was to set JAVA_HOME inside the bash shell. – BrianC Jan 13 '15 at 22:40
  • I tried at home with tar.gz version of Cassandra 2.1.2 (not sure what to call it), Java 8, and a fresh download of Git Bash. I did no configurations whatsoever with Cassandra. Nodetool ran fine on Windows commandline, but failed on Git Bash. I couldn't even start Cassandra through Git Bash. Could it be an issue with Git Bash itself? Makes running shell script files on Windows a bit more annoying. – cliffycheng Jan 14 '15 at 00:48

0 Answers0