---
title: "rndc: connect failed: connection refused error"
slug: "aa-00300"
description: "This is usually a configuration error."
updated: 2018-10-26T16:43:45Z
published: 2018-10-26T16:43:45Z
canonical: "kb.isc.org/aa-00300"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://kb.isc.org/llms.txt
> Use this file to discover all available pages before exploring further.

# I get "rndc: connect failed: connection refused" when I try to run rndc.

This is usually a configuration error.

First, ensure that **named** is running and no errors are being reported at startup (/var/log/messages or equivalent). Running `named -g &lt;usual arguments&gt;` from a title can help at this point.

Secondly, ensure that **named** is configured to use **rndc** either by `rndc-confgen -a`, `rndc-confgen` or manually. The [Administrators Reference Manual](https://kb.isc.org/docs/aa-01031) has details on how to do this.

Old versions of `rndc-confgen` used localhost rather than 127.0.0.1 in /etc/rndc.conf for the default server. Update /etc/rndc.conf if necessary so that the default server listed in /etc/rndc.conf matches the addresses used in `named.conf`. "localhost" has two addresses (127.0.0.1 and ::1).

If you use `rndc-confgen -a` and **named** is running with -t or -u, ensure that /etc/rndc.conf has the correct ownership and that a copy is in the chroot area. You can do this by re-running `rndc-confgen -a` with appropriate -t and -u arguments.
