• 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

Bind Named FreeBSD5.4

D

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.
 
Check your psa.conf file (not sure where it's located on FreeBSD) for the following line:
# BIND
NAMED_RUN_ROOT_D /var/named/run-root
(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
 
# 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
 
I forgot this post was here, Just saw it agian, thought id mention that I did solve it, quit simple really.
named_enable="YES"
named_chrootdir="/usr/local/psa/named/run-root"
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.
 
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
 
Ya .. the trouble is when I do this named gets started twice for some reason ...
 
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?
 
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 ...
 
Setting the named pid seems to have done the trick ...

named_pidfile="/var/run/named/named.pid"
 
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

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

J
 
Back
Top