Page 1 of 1

DNS and restarting named

Posted: Wed Jun 12, 2019 10:15 pm
by bobmeetin
There was a problem with my initial hostname and account resulting in having to rename the host and not being able to get DNS to work after. To rename the host I did this through VestaCP then as I was still seeing problems did the cli command and since still not working edited /etc/hosts and /etc/hostname and then ran the command:

/etc/init.d/network restart

Still not working I went back to the control panel as admin/root and looked through the DNS settings and looked through all the entries. I found 2 NS records still pointing to the old host, updated those 2 entries It saved fine.

Next I went through the users and found a bogus one (due to the name change) and attempted to delete that user. If I click to delete this user I get a popup saying,

Error: named restart failed<br>Error: dns domain deletion failed

and it fails. Not sure where to start, I rebooted the server - no change. I asked the service provider how to restart named and they gave me a couple commands options saying,

"You could try systemctl restart named or systemctl restart bind depending upon what service you are installed on your server."

Honestly I am not skilled with networking - other than attempting to follow the Vesta manual this is not my skillset. I tried both commands and both failed:

% root@server: ~ $ systemctl restart named
Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details.

root@server: ~ $ systemctl restart bind
Failed to restart bind.service: Unit not found.

Curous, signed in via ssh, I cd /etc and did a grep on the original hostname and find it in a couple files:

[root@host etc]# grep -irl staging-devel *
[root@host etc]#

I can certainly edit those files and restart the server, but will that fix the DNS problems including the error of named refusing to restart through the control panel?

Re: DNS and restarting named

Posted: Thu Jun 13, 2019 1:41 am
by grayfolk
See "systemctl status named.service" and "journalctl -xe" for details
Did you see this? Looks like named config have errors.