Description
Problem
cbtransfer crashes when using IPv6 via IP or hostname.
Backtrace when using hostname:
[root@s10501-ip6 bin]# ./cbtransfer http://s10501-ip6.qe.couchbase.com:8091 /tmp/backup/ -u Administrator -p password
|
Exception in thread w0:
|
Traceback (most recent call last):
|
File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner
|
self.run()
|
File "/usr/lib64/python2.7/threading.py", line 765, in run
|
self.__target(*self.__args, **self.__kwargs)
|
File "/opt/couchbase/lib/python/pump.py", line 345, in run_worker
|
curx).run()
|
File "/opt/couchbase/lib/python/pump.py", line 403, in run
|
rv_batch, batch = self.source.provide_batch()
|
File "/opt/couchbase/lib/python/pump_dcp.py", line 225, in provide_batch
|
rv = self.get_dcp_conn()
|
File "/opt/couchbase/lib/python/pump_dcp.py", line 486, in get_dcp_conn
|
err, self.dcp_conn = pump.get_mcd_conn(host, port, username, password, bucket)
|
File "/opt/couchbase/lib/python/pump.py", line 1106, in get_mcd_conn
|
conn = cb_bin_client.MemcachedClient(host, port)
|
File "/opt/couchbase/lib/python/cb_bin_client.py", line 45, in __init__
|
self.s.connect_ex((host, port))
|
File "/usr/lib64/python2.7/socket.py", line 224, in meth
|
return getattr(self._sock,name)(*args)
|
gaierror: [Errno -2] Name or service not known
|
Backtrace and log when using IP:
[root@s10501-ip6 bin]# ./cbtransfer http://[fd63:6f75:6368:20d3:ac3c:257e:9c5:6619]:8091 /tmp/backup -u Administrator -p password
|
2017-12-29 16:05:59,384: mt "6f75" is not int, reset it to default port number
|
2017-12-29 16:05:59,405: mt "6f75" is not int, reset it to default port number
|
2017-12-29 16:05:59,406: mt "6f75" is not int, reset it to default port number
|
Exception in thread w0:
|
Traceback (most recent call last):
|
File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner
|
self.run()
|
File "/usr/lib64/python2.7/threading.py", line 765, in run
|
self.__target(*self.__args, **self.__kwargs)
|
File "/opt/couchbase/lib/python/pump.py", line 345, in run_worker
|
curx).run()
|
File "/opt/couchbase/lib/python/pump.py", line 403, in run
|
rv_batch, batch = self.source.provide_batch()
|
File "/opt/couchbase/lib/python/pump_dcp.py", line 225, in provide_batch
|
rv = self.get_dcp_conn()
|
File "/opt/couchbase/lib/python/pump_dcp.py", line 486, in get_dcp_conn
|
err, self.dcp_conn = pump.get_mcd_conn(host, port, username, password, bucket)
|
File "/opt/couchbase/lib/python/pump.py", line 1106, in get_mcd_conn
|
conn = cb_bin_client.MemcachedClient(host, port)
|
File "/opt/couchbase/lib/python/cb_bin_client.py", line 45, in __init__
|
self.s.connect_ex((host, port))
|
File "/usr/lib64/python2.7/socket.py", line 224, in meth
|
return getattr(self._sock,name)(*args)
|
gaierror: [Errno -2] Name or service not known
|
Do note the extra logging about the port number being incorrect.
Steps to reproduce
- Install Couchbase Server 5.5.0-1607 on a centos 7.4 with ipv6 enable.
- Create default bucket.
- Load data to default bucket.
- Run cbtransfer to transfer data out of default bucket. Failed to run in both: hex format and hostname
cbtransfer http://s10501-ip6.qe.couchbase.com:8091 /tmp/backup/ -u Administrator -p password
cbtransfer http://[fd63:6f75:6368:20d3:ac3c:257e:9c5:6619]:8091 /tmp/backup -u Administrator -p password