LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   BIND server no longer working - please help! (https://www.linuxquestions.org/questions/linux-server-73/bind-server-no-longer-working-please-help-885203/)

highrise 06-08-2011 08:27 AM

BIND server no longer working - please help!
 
hi guys

I really hope someone can help me with this. I am still quite new to all this but I guess we were all beginners once, this forum seems very helpful.

Here is my situation, I will give as much detail as I can.

I have a dedicated server which is running CentOS release 5.5

Initially I had Plesk installed, but when I upgraded PHP I damaged the Plesk configuration, and so I installed Webmin instead.

All seems to be fine with this, apart from the DNS configuration / BIND server.I know this because I have one site which uses an external DNS server and this works fine (i.e I can access it from a browser). All the others don't resolve - i.e the ones I set up in Plesk.

I've done a bit of investigating to see what is going on, but I'm stabbing in the dark a little. I'd really appreciate some help.

The following commands give me the following responses:

rndc reload

rndc: connect failed: 127.0.0.1#953: connection refused

named -g -p 53 (i have blanked out my server IP address)

starting BIND 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 -g -p 53
found 2 CPUs, using 2 worker threads
using up to 4096 sockets
loading configuration from '/etc/named.conf'
max open files (1024) is smaller than max sockets (4096)
using default UDP/IPv4 port range: [1024, 65535]
using default UDP/IPv6 port range: [1024, 65535]
listening on IPv4 interface lo, 127.0.0.1#53
listening on IPv4 interface eth0, xx.xx.xx.xx#53
could not configure root hints from 'named.root': file not found
loading configuration: file not found
exiting (due to fatal error)

there does not appear to be a named.conf file. Is this the issue?

I'm not sure but I think this may have something to do with these sites being initially set up in Plesk.

Can anyone help?? thanks so much in advance.

Linux.tar.gz 06-08-2011 08:34 AM

In Slackware :

locate named.root

/var/named/caching-example/named.root

You certainly also have this file, so you have to copy it to the right place.

highrise 06-08-2011 09:38 AM

ok I ran the command, and got this:

/usr/share/doc/bind-9.3.6/sample/etc/named.root.hints
/usr/share/doc/bind-9.3.6/sample/var/named/named.root
/var/named/run-root/var/named.root

I also looked for named.conf and it came up with this:


/usr/share/logwatch/default.conf/services/named.conf
/usr/share/man/man5/named.conf.5.gz
/var/named/run-root/etc/named.conf
/var/named/run-root/etc/named.conf.default


What config do I need to edit to point at these?

highrise 06-08-2011 09:51 AM

so I pointed named.conf at the name.root file, and now I get the below. I tried to locate 'named.pid' and it does not exist. It looks like this is something to do with Plesk? please help!


loading configuration from '/etc/named.conf'
max open files (1024) is smaller than max sockets (4096)
using default UDP/IPv4 port range: [1024, 65535]
using default UDP/IPv6 port range: [1024, 65535]
listening on IPv4 interface lo, 127.0.0.1#53
listening on IPv4 interface eth0, xx.xx.xx.xx#53
command channel listening on 127.0.0.1#953
command channel listening on ::1#953
ignoring config file logging statement due to -g option
couldn't open pid file '/var/run/named/named.pid': Permission denied
exiting (due to early fatal error)

highrise 06-08-2011 09:57 AM

I changed the ownership of

/var/run/named/

to root, and it then gave me this:

08-Jun-2011 14:39:38.580 zone 0.0.127.IN-ADDR.ARPA/IN: loading master file localhost.rev: file not found
08-Jun-2011 14:39:38.580 zone 41.99.79.in-addr.arpa/IN: loading master file 41.99.79.in-addr.arpa: file not found
08-Jun-2011 14:39:38.580 zone mysite.com/IN: loading master file mysite.com: file not found

bathory 06-08-2011 11:57 AM

Hi,

Quote:

08-Jun-2011 14:39:38.580 zone 0.0.127.IN-ADDR.ARPA/IN: loading master file localhost.rev: file not found
08-Jun-2011 14:39:38.580 zone 41.99.79.in-addr.arpa/IN: loading master file 41.99.79.in-addr.arpa: file not found
08-Jun-2011 14:39:38.580 zone mysite.com/IN: loading master file mysite.com: file not found
Check the "directory" directive in top of /etc/named.conf and make sure it points to the location of localhost.rev, 41.99.79.in-addr.arpa, mysite.com zone files.
Do a search for those files if you don't know where they are located and change "directory" directive accordingly.

Regards

highrise 06-08-2011 11:59 AM

thanks - yes, I figured this might be something to try so I did, and several of the sites are back up again, all but one, which say 'No NS records exist' - I have no idea why that would be so if anyone can help with that, it would be fantastic.

bathory 06-08-2011 12:02 PM

Quote:

which say 'No NS records exist'
There is no NS entries in the zone file in question
You can post it here so we can take a look, if you cannot figure it out yourself

Regards

Linux.tar.gz 06-09-2011 02:36 AM

Quote:

Originally Posted by highrise (Post 4379959)
so I pointed named.conf at the name.root file

Oh i'm not sure you had to do this...

sandy.bhadoriya 06-09-2011 03:49 AM

Check all this thing.

1)chmod 777 /etc/named.conf
2)service named restart
3)netstat -nlp | grep :53
output expectedis
tcp connection is listening on 53

highrise 06-09-2011 08:07 AM

thanks for all your help guys, I'm sure this will be useful if anyone else switches out of Plesk.

Ok, I've done as Sandy suggested but I am still getting errors, as follows:


Error in named configuration:
zone 0.0.127.IN-ADDR.ARPA/IN: loading master file /var/named/run-root/var/localhost.rev: file not found
_default/0.0.127.IN-ADDR.ARPA/IN: file not found
zone mysite.com/IN: loading master file /var/named/run-root/var/mysite.com: file not found
_default/mysite.com/IN: file not found
zone 41.99.79.in-addr.arpa/IN: loading master file /var/named/run-root/var/41.99.79.in-addr.arpa: file not found
_default/41.99.79.in-addr.arpa/IN: file not found


So i then tried:

locate localhost.rev

and I get:

/var/named/run-root/var/PROTO.localhost.rev
/var/named/run-root/var/localhost.rev
/var/named/run-root/var/localhost.rev.saved_by_psa

so the file exists but it seems it can't access it. I tried checking the permissions and the files are owned by root, is this correct?

when I run: netstat -nlp | grep :53

I get

udp 0 0 0.0.0.0:5353 0.0.0.0:* 2652/avahi-daemon:
udp 0 0 :::5353 :::* 2652/avahi-daemon:

sandy.bhadoriya 06-09-2011 08:15 AM

can you please paste your /etc/named.conf file

highrise 06-09-2011 08:39 AM

I will, though I think I may have made some progress. I removed the full path names in the config, i.e I changed:

/var/named/run-root/var/localhost.rev

to just

localhost.rev

and now I get :

Stopping named: [ OK ]
Starting named: [ OK ]

- so that's good!

tcp 0 0 xx.xx.xx.xx:53 0.0.0.0:* LISTEN 800/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 800/named
udp 0 0 xx.xx.xx.xx:53 0.0.0.0:* 800/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 800/named
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2652/avahi-daemon:
udp 0 0 :::5353 :::* 2652/avahi-daemon:


All the sites seem to be working now - I think my problems are over, please let me know if there is anything else I need to test, and thank you all so much.


All times are GMT -5. The time now is 12:35 AM.