Why is my Bind9 Docker container crashing in recursive mode?

0
30
Asked By CuriousCat123 On

Hey folks, I'm working on setting up a Bind9 recursive container and I'm running into some issues. I managed to run it with a basic named.conf configuration, but it's not what I need. I'm trying to use a different config that includes forwarders and additional settings, but the container keeps crashing with an exit code 1. Here's the working config:

```
# named.conf
options {
directory "/var/cache/bind";
recursion yes;
allow-query { any; };
};

zone "example.com" IN {
type master;
file "/etc/bind/zones/db.example.com";
};
```

And here's the config that crashes:
```
# named.conf
options {
directory "/var/cache/bind";
recursion yes;
allow-query { any; };
forward only;
listen-on { any; };
listen-on-v6 { any; };
};

zone "testzone.net" IN {
type forward;
forward only;
forwarders { 172.0.200.3; };
};

zone "." IN {
type forward;
forward only;
forwarders {
8.8.8.8;
8.8.4.4;
1.1.1.1;
1.0.0.1;
};
};
```

When I run `docker compose up`, I just see repeated exit messages with code 1. My docker-compose.yml hasn't changed either. I'm running this on Debian 13 with Docker version 28.4.0. Any advice would be super helpful! Thanks!

2 Answers

Answered By NetworkNerd77 On

You should definitely check the logs for your Bind9 container by running `docker logs bind9`. Remember, the logs shown with `docker compose up` are just Docker messages, not the application logs. If you want to see them live, use the `-f` flag when checking logs!

LogWatcher99 -

Exactly! Also, just a heads up, running it without the `-d` flag means you'll see logs in the terminal directly, which is useful for debugging.

Answered By TechGuru99 On

It looks like you're having issues with the Docker container not starting properly. The logs you shared are more about Docker itself, not your Bind9 instance. It seems like your container is just restarting non-stop. Make sure to check the actual Bind9 logs on your mapped filesystem, which should give you more insight into what's going wrong.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.