Opscenter doesn't show my key spaces - cassandra

I have Cassandra cluster (ver 2.0.12) and Datastax Agents 5.0.1. Also I using OpsCenter 5.1.0. In "Explorer" tab I see no keyspaces.
Query from CLI:
SELECT keyspace_name FROM system.schema_keyspaces;
show my keyspaces. I try URL:
http://<cluster_url>:8888/<cluster_name>/keyspaces
that show me JSON output which conatain keyspaces info(i think), but "Explorer" tab still empty.

Opscenter does not necessarily automatically connects to the local node to get the cluster information. You can review this piece of documentation to check what is in your configuration files, and update them properly. There can be multiple reasons why OpsCenter can't connect to your local instance.
Or you can use the wizard to add a cluster to manage. This should populate data properly into the config files.

Related

How do I configure the Twig JDBC driver in DbVisualizer to connect to a Cassandra cluster?

I have an Ubuntu 20.04.5 install which has a Cassandra database which I want to connect to with DbVisualizer v14.0.1 using the Cassandra Twig driver (for reasons best known to my organisation).
I have installed DbVis and downloaded the cassandra-twig-jdbc-3.0.1.jar driver, started DbVis with the free version.
I have installed the driver successfully, providing the URL format as jdbc:cassandra://<server>:<port>/<database> specified by the Cassandra docs, and named it 'Cassandra':
I am now trying to create a database connection, for which the documentation states there is a wizard, however I cannot find that.
Going with a manual connection, I do not see the Database Connection panel described by the documentation, I just get a driver selection:
If I select the 'Cassandra' driver I don't get a 'Database URL' field:
Clicking 'Connect' fails - how can I define the connection URL for my local database?
Open Tools->Driver Manager and choose the Cassandra DataStax driver entry. In the right pane click the Start Download link. Once ready, close the dialog. In the main window and in the Databases tab, click to create a new database connection and choose Cassandra DataStax. Now you can choose Database URL.
The first step where you have installed the Twig driver in DBVisualizer, that's where you configure the URL.
In your screenshot, you have configured it with:
jdbc:cassandra://<server>:<port>/<database>
You should instead populate it with details of your cluster. For example, for this cluster:
contact point IP - 10.1.2.3
client port - 9042
keyspace name - mykeyspace
the corresponding JDBC URL is:
jdbc:cassandra://10.1.2.3:9042/mykeyspace
I haven't written instructions specifically for DBVisualizer but if you're interested, I've written one for DBeaver in this post -- How do I connect to Cassandra with Dbeaver Community edition?. Cheers!

not able to connect cluster to opscenter

hyy folks,
i have setup cassandra gui using this doc https://docs.datastax.com/en/install/6.8/install/opscInstallRHEL.html
but as soon as i hit the url it will open this page
here i chosen manage existing clsuter and go to next page
there it is shown like this
there i paste my private ip
but as soon i hit next it showing this error
how can i add my cluster in opscenter
sudo service opscenterd status
it is showing in Running state
i entered username and password then it is showing this
OpsCenter only works with DataStax Enterprise.
You cannot use OpsCenter to connect to:
open-source Apache Cassandra,
other distributions which are forks of Cassandra, or
versions from cloud vendors which run a CQL API engine to make the database "look and feel" like Cassandra.
Cheers!

How to setup stomp_interface for failover node for cassandra Opscenter

How to setup a fail-over node for Cassandra Opscenter. The Opscenter data is stored on Opscenter node itself. So to setup a failover node i need to setup an Opscenter different from current Opscenter and sync Opscenter data and config files between Opscenters.
The stomp_interface on nodes in the cluster are pointed towards Opscenter_1 how will it change automatically to Opscenter_2 when failover occurs??
There are steps on the datastax documentation that have details for doing this. At a minimum:
Mirror the configuration directories stored on the OpsCenter primary to the OpsCenter backup using the method you prefer.
On the backup OpsCenter in the failover directory, create a primary_opscenter_location configuration file that indicates the IP address of the primary OpsCenter daemon to monitor
The stomp_interface setting on the agents gets changed (address.yaml file updated as well) when failover occurs. This is why the documentations recommend making sure there is no 3rd party configuration management on it.
3 things :
If you have firewall on, allow the corresponding ports to communicate (61620,61621,9160,9042,7199)
always verify IF the cassandra is up and running, so agent can actually connect to something.
stop the agent, check again the address.yaml, restart the agent.

Enable Cassandra PasswordAuthenticator at up time

I have a Cassandra cluster (Datastax open source) and currently there is no authentication configured (i.e., it is using AllowAllAuthenticator), and I want to use PasswordAuthenticator. The official document says that I should follow these steps:
enable PasswordAuthenticator in cassandra.yaml,
restart the Cassandra node, which will create the system_auth keyspace,
change the system_auth replication factor,
create new user and password
However, this is a big problem to me because the cluster is used in production so we cannot have any downtime. Between step 2 and 4 no user has been configured yet, so even if the client supplies username and password, the request would still be rejected, which is not ideal.
I looked into the Datastax Enterprise doc, and it has a TransitionalAuthenticator class, which would create the system_auth keyspace but without rejecting requests. I wonder if this class can be ported to the open source version? Or if there are other ways around this problem? Thanks
Update
This is the Cassandra version I'm using:
cqlsh 4.1.1 | Cassandra 2.0.9 | CQL spec 3.1.1 | Thrift protocol 19.39.0
You should be able to execute steps 2-4 with just one node and have zero downtime, assuming proper client configuration, replication, and cluster capacity. Then, it's just a rolling restart of the remaining nodes.
Clients should be setup with credentials ahead of time, and they will start using them as nodes as nodes with authorizers come online (this behavior could depend on driver -- try it out first).
You might be able to manually generate the schema and data for steps 3-4 before engaging the CassandraAuthenticator, but that shouldn't be necessary.
What are your concerns about downtime?

Cassandra: where to modify opscenter agent for a newly added node to existing cluster

I have a single node Cassandra cluster on EC2 (launched from a Datastax AMI) and I manually added a new node which is also backed by the same Datastax AMI after deleting data directory and modifying cassandra.yaml. I can see two nodes in the Nodes section of Opscenter but I see Opscenter agent is not installed in the new node (1 of 2 agents are connected). It looks like in the new node it has its own opscenter installation and that somehow conflicts with the opscenter installation in the first node? I guess I have to fix some configuration file of opscenter agent in the new node so that it can point to the opscenter installation of the first node? But I can't find where to modify.
Thanks!
It is stomp_interface section of /var/lib/datastax-agent/conf/address.yaml
I had to manually put stomp_interface into the configuration file. Also, I noticed that the process was looking for /etc/datastax-agent/address.yaml and never looked for /var/lib/datastax-agent/conf/address.yaml
Also, local_interface was not necessary to get things to work for me. YMMV.
I'm not sure where this gets set, or if this changed between agent versions at some point in time. FWIW, I installed both opscenter and the agents via packages.

Resources