tbarbugli / cassandra_snapshotter

A tool to backup cassandra nodes using snapshots and incremental backups on S3
Other
222 stars 122 forks source link

schema backup fails if cassandra rpc_address is not localhost #116

Open dan-tcell opened 6 years ago

dan-tcell commented 6 years ago

I'm not sure why we've got it set up this way (likely extra security) but in cassandra.yaml we have rpc_address set to the FQDN hostname, ie. foo.bar.com. So if I say cqlsh alone it fails, but cqlsh foo.bar.com works.

As part of the tool I'm trying to dump the schema, which fails because it assumes cqlsh talks to localhost:

`[foo4] Executing task 'clear_node_snapshot' [foo4] run: /usr/bin/nodetool clearsnapshot -t "20170927222103" [foo4] out: Requested clearing snapshot(s) for [all keyspaces] with snapshot name [20170927222103] [foo4] out:

[foo4] run: /usr/bin/nodetool ring [foo4] run: echo 'DESCRIBE SCHEMA;' | /usr/bin/cqlsh

Fatal error: run() received nonzero return code 1 while executing!

Requested: echo 'DESCRIBE SCHEMA;' | /usr/bin/cqlsh Executed: /bin/bash -l -c "echo 'DESCRIBE SCHEMA;' | /usr/bin/cqlsh"

===================================================================================================================== Standard output =====================================================================================================================

Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

==================================================================================================================================================================`

Perhaps there should be a cassandra_snapshotter setting that allows you to specific the rpc_address? I'm not sure why it's not already looking for that info since it knows about cassandra.yaml (I also tested setting --cassandra-conf-path explicitly, it made no difference).