How to know Native Clients connected to Cassandra
Asked Answered
C

2

6

I am able to see 160 Native clients on a particular node from OpsCenter. But none of the application is pointing to this DC or any of the nodes from this DC.

If above is the situtation what are those 160 Native clients?

  • Few of them are because I have connected to that node using DevCenter.
  • Rest can be because of Inter DC communication??
  • No keyspace has RF set also for this DC. I am about to decommission this DC.

OpsCenter Native Clients

But not sure what are those clients.

Any idea??

Carpal answered 16/1, 2019 at 7:55 Comment(0)
C
5

I have used below command to find connecting clients:

sudo lsof -i -n -P | grep 9042 | grep ESTABLISHED

By running above, I found processes & those processes were all the java applications connecting to Cassandra. But I have not mentioned any of these hosts in connection, still requests were coming on them.

I found all those requests were because of Consistency Level: QUORUM by client applications. Although applications are not referring to those DCs directly but to achieve QUORUM requests were going on all DCs.

1 more thing was there: Java client aplications were using username(superuser) 'cassandra', this also need consistency level QUORUM.

Inter DC communication does not happen on 9042, so my assumption of some connections from Inter DC was also not correct.

Above was solution to my problem.

Carpal answered 6/2, 2019 at 11:1 Comment(1)
Even if you're using QUORUM and not LOCAL_QUORUM, if the data center is are not referenced in the keyspace replication factor, the DC should not be contacted. Did you remove the data center from the replication factor of system_auth as well?Nyhagen
E
4

In latest versions you can use nodetool clientlist or select * from system_views.clients ; in cqlsh to view the actual connections. This will give you the host and port which you can then track on the system what application is bound to it.

In older DSE versions you can also use dsetool perf userlatencytracking [enable|disable] to enable the userlatency tracking to do something similar with select * from dse_perf.user_io;.

Eiger answered 17/1, 2019 at 17:29 Comment(2)
i am using DSE4.8 & not on latest DSE.Carpal
This will be a great addition to nodetool! Just to add a bit more information, this will be available in C* v4.0. JIRA ticket here: issues.apache.org/jira/browse/CASSANDRA-13665Nyhagen

© 2022 - 2024 — McMap. All rights reserved.