unbound icon indicating copy to clipboard operation
unbound copied to clipboard

unbound-control reload Doesn't reload settigns related to use-syslog and logfile

Open MMarco94 opened this issue 2 years ago • 5 comments

Describe the bug Changing logfile or use-syslog on unbound's config, and then calling unbound-control reload doesn't work; the new setting gets applied only after either a restart or a call to unbound-control log_reopen.

The same also happens if those setting gets changed via unbound-control set_option.

To reproduce Steps to reproduce the behavior:

sudo unbound-control set_option logfile: /tmp/unbound_log_test

Expected behavior Logs get written to /tmp/unbound_log_test. Actual behavior: log location doesn't change.

Workaround Calling unbound-control log_reopen or restarting unbound.

System:

  • Unbound version: 1.7.3
  • OS: Linux (custom version)
  • unbound -V output:
unbound: invalid option -- 'V'
usage:  unbound [options]
	start unbound daemon DNS resolver.
-h	this help
-c file	config file to read instead of /etc/unbound/unbound.conf
	file format is described in unbound.conf(5).
-d	do not fork into the background.
-v	verbose (more times to increase verbosity)
Version 1.7.3
linked libs: libevent 2.0.21-stable (it uses epoll), OpenSSL 1.0.2k-fips  26 Jan 2017
linked modules: dns64 python ipsecmod subnetcache respip validator iterator
BSD licensed, see LICENSE in source package for details.
Report bugs to [email protected]

Additional information N/A

MMarco94 avatar Mar 04 '22 15:03 MMarco94

I realize it's documented that unbound-control set_option shouldn't work.

However, the same behavior happens when going from logfile and use-syslog (and viceversa) by editing the config and then calling unbound-control reload: nothing happens until unbound-control log_reopen is called

MMarco94 avatar Mar 04 '22 17:03 MMarco94

unbound-control reload will reopen logfile when use-syslog set to 0. However, I encountered a problem. The logfile failed to be opened, and errno was 13 (Permission denied). Even though I changed the owner group of the logfile to unbound.

JiangHeng12138 avatar Mar 21 '22 09:03 JiangHeng12138

Do not add the -d when execute unbound. The above error will be not reported.

JiangHeng12138 avatar Mar 22 '22 07:03 JiangHeng12138

为什么termux中启动一直报错 image

jtmyd-top avatar Mar 27 '22 15:03 jtmyd-top

在termux中安装了unbound,pkg install unbound 并且正确配置了unbound.conf文件但是无法启动如上个评论所示 同时也获取了root权限

jtmyd-top avatar Mar 27 '22 15:03 jtmyd-top