Couchbase cbbackup failing from the remote server, which has full connectivity to the Couchbase running on K8s.
- Couchbase Server version: couchbase: community-6.0.0
- Couchbase running on Kubernetes 1.17.
cbbackup -m full http://{IP}:61006 /backup-1 -u admin -p password -vvv
error: SASL auth socket error: 192.168.72.10:11210, timed out
cbbackup log added below,
mt cbbackup...
mt source : http://{IP}:61006
mt sink : /backup-1
mt source_class: <class 'pump_dcp.DCPStreamSource'>
mt Starting new HTTP connection (1): {IP}
mt "GET /pools/default/buckets HTTP/1.1" 200 19966
mt sink_class: <class 'pump_bfd.BFDSink'>
mt source_buckets: bucket-1
mt bucket: bucket-1
mt source_nodes: 192.168.72.10:8091
mt enqueueing node: 192.168.72.10:8091
mt rest_request: <ud>admin</ud>@{IP}:61006/pools/default/buckets/bucket-1/stats/curr_items; reason: total_msgs
w0 node: 192.168.72.10:8091
w0 sink_bucket: bucket-1
w0 DCPStreamSource connecting mc: 192.168.72.10:11210
s0 create_db: /backup-1/2020-07-28T083342Z/2020-07-28T083342Z-full/bucket-bucket-1/node-192.168.72.10%3A8091/data-0000.cbb
s0 connect_db: /backup-1/2020-07-28T083342Z/2020-07-28T083342Z-full/bucket-bucket-1/node-192.168.72.10%3A8091/data-0000.cbb
mt rest_request: <ud>admin</ud>@{IP}:61006/pools/default/buckets/bucket-1/stats/vb_active_resident_items_ratio; reason: total_msgs
w0 pump (http://{IP}:61006([email protected]:8091)->/backup-1([email protected]:8091)) done.
w0 source : http://{IP}:61006([email protected]:8091)
w0 sink : /backup-1([email protected]:8091)
w0 : total | last | per sec
w0 node: 192.168.72.10:8091, done; rv: (u'error: SASL auth socket error: 192.168.72.10:11210, timed out', None)
(u'error: SASL auth socket error: 192.168.72.10:11210, timed out', None)
Raised issue in Couchbase forum as well. Refer here.
Any idea about this? I am stuck with this issue.
Update
I can’t use the exposed memcached port for cbbackup as no option added in the official document..
This answer posted in the Couchbase forum gives some details. If that is true then, its not possible to run a successful cbbackup from a remote system. But I don’t think the Couchbase team has designed in that way. Hope there is way to achieve the same.
- Backing up and Restoring a Couchbase is tested and working using Kubernetes Jobs. But looking for a remote Couchbase backup.
2
Answers
The problem here looks like 🤔 is that you have SASL authentication configured on your couchbase server/bucket. Also, looks like 🤔 the pod IP is
192.168.72.10
so the client is trying to authenticate from the same pod network but you are issuing the request from a different machine that is not in your Kubernetes cluster (I assume).You can try running the backup from a pod:
Unfortunately,
kubectl run
doesn’t have a lot of functionality so you’ll probably have to create your own Kubernetes YAML manifest if you’d like to to mount a volume.✌️☮️
Unfortunately, backup from an external network is not possible with Couchbase 6.0.
https://docs.couchbase.com/server/6.0/cli/cbbackup-tool.html#description
This caveat is not present in the documentation for 6.5… I think that’s because 6.5 introduced alternate addresses for connecting from outside the network.