Coder Social home page Coder Social logo

Comments (3)

adejanovski avatar adejanovski commented on August 27, 2024 1

This can be overriden in the configuration file, where you can provide your own stop/start commands.
We usually don't care about properly draining the nodes because we're going to replace all the data anyway, which is why a "dirty" stop is fine, but I agree that the service should be stopped so you don't need to stop/start it again.
We're using /etc/init.d/cassandra start because we need to enforce the tokens in some cases, and pass them using a JVM flag. I guess we could workaround this by modifying the cassandra-env.sh file instead, although that could be a problem to some folks. We need to give this some thoughts.

It's interesting that /etc/init.d/cassandra stop returns before the node is actually down. Looks like we need a bit more checks to make sure it is down before proceeding with the cleanup and restore tasks.

from cassandra-medusa.

sandeepmallik avatar sandeepmallik commented on August 27, 2024

@adejanovski Yes. Something like fetch PID of cassandra, stop cassandra and make sure PID doesn't exist.

root@ubuntu:# CassPid=$(pgrep -f cassandra)
root@ubuntu:# echo $CassPid
1376

from cassandra-medusa.

sandeepmallik avatar sandeepmallik commented on August 27, 2024

@adejanovski After stopping cassandra, added sleep to fix it. This may not be right solution but works for me.

restore_node.py
logging.info('Waiting for cassandra to stop. Sleeping for 10 seconds')
time.sleep(10)

Also, verify with CQL is not working properly. It should be due to medusa is not waiting for CQL native transport port (9042) to be available before running select query. I added sleep(20) after cassandra starts then verify worked.

[2020-02-13 04:30:28,983] INFO: Executing restore verify query: select * from tutorialspoint.emp;
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/medusa/cassandra_utils.py", line 84, in new_session raise Exception('Could not establish CQL session after {attempts}'.format(attempts=attempts)) Exception: Could not establish CQL session after 5

from cassandra-medusa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.