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

Tyler Hobbs updated CASSANDRA-10959:
------------------------------------
    Description: 
On a slow cluster (here used for testing purpose), cqlsh fails with a timeout 
error, whatever --connect-timeout option you can pass.

Here is a sample call:
{noformat}
cqlsh 192.168.XXX.YYY
Connection error: ('Unable to connect to any servers', {'192.168.XXX.YYY': 
OperationTimedOut('errors=None, last_host=None',)})
{noformat}
{noformat}
cqlsh --connect-timeout=30 192.168.XXX.YYY
Connection error: ('Unable to connect to any servers', {'192.168.XXX.YYY': 
OperationTimedOut('errors=None, last_host=None',)})
{noformat}

Debugging shows that the timeout is not properly propagated on the underlying 
{{ResponseWaiter.deliver()}} method in 
{{/usr/share/cassandra/lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/connection.py}}

Workaround is to propagate, in cqlsh.py, the {{--connect-timeout}} option when 
initialize the cluster connection object (i.e. add kwarg 
"control_connection_timeout" in addition to the existing kwarg 
"connect_timeout")
{noformat}
Cluster(
    <other args>,
    control_connection_timeout=float(connect_timeout),
    connect_timeout=connect_timeout)
{noformat}

  was:
On a slow cluster (here used for testing purpose), cqlsh fails with a timeout 
error, whatever --connect-timeout option you can pass.

Here is a sample call:
cqlsh 192.168.XXX.YYY
Connection error: ('Unable to connect to any servers', {'192.168.XXX.YYY': 
OperationTimedOut('errors=None, last_host=None',)})

cqlsh --connect-timeout=30 192.168.XXX.YYY
Connection error: ('Unable to connect to any servers', {'192.168.XXX.YYY': 
OperationTimedOut('errors=None, last_host=None',)})

Debugging shows that the timeout is not properly propagated on the underlying 
ResponseWaiter.deliver() method in 
/usr/share/cassandra/lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/connection.py

Workaround is to propagate, in cqlsh.py, the --connect-timeout option when 
initialize the cluster connection object (i.e. add kwarg 
"control_connection_timeout" in addition to the existing kwarg 
"connect_timeout")
Cluster(
    <other args>,
    control_connection_timeout=float(connect_timeout),
    connect_timeout=connect_timeout)


> missing timeout option propagation in cqlsh (cqlsh.py)
> ------------------------------------------------------
>
>                 Key: CASSANDRA-10959
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10959
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: linux
>            Reporter: Julien Blondeau
>              Labels: patch
>             Fix For: 3.x
>
>         Attachments: 10959-3.1.1.txt
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> On a slow cluster (here used for testing purpose), cqlsh fails with a timeout 
> error, whatever --connect-timeout option you can pass.
> Here is a sample call:
> {noformat}
> cqlsh 192.168.XXX.YYY
> Connection error: ('Unable to connect to any servers', {'192.168.XXX.YYY': 
> OperationTimedOut('errors=None, last_host=None',)})
> {noformat}
> {noformat}
> cqlsh --connect-timeout=30 192.168.XXX.YYY
> Connection error: ('Unable to connect to any servers', {'192.168.XXX.YYY': 
> OperationTimedOut('errors=None, last_host=None',)})
> {noformat}
> Debugging shows that the timeout is not properly propagated on the underlying 
> {{ResponseWaiter.deliver()}} method in 
> {{/usr/share/cassandra/lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/connection.py}}
> Workaround is to propagate, in cqlsh.py, the {{--connect-timeout}} option 
> when initialize the cluster connection object (i.e. add kwarg 
> "control_connection_timeout" in addition to the existing kwarg 
> "connect_timeout")
> {noformat}
> Cluster(
>     <other args>,
>     control_connection_timeout=float(connect_timeout),
>     connect_timeout=connect_timeout)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to