Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-261

Connect object does not try the second IP address when the first one fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 2.3.0-dp2
    • None
    • library
    • Security Level: Public
    • python-2.7.5.amd64
      couchbase-1.0.0.win-adm64-py2.7.exe
      Windows 2008 rc2

    Description

      The connect object throws an error and does not try the 2nd hostname/ip in the list.
      Can reproduce with a 2 line script.

      cb1 is up.
      cb2 is shutdown

      This fails:
      from couchbase import Couchbase
      cb = Couchbase.connect(host= ['cb2','cb1'], bucket='Jimmy')

      This works:
      from couchbase import Couchbase
      cb = Couchbase.connect(host= ['cb1','cb2'], bucket='Jimmy')

      Error message:
      Traceback (most recent call last):
      File "cb.py", line 2, in <module>
      cb = Couchbase.connect(host= ['cb2','cb1'], bucket='Jimmy')
      File "C:\Python27\lib\site-packages\couchbase_init_.py", line 212, in conne
      ct
      **kwargs)
      File "C:\Python27\lib\site-packages\couchbase\connection.py", line 88, in __in
      it__
      super(Connection, self)._init_(**kwargs)
      couchbase.exceptions.ConnectError: <RC=0x18[Connection failure], There was a pro
      blem while trying to send/receive your request over the network. This may be a r
      esult of a bad network or a misconfigured client or server., C Source=(src\conne
      ction.c,537)>

      I tried swapping the libcouchbase.dll shipped with the python client with the 2.1.2 version. The result was the same.

      Expectation:
      For the client to throw a warning and try the 2nd, 3rd, etc IP/hostname in the list and to only error once all IP addresses fail.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mnunberg Mark Nunberg (Inactive)
            pvarley Patrick Varley (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty