You are not logged in.
I have a fresh Arch install. I have seen this problem with several go programs (AWS terraform provider, kubectl).
The error message looks something like this:
Unable to connect to the server: dial tcp: lookup <kubernetes domain> on [::1]:53: dial udp [::1]:53: socket: address family not supported by protocol
In attempting to resolve this, I have tried disabling IPv6 following the Wiki page. Before I did that, the error message did not say `address family not supported`.
In any case, there is nothing listening on `[::1]:53`, since IPv6 is disabled.
I'm not sure how to proceed here.
Last edited by aeons (2020-03-19 09:20:16)
Offline
After correctly editing `/etc/sysctl.d/40-ipv6.conf` as mentioned in the wiki, and restarting the machine, not just `sysctl`, it seems to work.
However, I'm not sure what to do if I wanted to use IPv6 as well.
Offline
Hi. How you fixed it? I have the exact same problem on fresh Arch installation.
My /etc/sysctl.d/40-ipv6.conf:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.enp34s0.disable_ipv6 = 1
net.ipv6.conf.wlo1.disable_ipv6 = 1
net.ipv6.conf.wlp33s0.disable_ipv6 = 1
I turned off ipv6 like this:
efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "Arch Linux" --loader /vmlinuz-linux --unicode 'root=PARTUUID=3434618c-5bea-904d-a5c6-e17068e9eff7 rw initrd=/amd-ucode.img initrd=\initramfs-linux.img ipv6.disable=1' --verbose
result of ip addr show:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp34s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 30:9c:23:e3:70:7f brd ff:ff:ff:ff:ff:ff
inet 192.168.0.10/24 brd 192.168.0.255 scope global enp34s0
valid_lft forever preferred_lft forever
3: wlo1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 48:89:e7:34:a8:96 brd ff:ff:ff:ff:ff:ff
altname wlp33s0
and rest of config files looks like this:
$ cat /etc/hosts
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost
127.0.1.1 hostName
$ cat /etc/resolv.conf
# Resolver configuration file.
# See resolv.conf(5) for details.
8.8.8.8
however when I'm trying to use kubectl I'm stil getting error like this:
$ kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
Unable to connect to the server: dial tcp: lookup raw.githubusercontent.com on [::1]:53: dial udp [::1]:53: socket: address family not supported by protocol
Offline
Those two steps + a reboot was what worked for me.
Offline
Hi, I had the same issue today. Tried disabling IPv6 but it didn't help (with a reboot) but I also noticed that `systemd-resolved` was not listening on `::1` when IPv6 _was_ enabled.
Linking the stub `resolv.conf` helped:
# ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
It's described as recommended here: https://wiki.archlinux.org/index.php/Sy … solved#DNS
Offline
Thanks man, I love you.
IPv6 is disabled in kernel and sysctl and still golang looks for IPv6. Took me 3 hours of googling until I found your answer.
Offline