I’m trying to backup a bucket from couchbase but cbbackup is failing with this error (a thread gets an exception and then the script never finishes).
file.sh: Exception in thread w2:] 73.7% (8537/estimated 11590 msgs)
file.sh: Traceback (most recent call last):
file.sh: File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
file.sh: self.run()
file.sh: File "/usr/lib/python3.6/threading.py", line 864, in run
file.sh: self._target(*self._args, **self._kwargs)
file.sh: File "/couchbase-cli/pump.py", line 448, in run_worker
file.sh: curx).run()
file.sh: File "/couchbase-cli/pump.py", line 506, in run
file.sh: rv_batch, batch = self.source.provide_batch()
file.sh: File "/couchbase-cli/pump_dcp.py", line 254, in provide_batch
file.sh: rv, batch = self.provide_dcp_batch_actual()
file.sh: File "/couchbase-cli/pump_dcp.py", line 413, in provide_dcp_batch_actual
file.sh: msg = (cmd, vbucket_id, key, flg, exp, cas, bytes([rev_seqno]), val, seqno, dtype, metalen,
file.sh: ValueError: bytes must be in range(0, 256)
I’m running it from a dockerfile which looks like this:
FROM gliderlabs/alpine
RUN apk-install bash
RUN apk add --update \
python3 \
python3-dev \
py-pip \
build-base \
git \
snappy \
g++ \
snappy-dev
EXPOSE 8080
ONBUILD RUN virtualenv /env && /env/bin/pip install -r /app/requirements.txt
RUN git clone https://github.com/couchbase/couchbase-cli.git
RUN pip3 install python-snappy
RUN pip3 install awscli
COPY file.sh /
RUN sed -i 's/\r$//' file.sh
ENTRYPOINT ["/bin/bash", "file.sh"]
where file.sh calls the backup script like this:
python3 couchbase-cli/cbbackup "$cbip" /backup -u "$cbuser" -p "$cbpass" -b "$cbbuck" -m "$backuptype" -v
We are running server version: Enterprise Edition 5.0.1 build 5003
cbbackup version is the latest.
Full log from the script (some paths omitted):
file.sh: 2019-04-02 03:15:38,685: mt cbbackup...
file.sh: 2019-04-02 03:15:38,686: mt source : ---
file.sh: 2019-04-02 03:15:38,686: mt sink : /backup
file.sh: 2019-04-02 03:15:38,686: mt opts : {'bucket_source': '---', 'single_node': False, 'mode': '', 'id': None, 'key': None, 'vbucket_list': None, 'dry_run': False, 'username': '<xxx>', 'password': '<xxx>', 'username_dest': None, 'password_dest': None, 'ssl':False, 'no_ssl_verify': True, 'cacert': None, 'threads': 4, 'verbose': 1, 'silent': False, 'extra': {'batch_max_size': 1000.0, 'batch_max_bytes': 400000.0, 'cbb_max_mb': 100000.0, 'max_retry': 10.0, 'report': 5.0, 'report_full': 2000.0, 'recv_min_bytes': 4096.0, 'try_xwm': 1.0, 'nmv_retry': 1.0, 'rehash': 0.0, 'data_only': 0.0, 'design_doc_only': 0.0, 'conflict_resolve': 1.0, 'seqno': 0.0, 'mcd_compatible': 1.0, 'uncompress': 0.0, 'backoff_cap': 10.0, 'flow_control': 1.0, 'dcp_consumer_queue_length': 1000.0, 'allow_recovery_vb_remap': 0.0}, 'collection': None, 'force_txn': False}
file.sh: 2019-04-02 03:15:38,691: mt Starting new HTTP connection (1): ---
file.sh: 2019-04-02 03:15:39,128: mt bucket: ---
file.sh: 2019-04-02 03:16:31,707: w0 source : ---
file.sh: 2019-04-02 03:16:31,707: w0 sink : /backup(---)
file.sh: 2019-04-02 03:16:31,707: w0 : total | last | per sec
file.sh: 2019-04-02 03:16:31,707: w0 batch : 63 | 63 | 1.2
file.sh: 2019-04-02 03:16:31,707: w0 byte : 26809844 | 26809844 | 509981.0
file.sh: 2019-04-02 03:16:31,707: w0 msg : 3944 | 3944 | 75.0
file.sh: Exception in thread w2:] 73.7% (8537/estimated 11590 msgs)
file.sh: Traceback (most recent call last):
file.sh: File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
file.sh: self.run()
file.sh: File "/usr/lib/python3.6/threading.py", line 864, in run
file.sh: self._target(*self._args, **self._kwargs)
file.sh: File "/couchbase-cli/pump.py", line 448, in run_worker
file.sh: curx).run()
file.sh: File "/couchbase-cli/pump.py", line 506, in run
file.sh: rv_batch, batch = self.source.provide_batch()
file.sh: File "/couchbase-cli/pump_dcp.py", line 254, in provide_batch
file.sh: rv, batch = self.provide_dcp_batch_actual()
file.sh: File "/couchbase-cli/pump_dcp.py", line 413, in provide_dcp_batch_actual
file.sh: msg = (cmd, vbucket_id, key, flg, exp, cas, bytes([rev_seqno]), val, seqno, dtype, metalen,
file.sh: ValueError: bytes must be in range(0, 256)
file.sh: 2019-04-02 03:16:46,621: w1 source :---
file.sh: 2019-04-02 03:16:46,621: w1 sink : /---
file.sh: 2019-04-02 03:16:46,621: w1 : total | last | per sec
file.sh: 2019-04-02 03:16:46,621: w1 batch : 74 | 74 | 1.1
file.sh: 2019-04-02 03:16:46,621: w1 byte : 31811523 | 31811523 | 474734.3
file.sh: 2019-04-02 03:16:46,621: w1 msg : 3906 | 3906 | 58.3