I am new to cassandra but it seems the nodetool bootstrap command is not working.
huangg#cassandra-mpsre01-sjc1:~$ nodetool help bootstrap
Unknown command bootstrap
huangg#cassandra-mpsre01-sjc1:~$ nodetool bootstrap resume
nodetool: Found unexpected parameters: [bootstrap, resume]
See 'nodetool help' or 'nodetool help <command>'.
huangg#cassandra-mpsre01-sjc1:~$ nodetool help |grep bootstrap
rebuild Rebuild data by streaming from other nodes (similarly to bootstrap)
Is it a version issue?
[cqlsh 5.0.1 | Cassandra 2.1.9 | CQL spec 3.2.0 | Native protocol v3]
I want to use it because I want to resume a node after I decommission it. Right now, after I decommission a node, I have to stop cassandra service and then restart the cassandra service. I guess bootstrap can be used after the decommission command, to commission the node.
nodetool join is a different thing.
So there are two things here
1. First the commands which you specified don't seem correct.
For Bootstrap you can probably use the following link and see the correct syntax.
https://docs.datastax.com/en/cassandra/2.2/cassandra/tools/toolsBootstrap.html
Now after the node is decommissioned, you would want to rebuild it from another node and then work with it as the other nodes are working.
For that you can use nodetool rebuild.
https://docs.datastax.com/en/cassandra/2.1/cassandra/tools/toolsRebuild.html
Both are similar commands, but you can see which suits your scenario best and use accordingly.
nodetool bootstrap doesn't exist in c* 2.1.9. nodetool rebuild is the closest command
$ nodetool help rebuild NAME
nodetool rebuild - Rebuild data by streaming from other nodes (similarly
to bootstrap)
SYNOPSIS
nodetool [(-h | --host )] [(-p | --port )]
[(-pw | --password )]
[(-pwf | --password-file )]
[(-u | --username )] rebuild [--]
OPTIONS
-h , --host
Node hostname or ip address
-p <port>, --port <port>
Remote jmx agent port number
-pw <password>, --password <password>
Remote jmx agent password
-pwf <passwordFilePath>, --password-file <passwordFilePath>
Path to the JMX password file
-u <username>, --username <username>
Remote jmx agent username
--
This option can be used to separate command-line options from the
list of argument, (useful when arguments might be mistaken for
command-line options
<src-dc-name>
Name of DC from which to select sources for streaming. By default,
pick any DC
Related
I have installed cassandra 3.11.4 as per the below link http://cassandra.apache.org/download/ and when I'm trying to run cqlsh and nodetool command its showing command not found.
when run sudo service cassandra status,cassandra is running.
Please help
First, you need to verify that the service is healthy and operational
verify that the process is running:
ps -efa | grep cassandra
The expected outcome is a valid java process being executed
verify the log file as defined in $CASSANDRA_HOME/conf/logback.xml
tail -n 100 cassandra/system.log
The expected outcome is to not find errors
Try to replicate the issue in a new instance of the command line
You need to verify the services whether it is running or not in the configured port and IPs.
Also, you can check the system.log for any error. if still issue and data is not important you can delete the /data /commitlog /savedcache and restart the cassandra services again.
once started just check
ps -ef | grep cassandra
I am experimenting with Datastax Dse 5.0.5 graph on ubuntu machine.
I am mostly interested in graph part of Datastax enterprise package.
I have executed these below commands on different terminals
./bin/dse cannandra
./bin/dse gremlin-console
./datastax-studio/bin/server.sh
I am successfully able to start datastax-studio at localhost but with this error
All DSE gremlin server hosts are currently down or don't have the 'graph' workload set. Please, make sure that hosts are available and have the 'graph' workload and retry
What I want to do is?
I want to create vertex and edges using a java program and want to visualize it on datastax-studio.
For that I have written java program following dse docs but I am confused at which port I should connect my to database and even I am not sure about is I am really going on a right path.
Could you please guide me for installation dse graph and studio in a proper way?
./bin/dse cassandra will start just the Cassandra workload.
Since it appears you are using a tarball install
./bin/dse cassandra -g will start DSE in Graph mode
You can also do:
./bin/dse cassandra -s -g to enable search functionality for fuzzy/text/geospatial searching within Graph or Cassandra
./bin/dse cassandra -k -g to enable Spark to run OLAP style traversals and Spark analytics on Cassandra data
./bin/dse cassandra -s -k -g to enable all workload types for ease of experimentation.
For more info see:
https://docs.datastax.com/en/datastax_enterprise/5.0/datastax_enterprise/admin/startDseStandalone.html
Go to Below Link (if you have installed DSE without service ) : -
/usr/share/dse/resources/graph/gremlin-console/conf
Or go to path where your remote.yaml file is kept .
then check/configure the settings : -
hosts: [127.0.0.1]
port: 8182
serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0,
config: { serializeResultToString: true, ioRegistries: [org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistry] }}
connectionPool: {
maxContentLength: 65536000
}
Check your host and port . Then stop and restart dse .
I want to connect to Cassandra installed in a remote server from my dev environment. Dev Environment doesn't have cassandra installed and hence it is not allowing me to do the below for connecting to my cassandra server running on a different machine.
Client System - Dev System without Cassandra
Destination System - Prod Environment where Cassandra is installed
I am trying the below command over my dev terminal to connect to Prod Cassandra.
/opt/cassandra/dse-4.8.7/bin/cqlsh -e "select * from
/"IasService/"./"Table/" limit 10"
remote.stress.py1.s.com 9160 -u test-p test2;
Any leads would be helpful.
tldr;
Remove the 9160 from your command.
It would be easier to help you if you provided the error message or result of your command.
That being said, DSE 4.8.7 has Cassandra 2.1.14 at its core. As of Cassandra 2.1, cqlsh connects using the native binary protocol on port 9042. So forcing it to 9160 (as you are) will definitely not work.
$ cqlsh -e "SELECT release_version FROM system.local" 192.168.6.5 9042
-u cassdba -p superSecret
release_version
-----------------
2.1.13
(1 rows)
And since 9042 is the default port used by cqlsh now, you don't need to specify it at all.
Im trying to start DSE 5.0.1 Cassandra (Single node) in my local.
Getting below error:
CassandraDaemon.java:698 - Cannot start node if snitch's data center
(Cassandra) differs from previous data center (Graph). Please fix the
snitch configuration, decommission and rebootstrap this node or use
the flag -Dcassandra.ignore_dc=true
If you are using GossipingPropertyFileSnitch, start Cassandra with the option
-Dcassandra.ignore_dc=true
If it starts successfully, execute:
nodetool repair
nodetool cleanup
Afterwards, Cassandra should be able to start normally without the ignore option.
This occurs when the node starts and see's that it has information indicating that it was previously part of a different datacenter. This occurs if the datacenter was different on a prior boot and was then changed.
In your case you are most likely using DseSimpleSnitch which names the Datacenter based on the workload of that node. Previously the node was started with Graph enabled which turned the name to Graph. Now trying to start it without Graph enabled leads to it naming the Datacenter Cassandra which is the default.
Using the -Dcassandra.ignore_dc=true flag will allow you to proceed but a better solution would be to switch to GossipingPropertyFileSnitch and give this machine a dedicated datacenter name.
Another option (if you are just testing) is to wipe out the data directory as this will clear out the information previously labeling the datacenter for the node. This will most likely be sudo rm -R /var/lib/cassandra/
This issue will happen when you change Datacenter name in this below respective file /etc/dse/cassandra/cassandra-rackdc.properties
To resolve please follow the below 3 steps
Clear the below-mentioned directories(Note:- if have data please take a backup with cp command )
cd /var/lib/cassandra/commitlog
sudo rm -rf *
cd /var/lib/cassandra/data
sudo rm -rf *
now start the dse service with the below command
service dse start
command to check the list node's status
nodetool -h ::FFFF:127.0.0.1 status
I am trying to setup cassandra cluster with 5 nodes. I have installed dse on all nodes and started dse on all the nodes by command.
sudo service dse start
dse is running fine on all nodes.
Now I am trying to configure opscenter following http://www.datastax.com/documentation/opscenter/3.2/webhelp/index.html#opsc/install/../../opsc/install/opscInstallRHEL_t.html
When I execute "sudo service opscenterd start", it starts without any problem and even log doesnt show any problem.
But when I try doing "netstat -a | grep 8888", it doesnt show any listener.
Can anybody please help me in identifying issue?
Thanks,
Jenish
I would first figure out if the service is indeed starting. When you say you checked log, was that /var/log/messages or the opscenter logs? I would check both.
Next I would see if it stays running. You can also check for the process running with
ps -eaf | grep opscenterd
If everything is running but not listening on the right port, you should check your opscenterd.conf file for proper port and interface:
[webserver]
port = 8888
interface = 127.0.0.1
Note that your interface definition may be different - for example, it may be 0.0.0.0 which signifies binding to all interfaces (rather than just localhost as above), but you should validate that it is correct for your environment.