bind-chroot queries on symbolic Links to named.conf

Harshith Mulky harshith.mulky at outlook.com
Thu Dec 9 07:18:57 UTC 2021


Hello Experts

I need some help with bind-chroot

We are running below version of bind and bind-chroot

bind-9.11.2-lp151.10.1.x86_64
bind-chrootenv-9.11.2-lp151.10.1.x86_64

Our Automation code is running to add Zone files to /var/lib/named/etc/named.conf only and not to /etc/named.conf

So in order to reflect the zone files created in /var/lib/named/etc/named.conf in /etc/named.conf, i created a symbolic link in /etc as "ln -s /var/lib/named/etc/named.conf named.conf" to reflect as below
lrwxrwxrwx 1 root root 29 Dec  9 11:03 named.conf -> /var/lib/named/etc/named.conf

Now, when I make changes to file in /var/lib/named/etc/named.conf and do a "service named restart"
The file in /etc/named.conf fails to Load

Error messages in /var/log/messages as below

2021-12-09T11:04:46.684677+05:30 lavasadns1 systemd[1]: Stopped Berkeley Internet Name Domain (DNS).
2021-12-09T11:04:46.685049+05:30 lavasadns1 systemd[1]: Starting Berkeley Internet Name Domain (DNS)...
2021-12-09T11:04:46.735359+05:30 lavasadns1 named.init[2509]: Starting name server BIND cp: cannot stat '/etc/named.conf': No such file or directory
2021-12-09T11:04:46.844546+05:30 lavasadns1 named.init[2509]: open: /etc/named.conf: file not found
2021-12-09T11:04:46.847806+05:30 lavasadns1 systemd[1]: named.service: Control process exited, code=exited status=6
2021-12-09T11:04:46.848137+05:30 lavasadns1 systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
2021-12-09T11:04:46.848475+05:30 lavasadns1 systemd[1]: named.service: Unit entered failed state.
2021-12-09T11:04:46.848772+05:30 lavasadns1 systemd[1]: named.service: Failed with result 'exit-code'.
2021-12-09T11:05:31.657460+05:30 lavasadns1 systemd[1]: Starting Berkeley Internet Name Domain (DNS)...
2021-12-09T11:05:31.666976+05:30 lavasadns1 named.init[2573]: Name server configuration file /etc/named.conf does not exist.
2021-12-09T11:05:31.667600+05:30 lavasadns1 systemd[1]: named.service: Control process exited, code=exited status=6

and the Symbolic link changes color to Red.
Why is this happening?
And how can avoid this error

Regards
Harshith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20211209/30e2639b/attachment.htm>


More information about the bind-users mailing list