<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello Experts</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I need some help with bind-chroot</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We are running below version of bind and bind-chroot</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
bind-9.11.2-lp151.10.1.x86_64<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
bind-chrootenv-9.11.2-lp151.10.1.x86_64<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Our Automation code is running to add Zone files to <span style="background-color:rgb(255, 255, 255);display:inline !important">
/var/lib/named/etc/named.conf</span> only and not to /etc/named.conf</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
So in order to reflect the zone files created in <span style="background-color:rgb(255, 255, 255);display:inline !important">/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<br>
lrwxrwxrwx 1 root root 29 Dec  9 11:03 named.conf -> /var/lib/named/etc/named.conf<br>
<br>
Now, when I make changes to file in <span style="background-color:rgb(255, 255, 255);display:inline !important">/var/lib/named/etc/named.conf and do a "service named restart"<br>
The file in /etc/named.conf fails to Load<br>
<br>
Error messages in /var/log/messages as below<br>
<br>
2021-12-09T11:04:46.684677+05:30 lavasadns1 systemd[1]: Stopped Berkeley Internet Name Domain (DNS).
<div>2021-12-09T11:04:46.685049+05:30 lavasadns1 systemd[1]: Starting Berkeley Internet Name Domain (DNS)...</div>
<div>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</div>
<div>2021-12-09T11:04:46.844546+05:30 lavasadns1 named.init[2509]: open: /etc/named.conf: file not found</div>
<div>2021-12-09T11:04:46.847806+05:30 lavasadns1 systemd[1]: named.service: Control process exited, code=exited status=6</div>
<div>2021-12-09T11:04:46.848137+05:30 lavasadns1 systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).</div>
<div>2021-12-09T11:04:46.848475+05:30 lavasadns1 systemd[1]: named.service: Unit entered failed state.</div>
<div>2021-12-09T11:04:46.848772+05:30 lavasadns1 systemd[1]: named.service: Failed with result 'exit-code'.</div>
<div>2021-12-09T11:05:31.657460+05:30 lavasadns1 systemd[1]: Starting Berkeley Internet Name Domain (DNS)...</div>
<div>2021-12-09T11:05:31.666976+05:30 lavasadns1 named.init[2573]: Name server configuration file /etc/named.conf does not exist.</div>
<span>2021-12-09T11:05:31.667600+05:30 lavasadns1 systemd[1]: named.service: Control process exited, code=exited status=6</span><br>
</span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span><br>
</span></span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span>and the Symbolic link changes color to Red. </span></span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span>Why is this happening? </span></span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span>And how can avoid this error</span></span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span><br>
</span></span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span>Regards</span></span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><span style="background-color:rgb(255, 255, 255);display:inline !important"><span>Harshith</span></span></span></div>
</body>
</html>