stop cassandra server on mac os x

后端 未结 7 1092
走了就别回头了
走了就别回头了 2021-02-05 08:33

How do I stop cassandra server running on a single node in my mac os x? Cassandra script doesn\'t have -stop option. Only way other than restart the mac os x, was to do a \"ps\

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 09:03

    EDIT: I actually find this much more useful.

    Open terminal and type:

    $ ps -ax | grep cassandra

    gives you a list of pids running with the name cassandra.

    Use the PID number to kill the process for example here is a returned value: 708 ttys000 0:03.10 /usr/bin/java -ea -javaagent:Downloads/Web/Cassandra/dsc-cassandra-1.1.0/bin/

    $ kill 708


    Old post:

    After posting my comment I found a stop-server script in the BIN.

    You have to open up the script and comment out the code if you want to use that script. But here is what it says inside the script.

     echo "please read the stop-server script before use"
    
        # if you are using the cassandra start script with -p, this
        # is the best way to stop:
    
         kill `cat ` 
    
    
        # otherwise, you can run something like this, but
        # this is a shotgun approach and will kill other processes
        # with cassandra in their name or arguments too:
    
        # user=`whoami`
        # pgrep -u $user -f cassandra | xargs kill -9
    

提交回复
热议问题