> 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). Agents can also search and read this documentation through its [MCP server](https://learn.netmaker.io/~gitbook/mcp).

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
