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 in 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.
Please follow these steps in order to resolve the issue:
temporarily start systemd-resolved:
βsudo systemctl start systemd-resolved.service
start the netmaker server:
βdocker-compose up -d
stop and disable the systemd-resolved, again:
βsudo systemctl stop systemd-resolved.service
βsudo systemctl disable systemd-resolved.service