# 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:

```bash
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.

[![](https://downloads.intercomcdn.com/i/o/995568988/d6e31abc155c0116da72a7a4/image.png?expires=1769018400\&signature=0335e83d2dd64d1abb556f6f14dc9d5170884e3a23ae758e4884e6605cf8a3ca\&req=fSkiE892lIlXFb4f3HP0gKBA3dDQGEqefhIOPXjnHg755jaM6HSkJdwOlmZU%0AYCSrrgJBjcEEBR1IUQ%3D%3D%0A)](https://downloads.intercomcdn.com/i/o/995568988/d6e31abc155c0116da72a7a4/image.png?expires=1769018400\&signature=0335e83d2dd64d1abb556f6f14dc9d5170884e3a23ae758e4884e6605cf8a3ca\&req=fSkiE892lIlXFb4f3HP0gKBA3dDQGEqefhIOPXjnHg755jaM6HSkJdwOlmZU%0AYCSrrgJBjcEEBR1IUQ%3D%3D%0A)

Please follow these steps in order to resolve the issue:

{% stepper %}
{% step %}

### Start systemd-resolved temporarily

```bash
sudo systemctl start systemd-resolved.service
```

{% endstep %}

{% step %}

### Start the netmaker server

```bash
docker-compose up -d
```

{% endstep %}

{% step %}

### Stop and disable systemd-resolved again

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

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.netmaker.io/help-articles/connection-refused-error-upon-restarting-the-netmaker-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
