1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Bind Named FreeBSD5.4

Discussion in 'Plesk for Linux - 8.x and Older' started by DCoats, Oct 28, 2005.

  1. DCoats

    DCoats Guest

    Here are the specific's as I see them.

    PSA for some reason on FREEBSD 5.4 writes to /usr/local/psa/named/run-root/etc/named.conf while the actual named.conf that is in use by named is /usr/local/psa/named/run-root/etc/namedb/named.conf
    I have tried alot of different ways to solve/work around this issue, It would seem that a simple symlink from /usr/local/psa/named/run-root/etc/namedb/named.conf to /usr/local/psa/named/run-root/etc/named.conf would solve this issue, but when plesk writes a new domain to /usr/local/psa/named/run-root/etc/named.conf the symlink is overwritten by the actual file, therefore the rndc reload doesnt load the ..../etc/named.conf just written by psa it loads the ...../etc/namedb/named.conf that was already in use by named.

    In addition I have also tried linking the other way from ..../etc/named.conf to ...../etc/namedb/named.conf but in this case named will not start, named in a chroot dir will not start using a symlink as specified in /etc/rc.d/named.

    If we simply start named using /usr/sbin/named -c /etc/named.conf -t /usr/local/psa/named/run-root/ all is fine accept the fact that the plesk panel doesnt know that named is running. So you dont have the ability to stop/start/restart from plesk panel.

    So we let plesk start named itself which uses /etc/rc.d/named which in turn starts named using /usr/sbin/named -t /usr/local/psa/named/run-root/ therefore its using the namedb/named.conf

    The best way to fix this issue would simply be to tell psa to write to /usr/local/psa/named/run-root/etc/namedb/named.conf
    and stop writing to /usr/local/psa/named/run-root/etc/named.conf
    or to tell psa to start and stop named with -c /etc/named.conf option instead of using the default /etc/rc.d/named script which assumes named.conf is in /etc/namedb -someone please suggest how to do this or tell me another fix, please.

    Im now at the point that i have just cp /usr/local/psa/named/run-root/etc/named.conf /usr/lcoal/psa/named/run-root/etc/namedb/named.conf whenever a domain is added and rndc reload.
  2. ShadowMan@

    ShadowMan@ Guest

    Check your psa.conf file (not sure where it's located on FreeBSD) for the following line:
    (this is taken from a RedHat Linux system, /etc/psa/psa.conf)

    This tells Plesk where the BIND root directory is, change it to where you would like Plesk to use for bind/named
  3. DCoats

    DCoats Guest

    # BIND
    NAMED_RUN_ROOT_D /usr/local/psa/named/run-root

    thx for your post but that doesnt change the fact that psa edits $chroot/etc/named.conf and not $chroot/etc/namedb/named.conf as it needs too.

    FREEBSD use's etc/namedb/named.conf
  4. DCoats

    DCoats Guest

    I forgot this post was here, Just saw it agian, thought id mention that I did solve it, quit simple really.
    named_flags="-u bind -c /etc/named.conf"

    simply adding the named_flags -c /etc/named.conf did the trick, now freebsd and plesk are both on the same page with which named.conf they are using.
  5. jest3r_fbsd

    jest3r_fbsd Guest

    You added those lines into rc.conf to fix it?
  6. DCoats

    DCoats Guest

    yes. that should make the system start bind in the same way psa runs bind.
    should be running something like

    /usr/local/sbin/named -u bind -c /etc/named.conf -t /usr/local/psa/named/run-root
  7. jest3r_fbsd

    jest3r_fbsd Guest

    Ya .. the trouble is when I do this named gets started twice for some reason ...
  8. DCoats

    DCoats Guest

    is it in rc.conf twice?
  9. jest3r_fbsd

    jest3r_fbsd Guest

    nope ... its not in rc.conf at all until i add it.
  10. DCoats

    DCoats Guest

    is there a named startup script in /usr/local/etc/rc.d
  11. jest3r_fbsd

    jest3r_fbsd Guest

    It looks likes psa.sh trys to start named using the /etc/rc.d/named start script ... which fails normally. However when I add the named directives to rc.conf then it seems the psa.sh script works and teh rc.conf loads it as well?
  12. DCoats

    DCoats Guest

    well yes , mine uses /etc/rc.d/named also, which is the norm. I would think that you have 2 startup scripts. Thats why its running twice. Is there not 2 in /etc/rc.d or maybe another in /usr/local/etc/rc.d ?
    did you by chance cp /etc/rc.d/named /etc/rc.d/named.save or anything? just make 100% sure that their isnt more than one copy of the startup script in either rc.d dir ...
  13. jest3r_fbsd

    jest3r_fbsd Guest

    Setting the named pid seems to have done the trick ...

  14. kevin@

    kevin@ Basic Pleskian

    Nov 30, 2001
    Likes Received:
    did anyone ever figure this out?

    i am having this problem since moving to freebsd 5.3 / psa 7.5.4

    i periodically get these messages:

    May 2 14:31:00 silver named[327]: creating IPv4 interface xl0 failed; interface ignored
    May 2 14:31:00 silver named[327]: could not listen on UDP socket: permission denied

    and also get one on bootup about named already running

    i have the appropriate entries in /etc/rc.conf
    the only other place i see named being started is /usr/local/etc/rc.d/psa.sh

    which calls /etc/rc.d/named

  15. DCNet_James

    DCNet_James Guest

    Hmmm, you sure that named_enable="YES" isn't in /etc/rc.conf or /etc/defaults/rc.conf... As far as I know PSA starts this with its own init script and theres no need for it to be started from rc.conf. I saw this problem with PSA when upgrading a FBSD 5.4 server from pSA 7.5.3 to 7.5.4. I fixed the issue and have it documented somewhere, but I'll have to look it up. I'll post the procedure later on.