Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-10959

missing timeout option propagation in cqlsh (cqlsh.py)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.2.5, 3.0.3, 3.3
    • Legacy/Tools
    • linux

    • Low

    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:

      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)
      

      Attachments

        1. 10959-3.1.1.txt
          0.9 kB
          Julien Blondeau

        Activity

          People

            lounagen Julien Blondeau
            lounagen Julien Blondeau
            Julien Blondeau
            Tom Hobbs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified