DNS-Resolve broken on Android 9

It sems like restic is unable to perform a DNS resolve on Android 9, self-update and communication to Backblaze (maybe more) is broken.

Runtime environment:
Root-Shell on Android 9 on OnePlus3 with Magisk. Restic runs as native binary.
Tested Versions (all downloaded from github):
restic 0.9.5 compiled with go1.12.4 on linux/arm
restic 0.9.5 compiled with go1.12.4 on linux/arm64
restic 0.9.4 compiled with go1.11.4 on linux/arm
restic 0.8.0 compiled with go1.9 on linux/arm (no self-update, but also freeze at connecting to Backblaze)

Run command:
./restic self-update

writing restic to /data/data/com.termux/files/home/restic
find latest release of restic at GitHub
Fatal: unable to update restic: Get https://api.github.com/repos/restic/restic/releases/latest: dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:45978->[::1]:53: read: connection refused

Expected Output:
writing restic to /data/data/com.termux/files/home/restic
find latest release of restic at GitHub
restic is up to date

Additional informations:

  1. Running curl shows an expected output. Ping is also working.

  2. getprop | grep dns:
    [init.svc.mdnsd]: [running]
    [net.dns1]: [fd00::a96:d7ff:fe24:7bd7]
    [net.dns2]: []
    [net.dns3]: []
    But restic tries a lookup at [::1]:53

  3. Any interaction with a repository hosted at Backblaze causes the client to freeze without any output (even with -v). Only local repository could be tested successfully.

Use case:
My aim is to backup my device with restic. With termux:boot and crond an hourly efficient backup is possible.

Can you check the content of resolv.conf (probably located in /system/etc/)?


thank you for your hint.
I had the same problem like https://stackoverflow.com/questions/38959067/dns-lookup-issue-when-running-my-go-app-in-termux

There is no resolv.conf on Android - after creating a symlink in /sbin/.magisk/mirror/system/etc there is no further issue with self-update.

1 Like