I have an sstable file stored at /var/lib/cassandra/data/foo/bar/foo-bar-jb-1-Data.db, and I tried to read the contents of this file by running the following command:
$ sstable2json /var/lib/cassandra/data/foo/bar/foo-bar-jb-1-Data.db
However, the terminal simply hangs after issuing this command, even though the file is only 4k in size. Any ideas what could be the problem? I'm using cassandra 2.0.9.
Permissions maybe. The 2.x docs about the tool have been removed because sstable2json is deprecated. Here are the older docs: http://www.datastax.com/documentation/cassandra/1.2/cassandra/tools/toolsSStable2json_track_ttl_t.html
I had the same issue and running it from sudo worked for me. So it appears to be permission problem.
Related
I found interesting page in cassandra documentation:
https://docs.datastax.com/en/cassandra/3.0/cassandra/tools/toolsSjk.html
However, when I try it, I get
# nodetool sjk --commands
nodetool: Found unexpected parameters: [sjk, --commands]
See 'nodetool help' or 'nodetool help <command>'.
I suppose it's because in my standard cassandra 3.11.3 debian instalation the sjk is not installed. However, it seems the sjk is free tool:
https://github.com/aragozin/jvm-tools
Is it possible to install it in way it integrates with nodetool? How? Or is sjk already integrated and was it just renamed?
While still no idea how to integrate it with nodetool, for case someone who knows even less than me finds this, note that it can be used by downloading as sjk-plus-0.12.jar for example, then run like
java -jar sjk-plus-0.12.jar mxdump -s 127.0.01:7199 -q 'java.lang:type=GarbageCollector,name=*'
In Apache Cassandra sjk is not available with nodetool utility but available in datastax. you need to use sjk jar for the metrix and details.
We have installed open source scylla on redhat linux. After installation checking the logs but not able to find system.log file. In cassandra there is file called system.log where all logs are stored. but in scylla I can not see any log file. However I have configured the path in logback.xml.
Please help.
Scylla logs are written to the system journal.
Use the following to get them:
journalctl _COMM=scylla
More here https://docs.scylladb.com/getting-started/logging/
I came in to a situation in which I have to run a bash script lets say testbash.sh has the following lines:
#!/bin/bash
dse gremlin-console -i test.groovy
test.groovy file contains:
:remote config alias g cord.g
schema.describe()
The output of bash script testbash.sh is below
Error in /home/nithin/test.groovy at [2: schema.describe()] - No such property: schema for class: groovysh_evaluate.
Any clue will be greatly appreciated.
I can't seem to recreate your problem (at least on the latest version of 5.1.x). To troubleshoot, I think that you should first start dse gremlin-console without the -i and paste the commands from the script into the console and make sure that they return properly. If you get the same error, then you know that you can start looking into the problem from there without worrying about -i at all. Is cord.g initialized with a graph for a schema to be present?
If the commands work fine, then there must be something wrong with the console bootstrap that initializes it to work with the server on startup. The bootstrap script should be present in your DSE installation and is called dse-init.groovy. I would try pasting you commands into the bottom of that script and seeing if that solves your problem. If it does, then perhaps you have an older version of DSE because I do recall some changes in recent months for -i and -e handling that perhaps are related. I think that editing dse-init.groovy could be a reasonable workaround for you if you aren't able to upgrade for some reason.
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!
Im installing Cassandra 1.2.3 on debian using apt, I was previously using a tarball 1.1.7 install. After install i'm changing the partitioner from Murmur3Partitioner to RandomPartitioner in cassandra.yaml as follows:
partitioner: org.apache.cassandra.dht.RandomPartitioner
Then on starting i'm seeing incompatible system keyspace errors as follows:
ERROR 18:22:11,465 Cannot open /var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-1; partitioner org.apache.cassandra.dht.Murmur3Partitioner does not match system partitioner org.apache.cassandra.dht.RandomPartitioner. Note that the default partitioner starting with Cassandra 1.2 is Murmur3Partitioner, so you will need to edit that to match your old partitioner if upgrading.
Service exit with a return value of 1
How can I set the system keyspace to be RandomPartitioner? I have tried purging the data folder, apt-get remove, also apt-get purge then re-installing, changing to RandomPartitioner then starting cassandra but it is still failing. I've also replicated this on my ubuntu desktop so im thinking im doing something wrong here.
Any help is appreciated!
Cheers
Sam
The partitioner cannot be changed once Cassandra has started for the first time. This error is showing that the data directory was initialized with Murmur3Partitioner but you're starting it using RandomPartitioner.
If you're trying to upgrade your data from your 1.1 install, Cassandra isn't reading from the right place. Adjust your data directory to use your 1.1 directory and it should start with partitioner set to RandomPartitioner.
If you're trying to start with no data, stop Cassandra, remove /var/lib/cassandra/* and start it again. Note you need to remove the commitlog directory as well as the data directory.
I got a similar error as reported by Sam when I did a
[root#fedora user]# dse cassandra.
To correct the problem I did:
[root#fedora user]# vi /etc/dse/cassandra/cassandra.yaml
In the cassandra.yaml file made the following change
Commented out "# partitioner: org.apache.cassandra.dht.Murmur3Partitioner" and replaced it with "partitioner: org.apache.cassandra.dht.RandomPartitioner"
3. Saved the change in cassandra.yaml
Hope this helps.
Mayukh.