Fatal: unable to open config file ... dial tcp: lookup ... server misbehaving

Hello,

My daily backup does no longer work since last Sunday. It has worked flawlessly for the last 15 months without any change.

$ ./restic version
restic 0.16.2 compiled with go1.21.3 on linux/arm
$ ./restic check
using temporary cache in /tmp/restic-check-cache-1757935740
Fatal: unable to open config file: Stat: Get "https://s3.eu-central-003.backblazeb2.com/xxx/?location=": dial tcp: lookup s3.eu-central-003.backblazeb2.com on 192.168.1.1:53: server misbehaving
Is there a repository at the following location?
s3:s3.eu-central-003.backblazeb2.com/xxx

I have the same error with all the other commands.
I checked the config file on the bucket, I can read it and it is dated Sep. 2023. The error above seems to point to a DNS lookup issue. However, I can resolve the hostname and ping it.

$ host s3.eu-central-003.backblazeb2.com
s3.eu-central-003.backblazeb2.com has address 45.11.36.254
s3.eu-central-003.backblazeb2.com has address 45.11.39.254
s3.eu-central-003.backblazeb2.com has address 45.11.38.254
s3.eu-central-003.backblazeb2.com has address 45.11.37.254
s3.eu-central-003.backblazeb2.com has IPv6 address 2605:72c0:4fd:b3::b003:1
s3.eu-central-003.backblazeb2.com has IPv6 address 2605:72c0:4fe:b3::b003:1
s3.eu-central-003.backblazeb2.com has IPv6 address 2605:72c0:4ff:b3::b003:1
s3.eu-central-003.backblazeb2.com has IPv6 address 2605:72c0:4fc:b3::b003:1
$ ping s3.eu-central-003.backblazeb2.com
PING s3.eu-central-003.backblazeb2.com (45.11.37.254) 56(84) bytes of data.
64 bytes from s3.eu-central-003.backblazeb2.com (45.11.37.254): icmp_seq=1 ttl=53 time=16.3 ms
64 bytes from s3.eu-central-003.backblazeb2.com (45.11.37.254): icmp_seq=2 ttl=53 time=17.0 ms

Everything works fine with s3cmd:

$ s3cmd ls s3://xxx
                          DIR  s3://xxx/data/
                          DIR  s3://xxx/index/
                          DIR  s3://xxx/keys/
                          DIR  s3://xxx/snapshots/
2023-09-15 18:48          155  s3://xxx/config


$ s3cmd get s3://xxx/config
download: 's3://xxx/config' -> './config'  [1 of 1]
 155 of 155   100% in    0s   398.79 B/s  done

Running the command with DEBUG_LOG:

2025/04/15 11:22:47 debug/round_tripper.go:93   debug.loggingRoundTripper.RoundTrip     4       ------------  HTTP REQUEST -----------
GET /xxx/?location= HTTP/1.1
Host: s3.eu-central-003.backblazeb2.com
User-Agent: MinIO (linux; arm) minio-go/v7.0.63
Authorization: **redacted**
X-Amz-Content-Sha256: UNSIGNED-PAYLOAD
X-Amz-Date: 20250415T092247Z
Accept-Encoding: gzip


2025/04/15 11:22:47 debug/round_tripper.go:100  debug.loggingRoundTripper.RoundTrip     4       RoundTrip() returned error: dial tcp: lookup s3.eu-central-003.backblazeb2.com on 192.168.1.1:53: server misbehaving
2025/04/15 11:22:47 s3/s3.go:200        s3.(*Backend).ReadDir   1       ReadDir(key)
2025/04/15 11:22:47 s3/s3.go:210        s3.(*Backend).ReadDir   1       using ListObjectsV1(false)

Just tested with the latest version of restic and same error!

 $ ./restic_0.18.0_linux_arm -v list snapshots
Stat(<config/>) returned error, retrying after 809.520126ms: Stat: Get "https://s3.eu-central-003.backblazeb2.com/xxx/?location=": dial tcp: lookup s3.eu-central-003.backblazeb2.com on 192.168.1.1:53: server misbehaving

It looks like problem with your system networking. Any recent changes with your ISP etc.?

Can you run:

dig s3.eu-central-003.backblazeb2.com @192.168.1.1

I would try to change DNS configuration. Instead of 192.168.1.1 you are using at the moment change it to something like 1.1.1.1 or 9.9.9.9

Waouh, that must be that.

“Due to a court order in Belgium issued under Articles XVII.34./1. et seq. of the Code of Economic Law, the OpenDNS service is not currently available to users in Belgium. We apologize for the inconvenience.”

However, I am wondering why s3cmd works.

Who knows. Maybe it cached IP address some time ago, maybe using different DNS, maybe using IPv6 which is not blocked…

But restic relies 100% on your system DNS working:)