[jira] [Updated] (CASSANDRA-10789) Allow DBAs to kill individual client sessions from certain IP(s) and temporarily block subsequent connections without bouncing JVM

2018-09-28 Thread N L (JIRA)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-10789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

N  L  updated CASSANDRA-10789:
--
Status: Ready to Commit  (was: Patch Available)

> Allow DBAs to kill individual client sessions from certain IP(s) and 
> temporarily block subsequent connections without bouncing JVM
> --
>
> Key: CASSANDRA-10789
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10789
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Coordination
>Reporter: Wei Deng
>Assignee: Damien Stevenson
>Priority: Major
>  Labels: 4.0-feature-freeze-review-requested
> Fix For: 4.x
>
> Attachments: 10789-trunk-dtest.txt, 10789-trunk.txt
>
>
> In production, there could be hundreds of clients connected to a Cassandra 
> cluster (maybe even from different applications), and if they use DataStax 
> Java Driver, each client will establish at least one TCP connection to a 
> Cassandra server (see 
> https://datastax.github.io/java-driver/2.1.9/features/pooling/). This is all 
> normal and at any given time, you can indeed see hundreds of ESTABLISHED 
> connections to port 9042 on a C* server (from netstat -na). The problem is 
> that sometimes when a C* cluster is under heavy load, when the DBA identifies 
> some client session that sends abusive amount of traffic to the C* server and 
> would like to stop it, they would like a lightweight approach rather than 
> shutting down the JVM or rolling restart the whole cluster to kill all 
> hundreds of connections in order to kill a single client session. If the DBA 
> had root privilege, they would have been able to do something at the OS 
> network level to achieve the same goal but oftentimes enterprise DBA role is 
> separate from OS sysadmin role, so the DBAs usually don't have that privilege.
> This is especially helpful when you have a multi-tenant C* cluster and you 
> want to have the impact for handling such client to be minimal to the other 
> applications. This feature (killing individual session) seems to be a common 
> feature in other databases (regardless of whether the client has some 
> reconnect logic or not). It could be implemented as a JMX MBean method and 
> exposed through nodetool to the DBAs.
> Note due to CQL driver's automated reconnection, simply killing the currently 
> connected client session will not work well, so the JMX parameter should be 
> an IP address or a list of IP addresses, so that the Cassandra server can 
> terminate existing connection with that IP, and block future connection 
> attempts from that IP for the remaining time until the JVM is restarted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-12860) Nodetool repair fragile: cannot properly recover from single node failure. Has to restart all nodes in order to repair again

2018-04-18 Thread N L (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16443130#comment-16443130
 ] 

N  L  commented on CASSANDRA-12860:
---

[~krummas] 

Hi,

 I'm Using cassandra version 3.10

    I'm still getting this error.

> Nodetool repair fragile: cannot properly recover from single node failure. 
> Has to restart all nodes in order to repair again
> 
>
> Key: CASSANDRA-12860
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12860
> Project: Cassandra
>  Issue Type: Bug
> Environment: CentOS 6.7, Java HotSpot(TM) 64-Bit Server VM (build 
> 25.102-b14, mixed mode), Cassandra 3.5.0, fresh install
>Reporter: Bing Wu
>Priority: Critical
>
> Summary of symptom:
> - Set up is a multi-region cluster in AWS (5 regions). Each region has at 
> least 4 hosts with RF=1/2 number of nodes, using V-nodes (256)
> - How to reproduce:
> -- On node A, start this repair job (again we are running fresh 3.5.0): 
> {code}nohup sudo nodetool repair -j 2 -pr -full myks > /tmp/repair.log 2>&1 
> &{code}
> -- Job starts fine, reporting progress like {noformat}
> [2016-10-28 22:37:52,692] Starting repair command #1, repairing keyspace myks 
> with repair options (parallelism: parallel, primary range: true, incremental: 
> false, job threads: 2, ColumnFamilies: [], dataCenters: [], hosts: [], # of 
> ranges: 256)
> [2016-10-28 22:38:35,099] Repair session 36f13450-9d5f-11e6-8bf7-a9f47ff986a9 
> for range [(4029874034937227774,4033949979656106020]] finished (progress: 1%)
> [2016-10-28 22:38:38,769] Repair session 36f30910-9d5f-11e6-8bf7-a9f47ff986a9 
> for range [(-2395606719402271267,-2394525508513518837]] finished (progress: 
> 1%)
> [2016-10-28 22:38:48,521] Repair session 36f3f370-9d5f-11e6-8bf7-a9f47ff986a9 
> for range [(-5223108861718702793,-5221117649630514419]] finished (progress: 
> 2%)
> {noformat}
> -- Then manually shutdown another node (node B) in the same region (haven't 
> tried with other region yet but expect the same behavior from past experience)
> -- Shortly after that seeing this message from job log (as well as in 
> system.log) on node A: {noformat}
> [2016-10-28 22:41:46,268] Repair session 37088ce1-9d5f-11e6-8bf7-a9f47ff986a9 
> for range [(-928974038666914990,-927967994563261540]] failed with error 
> Endpoint /node_B_ip died (progress: 51%)
> {noformat}
> -- From this point on, repair job seems to hang:
> --- no further messages from job log
> --- nor any related messages in system.log
> --- CPU stayed low (low single digit percent of 1 CPU)
> -- After an hour (1hr), manually kill the repair jobs using "ps -eaf | grep 
> repair"
> -- Restart C* on node A
> --- Verified system is up and no error messages in system.log
> --- Also verified that there is no error messages from node B
> -- After node A settles down (e.g. no new messages from system.log), restart 
> the same repair job: {code}nohup sudo nodetool repair -j 2 -pr -full myks > 
> /tmp/repair.log 2>&1 &{code}
> -- Job failes pretty quickly, reporting error from more nodes B and K: 
> {noformat} [y...@cass-tm-1b-012.apse1.mashery.com ~]$ tail -f 
> /tmp/repair.log 
> [2016-10-28 22:49:52,965] Starting repair command #1, repairing keyspace myks 
> with repair options (parallelism: parallel, primary range: true, incremental: 
> false, job threads: 2, ColumnFamilies: [], dataCenters: [], hosts: [], # of 
> ranges: 256)
> [2016-10-28 22:50:15,839] Repair session e4180720-9d60-11e6-b2f9-cb9524b3c536 
> for range [(4029874034937227774,4033949979656106020]] failed with error 
> [repair #e4180720-9d60-11e6-b2f9-cb9524b3c536 on myks/rtable, 
> [(4029874034937227774,4033949979656106020]]] Validation failed in /node_K_ip 
> (progress: 1%)
> [2016-10-28 22:50:17,158] Repair session e419dbe0-9d60-11e6-b2f9-cb9524b3c536 
> for range [(-2395606719402271267,-2394525508513518837]] failed with error 
> [repair #e419dbe0-9d60-11e6-b2f9-cb9524b3c536 on myks/rtable, 
> [(-2395606719402271267,-2394525508513518837]]] Validation failed in 
> /node_B_ip (progress: 1%)
> [2016-10-28 22:50:18,256] Repair session e41b1460-9d60-11e6-b2f9-cb9524b3c536 
> for range [(-5223108861718702793,-5221117649630514419]] failed with error 
> [repair #e41b1460-9d60-11e6-b2f9-cb9524b3c536 on myks/rtable, 
> [(-5223108861718702793,-5221117649630514419]]] Validation failed in 
> /node_B_ip (progress: 2%)
> {noformat}
> -- On the said nodes (B and K), seeing similar errors: {noformat}
> ERROR [ValidationExecutor:5] 2016-10-28 22:58:45,307 
> CompactionManager.java:1320 - Cannot start multiple repair sessions over the 
> same sstables
> ERROR [ValidationExecutor:5] 2016-10-28 22:58:45,307 Validator.java:261 - 
> Failed creating a merkle tree for [repair 
>