Restic container not working with VPN : net/http: TLS handshake timeout

Hi,

I am trying to use the docker image resticker (GitHub - djmaze/resticker: Run automatic restic backups via a Docker container.).

However, I run into a problem when doing the setup :

Attaching to backup-1
backup-1  | Checking configured repository 's3:s3.eu-central-003.backblazeb2.com/mybackup' ...
backup-1  | Fatal: unable to open config file: Stat: Get "https://s3.eu-central-003.backblazeb2.com/mybackup/?location=": net/http: TLS handshake timeout
backup-1  | Is there a repository at the following location?

I notice that when I stop my VPN, the error goes away. I tried googling about it but can’t manage to find a satisfactory answer.

I do not want my backups to fail because I am using a VPN or have to remember to stop my VPN at a particular hour.

What can I do to make it work with the VPN ?

Here is my config file:

services:
  backup:
    image: mazzolino/restic
    hostname: docker
    environment:
      #RUN_ON_STARTUP: "true"
      BACKUP_CRON: "0 25 0 * * *"
      RESTIC_REPOSITORY: s3:s3.eu-central-003.backblazeb2.com/mybackup
      RESTIC_PASSWORD:"abracadabra"
      RESTIC_BACKUP_SOURCES: /mnt/videos/
      RESTIC_BACKUP_ARGS: >-
        --tag docker-volumes
        --exclude some-folder/cache
        --exclude *.tmp
        --exclude-file /etc/restic-ignore
        --verbose
      RESTIC_FORGET_ARGS: >-
        --keep-last 20
        --keep-daily 7
        --keep-weekly 5
        --keep-monthly 12
      AWS_ACCESS_KEY_ID: 'xxxxxxxxxxxxxxxxx'
      AWS_SECRET_ACCESS_KEY: "yyyyyyyyyyyyyyy"
      TZ: Europe/Berlin
    volumes:
      - /home/me/Videos:/mnt/videos:ro
      - /etc/restic-ignore:/etc/restic-ignore:ro

This doesn’t seem like a restic problem at all, you’d better off asking in the Docker Container github repo.

Probably in the container DNS isn’t working, or the network doesn’t route properly. You need to debug/understand that. But this isn’t a restic issue IMHO.

2 Likes

Ok. I stretched it a bit but I was hoping that someone could have had the same issue with the compose settings.

Thank you for your answer.

You were right indeed @tjh .

It was a docker (+host) problem.

Here is the solution for other wanderers : ssl - Network Issue: Timeout in Docker vs working in Host : TLS issue leads to not reachable in docker without network=host - Stack Overflow

3 Likes

Thank you for coming back and clarifying for future people!

1 Like