Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unbound-docker-rpi 1.17.1 fails to start due to missing file unbound.log #45

Open
JEllgring opened this issue Mar 18, 2023 · 3 comments

Comments

@JEllgring
Copy link

Describe the bug
The container of unbound-docker-rpi, version 1.17.1 hangs in a restart loop after trying to start it.

The reason for this behaviour is the missing (compared to version 1.17.0) file data/opt/unbound/etc/unbound/unbound.log
in the source code.
Because of this, unbound.sh fails at line 376:
chown _unbound:_unbound /opt/unbound/etc/unbound/unbound.log && \

To Reproduce
Steps to reproduce the behavior:

  1. Build the image from source
  2. Run the container with
    docker run --name=unbound \ --publish=53:53/tcp \ --publish=53:53/udp \ --restart=unless-stopped \ --detach=true \ unbound-rpi64:1.17.1
  3. Watch the container restarting with docker ps

Error messages
Output of docker logs unbound is

chown: cannot access '/opt/unbound/etc/unbound/unbound.log': No such file or directory
[1679170954] unbound[1:0] warning: unbound is already running as pid 1.
[1679170954] unbound[1:0] error: unable to open var/root.key for reading: No such file or directory
[1679170954] unbound[1:0] error: error reading auto-trust-anchor-file: var/root.key
[1679170954] unbound[1:0] error: validator: error in trustanchors config
[1679170954] unbound[1:0] error: validator: could not apply configuration settings.
[1679170954] unbound[1:0] error: module init for module validator failed
[1679170954] unbound[1:0] fatal error: failed to setup modules

Additional context
Solution:
Add a line to unbound.sh before the chown:
touch /opt/unbound/etc/unbound/unbound.log && \
chown _unbound:_unbound /opt/unbound/etc/unbound/unbound.log && \

@Gatsby-Lee
Copy link

@JEllgring thank you

@DrTuup
Copy link

DrTuup commented Mar 10, 2024

I've found a temporary solution to this. You can mount a volume with your file to the container, just to make sure that it exists like this:
volumes: - "your/config/dir:/opt/unbound/etc/unbound/unbound.log"

Hope this helps.

@ajsobrino700
Copy link

@DrTuup your solution is good, the error is too in the version 1.19.2 @MatthewVance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants