Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-50092

cbbackupmgr does not work with DNS SRV (when it resolves to using 18091)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.1.0
    • 7.0.2, 7.0.3
    • tools
    • None
    • Untriaged
    • 1
    • Unknown
    • Tools 2021 Dec

    Description

      Krishna Doddi (aka Prasad Doddi) found this issue when trying to use Capella DNS SRV name with cbbackupmgr (from outside of Capella). This issue also affects cbimport, cbexport – the workaround is to use -c https://<hostname or ip of one of the cluster data nodes> – you can find the hostname of the cluster nodes in the error message or by running "nslookup -type=srv _couchbases._tcp.<dns_srv_name_of_cluster>".

      The cbbackupmgr is from Couchbase Server 7.0.2, which has the fix for MB-48078.

      % cbbackupmgr backup -a /Users/hyun-ju.vega/cb_backups_20211214_2 -r repo_capella -c couchbases://cb.6lptdxsqmmp0u79d.nonprod-project-avengers.com  -u dbaas -p 'password_removed' --no-ssl-verify 
      Error backing up cluster: failed to connect to any host(s) from the connection string, check the logs for more details
      

      The cbbackupmgr log shows:

      2021-12-14T13:33:22.308-08:00 (Cmd) backup -a /Users/hyun-ju.vega/cb_backups_20211214_2 -r repo_capella -c couchbases://cb.6lptdxsqmmp0u79d.nonprod-project-avengers.com -u <ud>dbaas</ud> -p ***** --no-ssl-verify
      2021-12-14T13:33:22.308-08:00 (Cmd) mounted archive with id: 9b395eb3-c4f4-42ef-a559-4172d69d557b
      2021-12-14T13:33:22.423-08:00 (REST) (Attempt 1) (GET) Dispatching request to 'http://upovyebmlz5ormbw.6lptdxsqmmp0u79d.nonprod-project-avengers.com:18091/pools/default/nodeServices'
      2021-12-14T13:33:22.563-08:00 ERRO: (REST) (Attempt 1) (GET) Failed to dispatch request to 'http://upovyebmlz5ormbw.6lptdxsqmmp0u79d.nonprod-project-avengers.com:18091/pools/default/nodeServices': Get "http://upovyebmlz5ormbw.6lptdxsqmmp0u79d.nonprod-project-avengers.com:18091/pools/default/nodeServices": EOF -- rest.(*Request).execute() at request.go:228
      2021-12-14T13:33:22.564-08:00 WARN: (REST) failed to bootstrap client, will retry: failed to get cluster nodes: failed to execute request: http client failed to dispatch/receive request/response: error executing 'GET' request to '/pools/default/nodeServices' response body was empty, check the logs for more details -- rest.newClient() at client.go:137
      2021-12-14T13:33:22.564-08:00 (REST) (Attempt 1) (GET) Dispatching request to 'http://9-xodpnetbjllvzy.6lptdxsqmmp0u79d.nonprod-project-avengers.com:18091/pools/default/nodeServices'
      

      From the logs above, can see that it's doing a GET call using http:// instead of https://

      Get "http://upovyebmlz5ormbw.6lptdxsqmmp0u79d.nonprod-project-avengers.com:18091/pools/default/nodeServices"
      

      Note: You can see the same cbbackupmgr log error messages if you run against localhost with http:// and port 18091 :

      % cbbackupmgr backup -a /Users/hyun-ju.vega/cb_backups_20211214 -r repo_local -c http://localhost:18091 -u Administrator -p password --no-ssl-verify
      

      whereas, with https:// and port 18091, works fine (takes backup):

      % cbbackupmgr backup -a /Users/hyun-ju.vega/cb_backups_20211214 -r repo_local -c https://localhost:18091 -u Administrator -p password --no-ssl-verify
      

      Attachments

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

        Activity

          People

            joe.mitchelljones Joe Mitchell Jones
            hyun-ju.vega Hyun-Ju Vega
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty