• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Named/Bind will not start

  • Thread starter networkthinking
  • Start date
N

networkthinking

Guest
Hello,
I was trying to get the default ssl cert running and it crashed named. This is what I get when starting named:

0: /usr/local/psa/admin/htdocs/server/restart_services.php:19 psaerror(string "Unable to make action: Unable to manage service by dnsmng: dnsmng: Service named failed to start")

Any ideas? service named start also fails.

Wally
 
I would check the logs first and see what they say. Bind is usually fairly verbal in the logs when its starting up.
 
I was looking for the log. Where would I find it for bind?

Wally
 
Thanks.

Here is the error from /var/log/messages

Mar 1 23:15:08 nts510 named: Error in configuration file /etc/named.conf : Mar 01 23:15:08.057 starting BIND 9.2.4 -g Mar 01 23:15:08.057 using 2 CPUs Mar 01 23:15:08.062 loading configuration from '/etc/named.conf' Mar 01 23:15:08.068 no IPv6 interfaces found Mar 01 23:15:08.068 listening on IPv4 interface lo, 127.0.0.1#53 Mar 01 23:15:08.069 listening on IPv4 interface eth0, 192.168.10.15#53 Mar 01 23:15:08.069 listening on IPv4 interface eth0:1, 192.168.10.16#53 Mar 01 23:15:08.069 listening on IPv4 interface eth0:2, 192.168.10.17#53 Mar 01 23:15:08.069 listening on IPv4 interface eth0:3, 192.168.10.20#53 Mar 01 23:15:08.070 listening on IPv4 interface eth0:4, 192.168.10.18#53 Mar 01 23:15:08.074 command channel listening on 127.0.0.1#953 Mar 01 23:15:08.074 ignoring config file logging statement due to -g option Mar 01 23:15:08.074 couldn't open pid file '/var/run/named/named.pid': Permission denied Mar 01 23:15:08.074 exiting (due to early fatal error) failed
 
I have the exact same problem. named has been running for over 100 days and suddenly this problem started. i am not sure if i ever tried to resart named, but i am sure it never stopped on it's own before.

so once i noticed that it was down - i tried to satrt it using plesk. got an error. so i tried to start manually -- got the same error the one above. the only other bit of info i have is that i tried to su to named (from root) and got: This account is currently not available.
 
I'm replying to myself in case anyone else has this problem. I found that the problem was caused by a messed up named.conf. I am not sure how the conf file was screwed up, but what I did was replace /var/named/run-root/etc/named.conf with /var/named/run-root/etc/named.default. I then did for x in `ls`; do /usr/local/psa/admin/sbin/dnsmng update $x; done;/etc/init.d/named restart.
 
tmateosian,
This looks like it will fix it for me too. I replaced the named.conf with the default and it will run but I did not understand this line...

I then did for x in `ls`; do /usr/local/psa/admin/sbin/dnsmng update $x; done;/etc/init.d/named restart.

Can you help me with that? What is X?

Wally
 
x is going to be the file name returned by ls for each file in the directory. that line of script is just a quick way to perform the dnsmng utility on all files in the directory and then restart named. i forgot to mention that you want to be in the directory /var/named/run-root/etc first... so your steps would be like this:

1) cd /var/named/run-root/etc
2) mv named.conf named.conf.bak
3) cp named.conf.default named.conf
4) for x in `ls`; do /usr/local/psa/admin/sbin/dnsmng update $x; done;/etc/init.d/named restart
 
Sorry, I got the first part with no problem but the last line...

4) for x in `ls`; do /usr/local/psa/admin/sbin/dnsmng update $x; done;/etc/init.d/named restart

This is throwing me for a loop. Does all of that go on one line? Sorry, in advance I'm not getting this part. i typed and got the following

/usr/local/psa/admin/sbin/dnsmng update $x; done;/etc/init.d.named restart

bash: syntax error near unexpected token `done'
 
haha. just type the whole line verbatim starting right at the beginning - it's all one line. it's really several commands issued in one line, seperated by ; . funny you should mention loop, because that's exactly what it is. it loops thru all the files in the directory and issues that dnsmng command to them. i honestly didn't know if i had to perform dnsmng on just namd.conf or other files in the directory as well, so i just did it to all of them.
 
I am glad it worked for you. I have no idea what fouled up named.conf in my case. I suspect plesk did it somehow because i wasn't messing with it when it broke, but I can't recreate the problem.
 
the short way to fix this:

edit named.conf

after the initial bla-bla, there will we a line "include bla-bla / psa" (around line 120)

this line is a comment and should be marked as such.
(this is probably a bug in PSA.)

save, restart named

done.
 
when i do this, i get:

Segmentation Fault

and then named restarts...any ideas?
 
Originally posted by cmurphy
when i do this, i get:

Segmentation Fault

and then named restarts...any ideas?
Do you have psapowertoys installed? If you do,make sure the 'Include' line which it inserts has the path/filename with quotes around it.

include "/etc/psaptzone.files";

Also just wondering if you might have used a Windows based editor on the named.conf file? If so, then it will have put ^M chars at the end of lines which is a no-no. If so, then at the shell prompt do:

dos2unix named.conf

(you should already be in the /var/named/run-root/etc directory)
 
Originally posted by jamesyeeoc
Do you have psapowertoys installed? If you do,make sure the 'Include' line which it inserts has the path/filename with quotes around it.

include "/etc/psaptzone.files";

Also just wondering if you might have used a Windows based editor on the named.conf file? If so, then it will have put ^M chars at the end of lines which is a no-no. If so, then at the shell prompt do:

dos2unix named.conf

(you should already be in the /var/named/run-root/etc directory)


No power toys installed
Linux FC 1 server

logging into the box and entering a domain and disabling and then re-enabling "dns" works on most domains, but not on alot of others, any ideas?

Ive already done the instructions earlier in this post, i.e. backing up the named.conf and using the default one instead.

question is how do i get plesk to rebuild the named.conf so that ALL domains are listed in it.

right now im having to go through EVERY domain on the box in the plesk interface and disable and re-enable dns for that domain manually.

At 278 domains on the box this could take a while!
 
DNSMNG utility

question is how do i get plesk to rebuild the named.conf so that ALL domains are listed in it.
There is the 'dnsmng' command line utility, here is another thread where 'tmateosian' posts a way to rebuild named.conf from the zone files.

http://forum.sw-soft.com/showthread.php?threadid=22212&highlight=dnsmng

Originally posted by tmateosian. x is going to be the file name returned by ls for each file in the directory. that line of script is just a quick way to perform the dnsmng utility on all files in the directory and then restart named. i forgot to mention that you want to be in the directory /var/named/run-root/etc first... so your steps would be like this:

1) cd /var/named/run-root/etc
2) mv named.conf named.conf.bak
3) cp named.conf.default named.conf
4) for x in `ls`; do /usr/local/psa/admin/sbin/dnsmng update $x; done;/etc/init.d/named restart
Please see the full thread for complete details. This does assume that all the Plesk defined domains have a zone file in /var/named/run-root/var, so if there are any which are missing, then the named.conf file will not have those domains. Not the 'ideal' solution, but the only one I have found so far. I am still searching for a way to force the CP to rebuild from the 'psa' database which would be a better solution. Hope this helps.
 
yes i had already done that fix, using the named.conf.default. however the problem lies in that the psa database appears to not have full data on the zone settings.

If you log into plesk and looknin the DNS seciton for each domain, the information is there, but regardless those domains will not come up online.

Not until we manually went into EVERY down domain and first disabled DNS, then re-enabled it. as soon as we did that it started working.

However the cause of the issue here is more important for me than the fix.

anyway, thanks a ton for the help...
 
Originally posted by tmateosian
x is going to be the file name returned by ls for each file in the directory. that line of script is just a quick way to perform the dnsmng utility on all files in the directory and then restart named. i forgot to mention that you want to be in the directory /var/named/run-root/etc first... so your steps would be like this:

1) cd /var/named/run-root/etc
2) mv named.conf named.conf.bak
3) cp named.conf.default named.conf
4) for x in `ls`; do /usr/local/psa/admin/sbin/dnsmng update $x; done;/etc/init.d/named restart

This do not work for me..

i got this error after i type the last command

PHP:
dnsmng: Error: not existing domain 'localtime'
dnsmng: Error: not existing domain 'localtime'
dnsmng: Error: not existing domain 'named.conf'
dnsmng: Error: not existing domain 'named.conf'
dnsmng: Error: not existing domain 'named.conf.bak'
dnsmng: Error: not existing domain 'named.conf.bak'
dnsmng: Error: not existing domain 'named.conf.default'
dnsmng: Error: not existing domain 'named.conf.default'
dnsmng: Error: not existing domain 'rndc.conf'
dnsmng: Error: not existing domain 'rndc.conf'
dnsmng: Error: not existing domain 'rndc.conf.sample'
dnsmng: Error: not existing domain 'rndc.conf.sample'
Stopping named:                                            [FAILED]
Starting named: /bin/chown: cannot access `/var/named/run-root/var/named': No such file or directory
                                                           [FAILED]

Please advice...

Thanks
 
Back
Top