Named/Bind will not start

Discussion in 'Parallels Plesk Panel for Linux - 8.x and Older' started by networkthinking, Mar 1, 2005.

  1. networkthinking

    networkthinking New Member

    Messages:
    95
    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
  2. sieb@

    sieb@ New Member

    Messages:
    779
    I would check the logs first and see what they say. Bind is usually fairly verbal in the logs when its starting up.
  3. networkthinking

    networkthinking New Member

    Messages:
    95
    I was looking for the log. Where would I find it for bind?

    Wally
  4. sieb@

    sieb@ New Member

    Messages:
    779
    /var/log/messages
  5. networkthinking

    networkthinking New Member

    Messages:
    95
    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
  6. tmateosian

    tmateosian Guest

    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.
  7. tmateosian

    tmateosian Guest

    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.
  8. networkthinking

    networkthinking New Member

    Messages:
    95
    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
  9. tmateosian

    tmateosian Guest

    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
  10. networkthinking

    networkthinking New Member

    Messages:
    95
    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'
  11. tmateosian

    tmateosian Guest

    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.
  12. networkthinking

    networkthinking New Member

    Messages:
    95
    This worked. Thanks again!!!
  13. tmateosian

    tmateosian Guest

    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.
  14. manarak

    manarak New Member

    Messages:
    111
    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.
  15. cmurphy@

    cmurphy@ New Member

    Messages:
    91
    when i do this, i get:

    Segmentation Fault

    and then named restarts...any ideas?
  16. jamesyeeoc

    jamesyeeoc New Member

    Messages:
    2,620
    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)
  17. cmurphy@

    cmurphy@ New Member

    Messages:
    91

    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!
  18. jamesyeeoc

    jamesyeeoc New Member

    Messages:
    2,620
    DNSMNG utility

    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

    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.
  19. cmurphy@

    cmurphy@ New Member

    Messages:
    91
    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...
  20. VictorySaber

    VictorySaber New Member

    Messages:
    10
    This do not work for me..

    i got this error after i type the last command

    PHP:
    dnsmngErrornot existing domain 'localtime'
    dnsmngErrornot existing domain 'localtime'
    dnsmngErrornot existing domain 'named.conf'
    dnsmngErrornot existing domain 'named.conf'
    dnsmngErrornot existing domain 'named.conf.bak'
    dnsmngErrornot existing domain 'named.conf.bak'
    dnsmngErrornot existing domain 'named.conf.default'
    dnsmngErrornot existing domain 'named.conf.default'
    dnsmngErrornot existing domain 'rndc.conf'
    dnsmngErrornot existing domain 'rndc.conf'
    dnsmngErrornot existing domain 'rndc.conf.sample'
    dnsmngErrornot existing domain 'rndc.conf.sample'
    Stopping named:                                            [FAILED]
    Starting named: /bin/chowncannot access `/var/named/run-root/var/named': No such file or directory
                                                               [FAILED]
    Please advice...

    Thanks

Share This Page