Python error using CBTransfer tool


#1

We’re seeing the following error when using the CBTransfer tool to copy data between buckets. We’re currently on Couchbase 4.1 (recently upgaded from 3.1.1). We’re using the following very vanilla set of options. Any ideas what this error means?

cbtransfer.exe -b [sourcebucket] -B [destbucket] http://[cbnode]:8091 http://[cbnode]:8091 -u [admin] -p [password]

Exception in thread s0:] 61.2% (10872100/estimated 17772199 msgs)(5072196/estimated 17772199 msgs)
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 552, in _bootstrapinner
self.run()
File “/usr/lib/python2.7/threading.py”, line 505, in run
self.target(*self.args, **self.__kwargs)
File “/opt/couchbase/lib/python/pump_mc.py”, line 90, in run
rv, batch, need_backoff = self.scatter_gather(mconns, batch)
File “/opt/couchbase/lib/python/pump_cb.py”, line 75, in scatter_gather
vbucket_id=vbucket_id)
File “/opt/couchbase/lib/python/pump_mc.py”, line 173, in send_msgs
conf_res)
File “/opt/couchbase/lib/python/pump_mc.py”, line 380, in cmd_request
con_res_len,
NameError: global name ‘con_res_len’ is not defined


#2

Hi, @eben might be able to help you.


#3

Hi,

Are you transferring between buckets on the same server, or between two different servers?

Thanks,

-Eben


#4

Between buckets on the same server.

  • Jeff

#5

Hi again Jeff,

That clearly shouldn’t be happening, and I’m working on reproducing it here so we can verify a fix.

As a work-around, are you able to use cbbackup to back up the original bucket, then cbrestore to restore it to the new bucket?

Regards,

-Eben


#6

Thanks for looking into this eben.

As a workaround my developer wrote a small C# program to pump over the visits. That’s working for now, but ideally we’d also like the option to use the built in tools in the future.