1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

rndc: no server specified and no default

Discussion in 'General Discussion' started by eger, Jul 15, 2004.

  1. eger

    eger Member

    Joined:
    Feb 28, 2003
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    16
    i am getting this error after i rebooted my freebsd 4.9 machine:

    Code:
    rndc: neither /etc/namedb/rndc.conf nor /etc/namedb/rndc.key was found
    not sure whats going on. i read for some other ndc problems there was a script that fixed them. so i ran /scripts/fixndc and here was the output:

    Code:
    su-2.05b# /scripts/fixndc
    Found controls in named.conf ..
    Adding key...
    Restarting bind.....Waiting for named to restart..............finished.
    
    rndc: no server specified and no default
    
    named started ok
    Jul 14 22:43:08 backstow named[86939]: starting BIND 9.2.3 -u bind -c /etc/namedb/named.conf
    Jul 14 22:43:08 backstow named[86939]: none:0: open: /etc/namedb/rndc.key: file not found
    Jul 14 22:43:08 backstow named[86939]: /etc/namedb/named.conf:6: couldn't install keys for command channel 127.0.0.1#953: file not found
    Jul 14 22:43:08 backstow named[86939]: /etc/namedb/named.conf:6: couldn't add command channel 127.0.0.1#953: file not found
    Jul 14 22:43:08 backstow named[86939]: couldn't open pid file '/var/run/named.pid': File exists
    Jul 14 22:43:08 backstow named[86939]: exiting (due to early fatal error)
    Done
    All fixed
    su-2.05b#
    now everytime i try to use ndc to reload or restart bind i get this error:

    Code:
    rndc: no server specified and no default
    not sure whats goin on or why those files dont exist =\

    could anyone help me out?
     
  2. JamesSmith

    JamesSmith Member

    Joined:
    Sep 17, 2003
    Messages:
    197
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    I have the exact same problem, on one of the machines named is unable to start, the others are working purely because the machine and named havnt restarted since what ever has made this change.
     
  3. eger

    eger Member

    Joined:
    Feb 28, 2003
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    16
    this problem was solved by my license provider support. i do not know what the exact solution was. sorry.
     
  4. JamesSmith

    JamesSmith Member

    Joined:
    Sep 17, 2003
    Messages:
    197
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    Got it sorted anyway :)

    Overriding problem came from bind being unable to make the pid file in /var/run after updating to bind9.
     
  5. alakon

    alakon New Member

    Joined:
    Apr 12, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    We are having the same problem- what is the solution?
     
  6. JamesSmith

    JamesSmith Member

    Joined:
    Sep 17, 2003
    Messages:
    197
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    Change permissions on /var/run so bind can create the pid file.
     
  7. neraath

    neraath New Member

    Joined:
    May 25, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Aggieland, TX
    I attempted to change the permissions (to 766) on /var/run and that did not fix this same exact problem for me. I'm currently having the tech support team look into this for me, but what's really weird about this is the fact that my RNDC key randomly got deleted. I doubt it was a hack of any sort, because plenty more files would be gone in that case, but I am totally stumped. I don't know if recreating the key will fix the problem or not, but reinstalling the BIND9 port did not fix the issue.
     
  8. aboyz

    aboyz Member

    Joined:
    Sep 29, 2003
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    same problem here!!

    Hii,

    what is the solution to this.. I tried to /scritps/fixndc and that didn't work!!. Please help.. This happen when you upgrade to bind 9.2.3 what is going on>?? It doesn't work on all freebsd version.. 4.9 no good 4.10 no good 5.2.1 no good. What is going on. All getting the same error.

    please help!!
     
  9. neraath

    neraath New Member

    Joined:
    May 25, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Aggieland, TX
    Figured out my problem. The first problem had to deal with incorrect permissions on the /var/run directory. When I did change the permissions to 777, it worked just fine. However, because I don't want an open vulnerability like that, one of the technicians at my host I talked to recommended that I put the following line into my named.conf file:

    Code:
    pid-file "/tmp/named.pid";
    
    That way, the permissions on the /var/run directory can stay at 744, secured. :) Also, that goes under the options section! Now, for the RNDC key problem, what I found was that my rndc.conf and rndc.key file were missing. When I run /scripts/fixndc, they create them automatically, but they are completely empty. So, I took the suggestions from other users who had rndc.conf files already in place, and took the rndc.conf.sample file (found in the same directory), copied it to rndc.conf and renamed "key" to "rndckey" each place that it was found. Once I had done that, then I was able to run /scripts/fixndc and it looked like the problem has been solved. The script fixed everything, though the rndc.key file is still empty. Not sure what to do about that, but for the meantime I'm not longer getting errors. Hope this helps.
     
    #9 neraath, Aug 1, 2004
    Last edited: Aug 1, 2004
  10. jerrypr

    jerrypr New Member

    Joined:
    Jan 12, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    I'm very impressed... two steps, problem solved.

    Worked for me, I'm much obliged :).

    Thanks,
    J.
     
  11. nicnicy

    nicnicy New Member

    Joined:
    Apr 19, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Fatal, neither ndc or rndc was found on this server

    Fatal, neither ndc or rndc was found on this server

    while naming server or adding new useraccount


    Please any guru with freeBSD experience
    or goodwilling newby like me

    can you please comment and give me advice
    (no dont go tell me to flush it :) )
    im on this for 3 weeks now before i dared to post here


    Fatal, neither ndc or rndc was found on this server


    running
    WHM 10.1.0 cPanel 10.2.0-R4
    FreeBSD 5.3-RELEASE i386 - WHM X

    this is a fresh new Cpanel install

    and so am i!
    This is how i started this month with my FIRST dedicated woohoo.
    EVER FLEW a jumbo 747 while just learned how to ride a bycycle ?
    this is how this noob/newby feels while crashing down and the console says
    RED RED RED balls but before you tell me search is my best friend please
    have some patience with me, maybe you can explain

    im a total newby and fixed (not completely) this error by reading the forum
    1 moment i had Bind9 working YESYES

    but the
    "Fatal, neither ndc or rndc was found on this server" message always been there
    when i add a new user account

    /scripts/fixndc
    fix nrcd does not work on freeBSD!!
    reading this forum it has been reported a bug and should be
    fixed in the next release, but that was a post of last year???
    anyway i need a solution now offcourse :)

    this folowing helped with the bind9 part not showing red anymore after
    typing in cp /usr/local/sbin /usr/sbin/named


    did an PTR in-addr.arpa on the shared ip


    generated a new key
    rndc-confgen -u /dev/urandom



    edited the -
    vi named.conf ; nrcd.conf ; nrcd.key (took the - out of nrcd-key)


    set chmod 755 on
    pid-file "/var/tmp/named.pid";


    this is my named.conf

    --------------------------------------
    zone "." {
    type hint;
    file "/var/named/named.ca";
    };







    key "rndckey" {
    algorithm hmac-md5;
    secret "I6kxyblablablaxxxxxxx==";
    };

    controls {
    inet 127.0.0.1 port 953
    allow { 127.0.0.1; } keys { "rndckey"; };
    };


    // $FreeBSD: src/etc/namedb/named.conf,v 1.15.2.1 2004/09/30 23:36:07 dougb Exp
    $
    //
    // Refer to the named.conf(5) and named(8) man pages, and the documentation
    // in /usr/share/doc/bind9 for more details.
    options {
    directory "/etc/namedb";
    pid-file "/var/run/named/pid";
    pid-file "/var/tmp/named.pid";
    dump-file "/var/dump/named_dump.db";
    statistics-file "/var/stats/named.stats";

    };
    zone "1230985.xxl.nut.net" { type master; file "/etc/namedb/1230985.xxl.nut.net.db";
    };

    zone "webhostingdomain.com" { type master; file "/etc/namedb/webhostin
    gdomain.com.db"; };

    zone "111.222.333.44.in-addr.arpa" { type master; file "/etc/namedb/111.222.333.
    44.in-addr.arpa.db"; };

    zone "secondomain.com" {
    type master;
    file "/etc/namedb/secondomain.db";
    };

    -----------------------------------

    then i symlinked


    ls -s /etc/namedb/named.conf /etc/named.conf
    ls -s /etc/namedb/nrcd.conf /etc/nrcd.conf
    ls -s /etc/namedb/nrcd.key /etc/nrcd.key


    it worked for a while and then poof all gone
    this where my first steps in serverland

    can you please give me some suggestions ?
    it worked for 50%, after adding or deleting a user
    the other users are not visible anymory by domainname (only with ip)
    had server status all in the green!
    after gracefull reboot the red balls are back gradually all back green
    except for BIND , keys have not been altered
    im confused and hope you can help



    Them Cuiper aka TC.
     
    #11 nicnicy, May 4, 2005
    Last edited: May 16, 2005
  12. JamesSmith

    JamesSmith Member

    Joined:
    Sep 17, 2003
    Messages:
    197
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    Try sym linking ndc to rndc, had this problem on a few servers after a cPanel update and that resolved it for us:

    ln -s /usr/local/sbin/rndc /usr/sbin/ndc
     
  13. nicnicy

    nicnicy New Member

    Joined:
    Apr 19, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    re symlink rndc to ndc

    YES


    James !!! :)
    Big thumbs up to you.




    You SOLVED the problem, it was amazing to see all working at once after this line
    Thank you very much for i was real desperate


    Thank You James


    TC
     
    #13 nicnicy, May 4, 2005
    Last edited: May 5, 2005
  14. nicnicy

    nicnicy New Member

    Joined:
    Apr 19, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Fatal, neither ndc or rndc was found on this server

    posting again about

    Fatal, neither ndc or rndc was found on this server


    running
    WHM 10.1.0 cPanel 10.2.0-R4
    FreeBSD 5.3-RELEASE i386 - WHM X



    TC here back with bad news, the fix is not permanent.



    next day looked at websites Poof gone again seeing the apache templatescreen of the server now


    the message Fatal, neither ndc or rndc was found on this server stayed after the symlink
    but all websites where up at once

    I think i can live with an errormessage if all systems work.
    I do not complaint.
    A goodwilling fellow webmaster comes up with an idea to get back in business
    as a patch for software that suposed to work im thankfull i do not complain
    (pinning the bad holes with bubble gum and keeping it together with shoelace. :) )


    I hope to get a definite solution, or am i the only noob in the world taking a licence Cpanel on freeBSD5.3 ??? please share me how you solved it, reading back the forumhistory this has anoyed many webmasters in the past.


    TC
     
  15. JamesSmith

    JamesSmith Member

    Joined:
    Sep 17, 2003
    Messages:
    197
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    Do you have cPanel set to auto update or manual? Nothing will change unless its doing something, like a upcp or sysup update.

    I would recommend setting this to manual if its on auto, you’re running the risk of things breaking in the night using the auto feature. Would be best to set a maintenance window each week, let your customers know there may be work carried out in that time. Such as cPanel update etc.
     
  16. nicnicy

    nicnicy New Member

    Joined:
    Apr 19, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    thanks RE Fatal, neither ndc or rndc was found on this server

    Hi James,

    its crazy that i would be the only person with this problem on freeBSD and Cpanel within 600 miljon websites.


    That is good advice, good that a Pro like you points out and shows me some ropes
    this is a totaly different job then programming/websitebuilding.

    Thanks, yes i DID put all on manual update, reading that not all updates mean a better working server but lets say i would try the bleeding edge would that give me an update to this fatal nrdc problem on freeBSD5.3 ? if not is there a safe rollback escape ?

    you remember this morning all websites where gone, i did a gracefull restart and slowly
    all red status turned green + all websites are up !

    BUT is that okay to hit that reboot button so often?


    i would not be suprised now when i add a new useraccount all goes down and
    restarting put them all up again, is restarting BIND from Cpanel different then restarting named from ssh ?

    the problem
    "Fatal, neither ndc or rndc was found on this server "
    still stands and i invite people to comment on this


    thanks

    TC
     
    #16 nicnicy, May 5, 2005
    Last edited: May 5, 2005
  17. easyhoster1

    easyhoster1 Member

    Joined:
    Sep 25, 2003
    Messages:
    658
    Likes Received:
    0
    Trophy Points:
    16
    When you restart bind, what comes up in /var/log/messages ?
     
  18. nicnicy

    nicnicy New Member

    Joined:
    Apr 19, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Fatal, neither ndc or rndc was found on this server

    tail -f /var/log/messages
    May 5 18:53:10 www1 named[444]: could not listen on UDP socket: permission denied
    May 5 18:53:10 www1 named[444]: creating IPv4 interface lo0 failed; interface ignored


    lots of permission denied messages like this




    -----
    restart bind
    -----

    19:13:53 www1 named[444]: stopping command channel on 127.0.0.1#953
    May 5 19:13:53 www1 named[444]: exiting
    May 5 19:13:53 www1 named[18011]: starting BIND 9.3.1 -u bind -c /etc/namedb/named.conf
    May 5 19:13:53 www1 named[18011]: command channel listening on 127.0.0.1#953
    May 5 19:13:53 www1 named[18011]: running
    May 5 19:13:54 www1 named[18011]: stopping command channel on 127.0.0.1#953
    May 5 19:13:54 www1 named[18011]: exiting
    May 5 19:13:54 www1 named[18017]: starting BIND 9.3.1 -u bind -c /etc/namedb/named.conf
    May 5 19:13:54 www1 named[18017]: command channel listening on 127.0.0.1#953
    May 5 19:13:54 www1 named[18017]: running


    thanks to James tip i now have improvement

    al works for a while

    Fatal, neither ndc or rndc was found on this server
    stays



    TC
     
  19. jerrypr

    jerrypr New Member

    Joined:
    Jan 12, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Your not running as the right user. Usually you have to run named as root, or it
    won't be able to bind to the right ports.

    Did you try a "find / -name ndc" to see where your ndc is located? It should
    come with this version of bind, if memory serves.

    J.
     
  20. nicnicy

    nicnicy New Member

    Joined:
    Apr 19, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Fatal, neither ndc or rndc was found on this server

    www1 is the name of the server, i login to ssh commandline under root
    or do you mean that i should rename server to root.domain.com


    im running a new Cpanel install WHM 10.1.0 cPanel 10.2.0-R4 freeBSD5.3


    yes i can find my ndc :) actually due to james trick im letting
    freeBSD think rndc is in the right location.
    my question is
    "Fatal, neither ndc or rndc was found on this server" is the error that stays after putting
    this fix, why? it can find it in the right location now.
    As i had written i could live with an error but the box collapses every day.

    the symptoms are
    after i had it all running and fixed, all websites are gone every new day, + can't send mail
    after a reboot all works



    as you can read back i have put all my info and what i have done,
    before asking a question have tried all (as you can see in the .conf files)


    Come on you Pro's

    Can you point me some clues what to do



    TC.
     
    #20 nicnicy, May 7, 2005
    Last edited: May 7, 2005

Share This Page