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

cbrecovery - need better error messages

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0
    • 2.5.0
    • tools
    • Security Level: Public
    • None
    • centos 64
    • Untriaged

    Description

      seems like cbrecover doesn't work in 2.5.0-1054

      1) when I tried to run during rebalance
      [root@centos-64-x64 ~]# /opt/couchbase/bin/cbrecovery http://172.23.105.158:8091 http://172.23.105.159:8091 -u Administrator -U Administrator -p password -P password
      2014-01-20 07:07:45,453: MainThread Error:Could not start recovery because rebalance is running
      error: unable to access REST API: 172.23.105.159:8091/pools/default/buckets/default/controller/startRecovery; please check source URL, username (-u) and password (-p); response: 503; reason: start_recovery

      okay, I got "Could not start recovery because rebalance is running" but the remaining error is incorrect

      2) without rebalance:
      [root@centos-64-x64 ~]# /opt/couchbase/bin/cbrecovery http://172.23.105.158:8091 http://172.23.105.159:8091 -u Administrator -U Administrator -p password -P password -v
      2014-01-20 07:10:24,240: MainThread Error:Specified bucket not found
      error: unable to access REST API: 172.23.105.159:8091/pools/default/buckets/default/controller/startRecovery; please check source URL, username (-u) and password (-p); response: 404; reason: start_recovery

      okay, I don't have "default" bucket but inexplicable error again

      3) with bucket specified

      /opt/couchbase/bin/cbrecovery http://172.23.105.158:8091 http://172.23.105.159:8091 -u Administrator -U Administrator -p password -P password -b RevAB -B RevAB -v
      2014-01-20 07:12:04,755: MainThread Error:No recovery needed
      error: unable to access REST API: 172.23.105.159:8091/pools/default/buckets/RevAB/controller/startRecovery; please check source URL, username (-u) and password (-p); response: 400; reason: start_recovery

      why we can't use recovery here? "No recovery needed"

      I found http://www.couchbase.com/issues/browse/MB-8048 that was closed with a vague explanation for me

      I try a different approach:

      [root@centos-64-x64 ~]# /opt/couchbase/bin/cbrecovery http://Administrator@password:172.23.105.158:8091 http://Administrator@password:172.23.105.159:8091 -u Administrator -U Administrator -p password -P password -b RevAB -B RevAB -v
      Traceback (most recent call last):
      File "/opt/couchbase/lib/python/cbrecovery", line 233, in <module>
      pump_transfer.exit_handler(Recovery().main(sys.argv))
      File "/opt/couchbase/lib/python/cbrecovery", line 70, in main
      err = self.pre_transfer(opts, source, sink)
      File "/opt/couchbase/lib/python/cbrecovery", line 142, in pre_transfer
      pump.rest_request(host, int(port), user, pwd,
      ValueError: invalid literal for int() with base 10: '172.23.105.159'

      [root@centos-64-x64 ~]# /opt/couchbase/bin/cbrecovery http://Administrator@password:172.23.105.158:8091 http://Administrator@password:172.23.105.159:8091 -b RevAB -B RevAB -v Traceback (most recent call last):
      File "/opt/couchbase/lib/python/cbrecovery", line 233, in <module>
      pump_transfer.exit_handler(Recovery().main(sys.argv))
      File "/opt/couchbase/lib/python/cbrecovery", line 70, in main
      err = self.pre_transfer(opts, source, sink)
      File "/opt/couchbase/lib/python/cbrecovery", line 136, in pre_transfer
      pump.parse_spec(opts, sink, 8091)
      File "/opt/couchbase/lib/python/pump.py", line 822, in parse_spec
      or os.environ['CB_REST_PASSWORD'] or ''
      File "/usr/lib64/python2.6/UserDict.py", line 22, in _getitem_
      raise KeyError(key)
      KeyError: 'CB_REST_PASSWORD'

      I'm doing something wrong?

      Attachments

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

        Activity

          People

            bcui Bin Cui (Inactive)
            andreibaranouski Andrei Baranouski
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty