> For the complete documentation index, see [llms.txt](https://learn.netmaker.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.netmaker.io/help-articles/connection-refused-error-upon-restarting-the-netmaker-server.md).

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

<figure><img src="https://downloads.intercomcdn.com/i/o/995568988/d6e31abc155c0116da72a7a4/image.png?expires=1769018400&#x26;signature=0335e83d2dd64d1abb556f6f14dc9d5170884e3a23ae758e4884e6605cf8a3ca&#x26;req=fSkiE892lIlXFb4f3HP0gKBA3dDQGEqefhIOPXjnHg755jaM6HSkJdwOlmZU%0AYCSrrgJBjcEEBR1IUQ%3D%3D%0A" alt=""><figcaption></figcaption></figure>

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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
