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

dns-srv resolution doesn't query _couchbases._tcp

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.5
    • 2.7.7
    • None
    • None

    Description

      We want to publish dns srv records and configure couchbase clients to use them as documented at:

      https://developer.couchbase.com/documentation/server/current/sdk/c/managing-connections.html

      However I ran into problems testing this. I'm using the python client 2.2.5 and libcouchbase 2.7.5 and a connection string like this:

      b = Bucket('couchbases://cbvt-demo.in-couchbase.ei-lca1.stg.linkedin.com/demo1?console_log_level=5&ssl=on')

      since I am specifying 'couchbases' protocol I would expect this to perform a dns srv look of _couchbases._tcp.cbvt-demo.in-couchbase.ei-lca1.stg.linkedin.com . However what I actually observe (via network packet captures) is that it is doing a lookup against _couchbase (lack of "s" at the end)

      So somehow the dns record string is being built up using the wrong protocol. As you can see from the above connection string I have even passed in ssl=on as a parameter to no avail. Here is console output of running my python script:

       

      (couchbase-tools)[bweir@bweir-ld couchbase-tools_trunk]$ ./new2.py
      0ms [I0] {27775} [INFO] (instance - L:412) Version=2.7.5, Changeset=09a9e28dfaf9f70a7e230de66909fc5d9f3a6b4f
      0ms [I0] {27775} [INFO] (instance - L:413) Effective connection string: couchbases://cbvt-demo.in-couchbase.ei-lca1.stg.linkedin.com/demo1?console_log
      _level=5&ssl=on. Bucket=demo1
      

      Meanwhile in another terminal here's my packet capture:

      [bweir@bweir-ld ~]$ sudo ngrep _couchbase port 53
      interface: eth0 (172.21.224.0/255.255.254.0)
      filter: ( port 53 ) and (ip or ip6)
      match: _couchbase
       
      U 172.21.224.109:38174 -> 172.21.195.101:53
        ............._couchbase._tcp.cbvt-demo.in-couchbase.ei-lca1.stg.linkedin.com..!..                                                                
      #
      U 172.21.195.101:53 -> 172.21.224.109:38174
        ............._couchbase._tcp.cbvt-demo.in-couchbase.ei-lca1.stg.linkedin.com..!.............4._http._tcp.in-couchbase.cbvt-demo.tag.ei-lca1.itd.;
        .].!.....,.%.......lca1-app2074.stg.linkedin.com..].!.....,.%.......lca1-app2076.stg.linkedin.com..].!.....,.%.......lca1-app2065.stg.linkedin.co
        m.................................................                                                                                              

      Attachments

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

        Activity

          There are no comments yet on this issue.

          People

            avsej Sergey Avseyev
            bweir bweir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty