1

Is any way to get information about the current cluster configurations with a list of datacenters?

I have tried to fetch this list from system.local using cqlsh with setting the consistency level equal to ALL, but it shows me only one datacenter.

Basically I want to check that all datacenters which I have created are constituting the one cluster.

3

As far as i understand your question, you can run nodetool status which shows all the data center including all their belonging nodes.

$ nodetool status
Datacenter: DC1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address        Load       Tokens  Owns (effective)  Host ID                               Rack
UN  <IP>   1.7 TB     256     7.2%              <Host ID>  RAC1

Datacenter: DC2
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address        Load       Tokens  Owns (effective)  Host ID                               Rack
UN  <IP>   1.7 TB     256     7.2%              <Host ID>  RAC1
  • So, if the nodetool shows me only one datacenter, does it mean that my cluster is not properly configured (assuming that I have two datacenters)? – Andremoniy Feb 5 '18 at 10:20
  • yes, it is. nodetool status always shows how many data center you have if it stats only one then you should consider checking the nodes in another data center with their seed entry,cluster name and rack properties are on place. – Payal Feb 5 '18 at 10:30
0

I have tried to fetch this list from system.local using cqlsh with setting the consistency level equal to ALL, but it shows me only one datacenter.

Important to note, but the system keyspace is different in that it is specific to the local node only. Its contents are not replicated. If you run a describe on the system keyspace, you can see that it uses a LocalStrategy for replication, which basically means "no replication."

cqlsh:system> desc KEYSPACE;

CREATE KEYSPACE system WITH replication = {
  'class': 'LocalStrategy'
};
...

Another way that you could view (some of) this information, is to run a nodetool gossipinfo, like this:

$ nodetool gossipinfo
/10.1.1.132
  generation:1511693777
  heartbeat:19460403
  HOST_ID:fd352377-6be5-4d93-8251-15a74f76753e
  SCHEMA:9383736f-8a8a-33b9-9feb-8f00d22ef186
  SEVERITY:0.0
  STATUS:NORMAL,-1051516741727256963
  DC:TTCE
  LOAD:4.1361454571E10
  RELEASE_VERSION:2.0.16
  RACK:GH12
  INTERNAL_IP:192.168.1.20
  NET_VERSION:7
  RPC_ADDRESS:192.168.1.20
/10.1.1.131
  generation:1503350863
  heartbeat:44761863
  HOST_ID:16b474d2-a4d6-4441-a9ad-ace89ff0c698
  SCHEMA:9383736f-8a8a-33b9-9feb-8f00d22ef186
  SEVERITY:0.0
  STATUS:NORMAL,-1003528567286299742
  DC:TTC-OSv3
  LOAD:2.1472185106E10
  RACK:d1cp1a
  RELEASE_VERSION:2.0.16
  INTERNAL_IP:192.168.1.21
  NET_VERSION:7
  RPC_ADDRESS:192.168.1.21
...

That will show all the information that the current node has on each node in your cluster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.