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

The client does not use hostnames retrieved using DNS SRV



    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.2
    • 2.7.3
    • library
    • None


      It seems like DNS SRV code only fills in the hostnames into connection spec, but after that they never get used by lcb_t instance

      $ LCB_LOGLEVEL=5 cbc cat -U couchbase+dnssrv://couchbase.avsej.net/default foo
      0ms [I0] {22702} [INFO] (instance - L:401) Version=2.7.1, Changeset=63c54b1b63db427ab3cf9a131c08ad591044b798
      0ms [I0] {22702} [INFO] (instance - L:402) Effective connection string: couchbase+dnssrv://couchbase.avsej.net/default?. Bucket=default
      0ms [I0] {22702} [DEBUG] (instance - L:77) Adding host couchbase.avsej.net:8091 to initial HTTP bootstrap list
      0ms [I0] {22702} [DEBUG] (instance - L:77) Adding host couchbase.avsej.net:11210 to initial CCCP bootstrap list
      3ms [I0] {22702} [DEBUG] (confmon - L:83) Preparing providers (this may be called multiple times)
      3ms [I0] {22702} [DEBUG] (confmon - L:90) Provider CCCP is ENABLED
      3ms [I0] {22702} [DEBUG] (confmon - L:90) Provider HTTP is ENABLED
      3ms [I0] {22702} [TRACE] (confmon - L:252) Start refresh requested
      3ms [I0] {22702} [TRACE] (confmon - L:239) Current provider is CCCP
      3ms [I0] {22702} [INFO] (cccp - L:144) Requesting connection to node couchbase.avsej.net:11210 for CCCP configuration
      3ms [I0] {22702} [DEBUG] (lcbio_mgr - L:416) <couchbase.avsej.net:11210> (HE=0x1114b90) Creating new connection because none are available in the pool
      3ms [I0] {22702} [DEBUG] (lcbio_mgr - L:321) <couchbase.avsej.net:11210> (HE=0x1114b90) Starting connection on I=0x1115130
      3ms [I0] {22702} [INFO] (connection - L:450) <couchbase.avsej.net:11210> (SOCK=0x1115270) Starting. Timeout=2000000us
      8ms [I0] {22702} [ERROR] (connection - L:466) <couchbase.avsej.net:11210> (SOCK=0x1115270) Couldn't look up couchbase.avsej.net (Name or service not known) [EAI=-2]
      8ms [I0] {22702} [ERROR] (connection - L:127) <couchbase.avsej.net:11210> (SOCK=0x1115270) Failed: lcb_err=0x15, os_errno=0
      8ms [I0] {22702} [DEBUG] (lcbio_mgr - L:271) <couchbase.avsej.net:11210> (HE=0x1114b90) Received result for I=0x1115130,C=(nil); E=0x15
      8ms [I0] {22702} [ERROR] (cccp - L:160) <NOHOST:NOPORT> Got I/O Error=0x15
      8ms [I0] {22702} [INFO] (confmon - L:177) Provider 'CCCP' failed
      8ms [I0] {22702} [DEBUG] (confmon - L:211) Will try next provider in 0us
      8ms [I0] {22702} [TRACE] (confmon - L:239) Current provider is HTTP
      8ms [I0] {22702} [TRACE] (htconfig - L:340) Starting HTTP Configuration Provider 0x1112ac0
      8ms [I0] {22702} [INFO] (connection - L:450) <couchbase.avsej.net:8091> (SOCK=0x1115270) Starting. Timeout=2000000us
      12ms [I0] {22702} [ERROR] (connection - L:466) <couchbase.avsej.net:8091> (SOCK=0x1115270) Couldn't look up couchbase.avsej.net (Name or service not known) [EAI=-2]
      12ms [I0] {22702} [ERROR] (connection - L:127) <couchbase.avsej.net:8091> (SOCK=0x1115270) Failed: lcb_err=0x15, os_errno=0
      12ms [I0] {22702} [ERROR] (htconfig - L:295) Connection to REST API failed with code=0x15 (0)
      12ms [I0] {22702} [INFO] (confmon - L:177) Provider 'HTTP' failed
      12ms [I0] {22702} [TRACE] (confmon - L:201) Maximum provider reached. Resetting index
      12ms [I0] {22702} [ERROR] (bootstrap - L:129) Failed to bootstrap client=0x1111d80. Code=0xa, Message=No more bootstrap providers remain
      libcouchbase error: DNS/Hostname lookup failed (0x15)


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


          There are no comments yet on this issue.


            mnunberg Mark Nunberg (Inactive)
            avsej Sergey Avseyev
            0 Vote for this issue
            1 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes