Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ccm json - Couldn't change permissions to use sstable2json #610

Open
dins2k2 opened this issue Jul 25, 2017 · 11 comments
Open

ccm json - Couldn't change permissions to use sstable2json #610

dins2k2 opened this issue Jul 25, 2017 · 11 comments

Comments

@dins2k2
Copy link

dins2k2 commented Jul 25, 2017

Getting this error while trying to see the json output of a sstable.

ccm node1 json -k test -c test "C:\Users\user1\Desktop\testjson.txt"

running
WARN: Couldn't change permissions to use sstable2json.
WARN: If it didn't work, you will have to do so manually.
['C:\Users\user1\.ccm\c2\node1\data0\test\test-71ff922070dc11e7864b5ff09c5396dc\mb-1-big-Data.db']
-- mb-1-big-Data.db -----
Traceback (most recent call last):
File "E:\Studies\Cassandra\ccm\ccm-master\ccm.py", line 74, in
cmd.run()
File "E:\Studies\Cassandra\ccm\ccm-master\ccmlib\cmds\node_cmds.py", line 487, in run
enumerate_keys=self.options.enumerate_keys)
File "E:\Studies\Cassandra\ccm\ccm-master\ccmlib\node.py", line 885, in run_sstable2json
subprocess.call(args, env=env, stdout=out_file)
File "C:\Program Files\Python27\lib\subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Program Files\Python27\lib\subprocess.py", line 710, in init
errread, errwrite)
File "C:\Program Files\Python27\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

Python 2.7, Windows 10

Thanks,
Dinesh

@ptnapoleon
Copy link
Contributor

What version of Cassandra is your ccm cluster?

@dins2k2
Copy link
Author

dins2k2 commented Jul 26, 2017

C* version 3.7

@ptnapoleon
Copy link
Contributor

Cassandra 3.7 doesn't have sstable2json anymore, you'll want to use sstabledump. I'll change the command to print a warning to the user, when they try to run ccm node json on a cluster w/o the tool.

@dins2k2
Copy link
Author

dins2k2 commented Jul 26, 2017

I see ccm command shows

json - Call sstable2json/sstabledump on the sstables of this node

I do see the sstabledump tool under C:\Users\user1\.ccm\repository\3.7\tools\bin, still not getting the json output of a sstable.

But, I don't see the sstabledump tool under C:\Users\user1\.ccm\c2\node1\bin
Am I missing something?

@ptnapoleon
Copy link
Contributor

Okay, I see the issue now. ccm should be trying to run sstabledump out of .ccm\repository\3.7\tools\bin if sstable2json does not exist. The check if sstable2json exists, must be flawed in some way on Windows.

@dins2k2
Copy link
Author

dins2k2 commented Jul 27, 2017

I don't see sstable2json under .ccm\repository\3.7\tools\bin since it's been deprecated. So, it should try running with sstabledump.
Are you planning fix this?

@ptnapoleon
Copy link
Contributor

I don't see sstable2json under .ccm\repository\3.7\tools\bin since it's been deprecated. So, it should try running with sstabledump.

Yes, I agree, sorry if I was unclear.

Are you planning fix this?

It's a valid bug that should be fixed, but since it seems to only happen on Windows, and I don't have a windows box at the moment, it's not something I'm going to personally fix anytime soon. I would review/merge a PR that fixed it though, and will be keeping this issue open.

@dins2k2
Copy link
Author

dins2k2 commented Jul 28, 2017

Thanks Philip!

I copied the old C* version's (2.2.8) sstable2json files(sstable2json, sstable2json.bat) into .ccm\repository\3.7\tools\bin and tried running the ccm node json command, it worked.

I will consider this as a temporary workaround till you fix it.

@ptnapoleon
Copy link
Contributor

I think the better workaround is just to run sstabledump directly. There's no guarantee that sstable2json will work on a post 3.0 cluster.

@dins2k2
Copy link
Author

dins2k2 commented Jul 31, 2017

Ok. I know it's a silly question. How should I run sstabledump directly through ccm on windows?

@ptnapoleon
Copy link
Contributor

As you said in your original comment, the tool can be found at C:\Users\user1\.ccm\repository\3.7\tools\bin\sstabledump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants