Not able to restart Named from controlpanel after update

renew

Verified User
Joined
Nov 28, 2023
Messages
5
Hey Guys,

There was a nother update to Directadmin and often this breaks something in my server.
And this time i wanted to restart Named true the control panel and ended up with this error.
Cannot find the script in /etc/systemd/system, /usr/lib/systemd/system, nor /lib/systemd/system​
Details
/lib/systemd/system/named.service​

Try'd to figure it out and checked multiple posts here but without result.

Could anyone please help me out?
After a reboot my whole server was acctually down because named doesnt start anymore all togheter.

I needed to start it by using:
systemctl start named-chroot.service

To get it running again.
 
looks like you using old os? last time named chrooted in my practice on centos6 on some updates.
 
looks like you using old os? last time named chrooted in my practice on centos6 on some updates.
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.14.32-xxxx-grs-ipv6-64
Architecture: x86-64
 
You probably have installed bind-chroot instead of bind at some point in time. Odd.
I would suggest creating a backup and then installing and reactivating named and removing bind-chroot.

Or create a symlink to the named-chroot.service as a workaround.
 
weird. check if named chrooted:
ps -ax | grep named
if you see something like /var/named/chroot
and if all zones in /var/named/chroot/var/named
you need to un-chroot it.
move all dns zones from /var/named/chroot/var/named to /var/named
move /var/named/chroot/etc/named.conf and /var/named/chroot/etc/rndc.key directly to /etc dir
comment line ROOTDIR in /etc/sysconfig/named
then kill current named process and restart service
 
weird. check if named chrooted:
ps -ax | grep named
if you see something like /var/named/chroot
and if all zones in /var/named/chroot/var/named
you need to un-chroot it.
move all dns zones from /var/named/chroot/var/named to /var/named
move /var/named/chroot/etc/named.conf and /var/named/chroot/etc/rndc.key directly to /etc dir
comment line ROOTDIR in /etc/sysconfig/named
then kill current named process and restart service
This ps -ax | grep named resulted in:
1621 pts/0 S+ 0:00 grep --color=auto named
32190 ? Ssl 0:00 /usr/sbin/named -u named -t /var/named/chroot

Yep all zones look to be in /var/named/chroot/var/named

Ok so let me get this straight.
Step 1: I move /var/named/chroot/var/named to /var/named
Step 2: i move /var/named/chroot/etc/named.conf to /etc
Step 3: i move /var/named/chroot/etc/rndc.key to /etc
Step 4: nano /etc/sysconfig/named
And i set it to rootdir

Question 1:
if i look at the named file in sysconfig i don't see any dir refference.
But this:
# BIND named process options
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# OPTIONS="whatever" -- These additional options will be passed to named
# at startup. Don't add -t here, enable proper
# -chroot.service unit file.

Don't really know were to add it.

Question 2:
What would happen after a reboot? Would named start automaticly again?

And at what way wil i be able to restart the named service then because it i do service named start i get a error that its missing files etc.

Question 3:
Would this also fix the issue in the directadmin controlpanel (making it able to restart from the control panel again)

Tnks a lot for your effort.
 
You probably have installed bind-chroot instead of bind at some point in time. Odd.
I would suggest creating a backup and then installing and reactivating named and removing bind-chroot.

Or create a symlink to the named-chroot.service as a workaround.
If i would do this.

Would i need to do something afterwords to get all zone's back in order and running?
and to get it start automaticly at reboot and to get it working from the directadmin control panel again?

Both solutions scare me a litle bit because i'm scared of wrecking the server whaha
 
I provided manual for centos6 - in centos 7 maybe in another path/file chroot path declared, /etc/sysconfig/blabla or /etc/init.d/blabla I don't remember, must be without it - so named will use its default /var/named/
if you can't find - you can try just kill/restart and check if all zones still in normal place and in processes not mentioned chroot path.
 
Both solutions scare me a litle bit because i'm scared of wrecking the server whaha
I can imagine. But I can't guarantee 100% and if you don't know how to fix it, then a symlink might be the best solution.

But as long as you have a backup of all domain.tld.db and the named.conf file you should be fine.
All .db files will be set to /var/named and not in /var/named/chroot or something like that anymoer. However it might be needed to adjust the path in the named.conf file then too.

So a symlink would be the safest solution for you probably. Or you can hire somebody to fix it for you.
 
I can imagine. But I can't guarantee 100% and if you don't know how to fix it, then a symlink might be the best solution.

But as long as you have a backup of all domain.tld.db and the named.conf file you should be fine.
All .db files will be set to /var/named and not in /var/named/chroot or something like that anymoer. However it might be needed to adjust the path in the named.conf file then too.

So a symlink would be the safest solution for you probably. Or you can hire somebody to fix it for you.
tnk you
 
Back
Top