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 systemd fil missing env variable #410

Open
Cherkah opened this issue Jan 24, 2021 · 1 comment
Open

unbound systemd fil missing env variable #410

Cherkah opened this issue Jan 24, 2021 · 1 comment

Comments

@Cherkah
Copy link

Cherkah commented Jan 24, 2021

each times i start/restart unbound i get this warning:

unbound[33389]: [XXXXXXX] unbound[XXXXX:0] warning: Systemd mandatory ENV variable is not defined: LISTEN_PID

this due to the absence of the line DefaultEnvironment in /usr/lib/systemd/system/unbound.service
if am correct what should i have to add at DefaultEnvironment= ????

regards

@wcawijngaards
Copy link
Member

This happens because you have the option 'use-systemd: yes' enabled. This uses socket activation, it is where traffic on a socket makes systemd spawn the server. But then unbound starts but can not find the socket passed.

See documentation here
https://www.freedesktop.org/software/systemd/man/systemd.socket.html#
https://www.freedesktop.org/software/systemd/man/sd_listen_fds.html#
in man systemd.socket and man sd_listen_fds.

So not with the option you cite, that sets environment variables, but won't pass the socket.

If you do not want to use socket activation, you can set use-systemd: no in unbound.conf (the default).

Unbound also supports the use of sd_notify, and this is controlled by a compile time option. You have this option enabled, compile with systemd support.

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

2 participants