Connection Refused Error Upon Restarting the Netmaker Server

Issue

I've had CoreDNS enabled as a host and from time to time I get an error message when I try to restart the server with this command:

docker-compose down && docker-compose up -d

The error message is:

ERROR: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:41083->[::1]:53: read: connection refused

Resolution / Workaround

This is happening because there is no domain name resolver running on your server after taking down CoreDNS via docker-compose down. Note that systemd-resolved was disabled when you set CoreDNS as a host (done to prevent port conflict). Sometimes you can get away with it because of some lingering nameserver cache.

arrow-up-right

Please follow these steps in order to resolve the issue:

1

Start systemd-resolved temporarily

sudo systemctl start systemd-resolved.service
2

Start the netmaker server

docker-compose up -d
3

Stop and disable systemd-resolved again

sudo systemctl stop systemd-resolved.service
sudo systemctl disable systemd-resolved.service

Last updated

Was this helpful?