Unable to configure CLI

Running

exercism configure --token=<my-token>

I am met with

Error: The base API URL 'https://api.exercism.org/v1' cannot be reached.

Get "https://api.exercism.org/v1/ping": dial tcp: lookup api.exercism.org on [::1]:53: read udp [::1]:38876->[::1]:53: read: connection refused

I am on Arch linux (x86_64). Anyone know what’s going wrong?

That looks like you’ve got IPv6 running but a DNS resolver that doesn’t support IPv6, ie you might have a broken network/DNS configuration.

Hmm I see, thanks. Do you know how I’d verify that this is the problem and how to fix it? I can successfully ping api.exercism.org. If I do have a broken configuration, I wonder how it hasn’t caused me bother until now…

You can try again later and/or try updating your DNS settings.

This seems to suggest Go is sending a DNS (UDP, port 53) lookup request to IPv6 localhost ([::1]). Are you running DNS on your localhost?

If you have dig installed, you can try to trace the DNS lookup:

# IPv4
dig +trace AAAA api.exercism.org
# IPv6
dig +trace A api.exercism.org

Ah! It seems I wasn’t in fact running DNS on my localhost. Seems to be fixed, thanks!