2

I have come across quite a strange error while attempting to automate a cbbackup across docker containers.

When I try to run cbbackup command from one container to another with couchbase 4.6 I get an error

(u'error: SASL auth socket error: 172.18.0.7:11210, timed out', None)

I have tried every way to figure this out but have not been able to identify the cause. Any help in figuring this out is appreciated.

cbbackup couchbase://192.168.1.5:8091 /tmp/cb/ -u Administrator -p password -b test_bucket -vvv
2019-11-25 16:54:38,303: mt cbbackup...
2019-11-25 16:54:38,303: mt  source : couchbase://192.168.1.5:8091
2019-11-25 16:54:38,303: mt  sink   : /tmp/cb/
2019-11-25 16:54:38,303: mt  opts   : {'username': '<xxx>', 'verbose': 3, 'extra': {'max_retry': 10.0, 'rehash': 0.0, 'dcp_consumer_queue_length': 1000.0, 'data_only': 0.0, 'uncompress': 0.0, 'nmv_retry': 1.0, 'conflict_resolve': 1.0, 'cbb_max_mb': 100000.0, 'report': 5.0, 'mcd_compatible': 1.0, 'try_xwm': 1.0, 'backoff_cap': 10.0, 'batch_max_bytes': 400000.0, 'report_full': 2000.0, 'flow_control': 1.0, 'batch_max_size': 1000.0, 'seqno': 0.0, 'design_doc_only': 0.0, 'allow_recovery_vb_remap': 0.0, 'recv_min_bytes': 4096.0}, 'collection': None, 'ssl': False, 'threads': 4, 'key': None, 'password': '<xxx>', 'id': None, 'bucket_source': 'test_bucket', 'silent': False, 'dry_run': False, 'single_node': False, 'vbucket_list': None, 'separator': '::', 'mode': 'diff'}
2019-11-25 16:54:38,304: mt source_class: <class 'pump_dcp.DCPStreamSource'>
2019-11-25 16:54:38,306: mt Starting new HTTP connection (1): 192.168.1.5
2019-11-25 16:54:38,348: mt "GET /pools/default/buckets HTTP/1.1" 200 13939
2019-11-25 16:54:38,358: mt sink_class: <class 'pump_bfd2.BFDSinkEx'>
2019-11-25 16:54:38,359: mt source_buckets: test_bucket
2019-11-25 16:54:38,360: mt bucket_source: test_bucket
2019-11-25 16:54:38,360: mt source_buckets filtered: test_bucket
2019-11-25 16:54:38,360: mt bucket: test_bucket
2019-11-25 16:54:38,360: mt  source_nodes: 172.18.0.7:8091
2019-11-25 16:54:38,365: mt  enqueueing node: 172.18.0.7:8091
2019-11-25 16:54:38,365: mt rest_request: <ud>Administrator</ud>@192.168.1.5:8091/pools/default/buckets/test_bucket/stats/curr_items; reason: total_msgs
2019-11-25 16:54:38,366: w0  node: 172.18.0.7:8091
2019-11-25 16:54:38,369: w0 sink_bucket: test_bucket
2019-11-25 16:54:38,372: w0   DCPStreamSource connecting mc: 172.18.0.7:11210
2019-11-25 16:54:38,374: s0   create_db: /tmp/cb/2019-11-25T165438Z/2019-11-25T165438Z-full/bucket-test_bucket/node-172.18.0.7%3A8091/data-0000.cbb
2019-11-25 16:54:38,375: s0   connect_db: /tmp/cb/2019-11-25T165438Z/2019-11-25T165438Z-full/bucket-test_bucket/node-172.18.0.7%3A8091/data-0000.cbb
2019-11-25 16:54:38,400: mt rest_request: <ud>Administrator</ud>@192.168.1.5:8091/pools/default/buckets/test_bucket/stats/vb_active_resident_items_ratio; reason: total_msgs
2019-11-25 16:54:58,359: w0   pump (couchbase://192.168.1.5:8091(test_bucket@172.18.0.7:8091)->/tmp/cb/(test_bucket@172.18.0.7:8091)) done.
2019-11-25 16:54:58,359: w0   source : couchbase://192.168.1.5:8091(test_bucket@172.18.0.7:8091)
2019-11-25 16:54:58,359: w0   sink   : /tmp/cb/(test_bucket@172.18.0.7:8091)
2019-11-25 16:54:58,360: w0          :                total |       last |    per sec
2019-11-25 16:54:58,360: w0  node: 172.18.0.7:8091, done; rv: (u'error: SASL auth socket error: 172.18.0.7:11210, timed out', None)
(u'error: SASL auth socket error: 172.18.0.7:11210, timed out', None)
  • 1
    I suspect this is something to do with the default docker container network not being able to communicate with the host. If using docker-compose try use the name of the service as the address or run the container using a different network. More here: https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach – Ben Lewis Watson Nov 25 '19 at 17:23
  • The solution was either to use the docker container name, or have the docker-compose use network-mode = "host" – Santiago Chiriboga Nov 27 '19 at 20:02

0 Answers0