ERROR : snapshots: failed to write list: http2: stream closed

Hi. I’ve been using restic with rclone and a Dropbox remote successfully, but today I started getting the following error when making a backup:

rclone: 2024/01/02 04:09:47 ERROR : snapshots: failed to write list: http2: stream closed

I ran the check command and check --read-data and see no errors.

First question: does that mean that all my files are successfully backed up?

Second question: what might be causing the error?

I ran with -vv to try to get a better indication of the context of the error:

open repository
repository 87bb27cb opened (repository version 2) successfully, password is correct
lock repository
using parent snapshot d97907aa
load index files
rclone: 2024/01/02 04:32:49 ERROR : snapshots: failed to write list: http2: stream closed
start scan on [...omitted...]
start backup on [...omitted...]
etc.

I am using restic 0.14.0 compiled with go1.19.8 on linux/amd64 and rclone version prints out:

rclone v1.65.0
- os/version: debian 12.4 (64 bit)
- os/kernel: 6.1.0-17-cloud-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.4
- go/linking: static
- go/tags: none

I recently upgraded Debian and the kernel bumped from 6.1.0-15-cloud-amd64 to 6.1.0-17-cloud-amd64, in case that might be relevant.

If check --read-data reports that the repository is ok, then your repository is fine.

Which restic version are you using?

The error message appears in a strange position. Restic reads the snapshots list before printing using parent snapshot d97907aa. Thus, the snapshots error looks like it can be ignored.

Like I mentioned above, I am using restic 0.14.0 compiled with go1.19.8 on linux/amd64.

Oh, sorry, I’ve missed that part.

That error is rather odd, restic always reads the full file listing returned by rclone. But based on a closer look at the code, it appears that the list request to rclone is never closed properly. That could explain the delayed error message. I’ve opened a PR (rest: fix and cleanup closing of http response body by MichaelEischer · Pull Request #4616 · restic/restic · GitHub) to clean that up. It might help with the error message you’re seeing or not.

You could also try whether restic 0.16.2 fixes the issue for you.

Thanks @MichaelEischer. Unfortunately or fortunately, depending on your perspective, the issue appears to have stopped reproducing, at least for now, without me making any changes.

1 Like

Ok, then let’s just hope that my PR addresses the correct underlying issue :slight_smile: