Get an error while trying to start DNS server


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Get an error while trying to start DNS server
# 1  
Old 12-01-2011
Question Get an error while trying to start DNS server

Hi Guys,

I am trying to configure DNS on ESX server.

Everything done but when I am trying to start the DNS, it gives me an error
Code:
[root@linux3 etc]# service named restart
Stopping named: [ OK ]
Starting named: 
Error in named configuration:
/etc/named.conf:42: when using 'view' statements, all zones must be in views
[FAILED]
[root@linux3 etc]#

Help me out please.

Thanks in advance

/Sirvesh Smilie
Moderator's Comments:
Mod Comment Please use code tags!

Last edited by vbe; 12-01-2011 at 01:06 PM.. Reason: please use code tags for your code / data next time, thanks
This User Gave Thanks to Srvesh For This Post:
# 2  
Old 12-01-2011
Obviously it doesn't like something in your /etc/named.conf. Could you post it please?
# 3  
Old 12-01-2011
Your output says to look at line 42 of your /etc/named.conf file...
# 4  
Old 12-02-2011
Here is my named.conf ... have a look

Now it is line 58 as i have made some changes ... I have enter the logs ....
Code:
[root@linux3 log]# service named start
Starting named: 
Error in named configuration:
/etc/named.conf:58: when using 'view' statements, all zones must be in views
[FAILED]
[root@linux3 log]# 


[root@linux3 log]# cat /etc/named.conf 
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver 
// (as a localhost DNS resolver only). 
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on 
// caching-nameserver package upgrade.
//
options {
        listen-on port 53 { 127.0.0.1; 10.141.228.58; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        pid-file        "/var/run/named/named.pid";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";

        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;
        // query-source-v6 port 53;

        allow-query     {localhost; 10.141.228.0/24; };
        allow-query-cache { localhost; };
};
logging {
  channel default_file  { file "/var/log/named/default.log"  versions 3 size 5m; severity dynamic; print-time yes; };
  channel general_file  { file "/var/log/named/general.log"  versions 3 size 5m; severity dynamic; print-time yes; };
  channel database_file { file "/var/log/named/database.log" versions 3 size 5m; severity dynamic; print-time yes; };
  channel notify_file   { file "/var/log/named/notify.log"   versions 3 size 5m; severity dynamic; print-time yes; };
  channel queries_file  { file "/var/log/named/queries.log"  versions 3 size 5m; severity dynamic; print-time yes; };
  channel network_file  { file "/var/log/named/network.log"  versions 3 size 5m; severity dynamic; print-time yes; };

  category default  { default_file; };
  category general  { general_file; };
  category database { database_file; };
  category notify   { notify_file; };
  category queries  { queries_file; };
  category network  { network_file; };
};
//logging {
//        channel default_debug {
//                file "data/named.run";
//                severity dynamic;
//        };
//}
view localhost_resolver {
        match-clients      { localhost; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};
zone "loop.net" IN {
        type master;
        file "loop.net.zone";
        allow-update { none; };
};
zone "228.141.10.in-addr.arpa" IN {
        type master;
        file "228.141.10.rev";
        allow-update { none; };
};


Last edited by Scott; 12-02-2011 at 09:10 AM.. Reason: Code tags
# 5  
Old 12-02-2011
Is this empty line normal?
Code:
channel queries_file { file "/var/log/named/queries.log" versions 3 size 5m; severity dynamic; print-time yes; };
channel network_file { file "/var/log/named/network.log" versions 3 size 5m; severity dynamic; print-time yes; };

category default { default_file; };
category general { general_file; };

# 6  
Old 12-02-2011
Yes...

It is normal issue is start from this, zone is the line 58

zone "loop.net" IN {

---------- Post updated at 08:34 AM ---------- Previous update was at 08:29 AM ----------

Hi ,

This issue get resolved ...
via this


Code:
view localhost_resolver {
        match-clients      { localhost; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
zone "loop.net" IN {
        type master;
        file "loop.net.zone";
        allow-update { none; };
};
zone "228.141.10.in-addr.arpa" IN {
        type master;
        file "228.141.10.rev";
        allow-update { none; };
};
};

But now I am in new mess .... While going to start DNS i got this error in /var/log/messages ..
Code:
Dec  2 18:54:33 linux3 named[28432]: starting BIND 9.3.6-P1-RedHat-9.3.6-16.P1.el5_7.1 -u named -t /var/named/chroot
Dec  2 18:54:33 linux3 named[28432]: found 1 CPU, using 1 worker thread
Dec  2 18:54:33 linux3 named[28432]: using up to 4096 sockets
Dec  2 18:54:33 linux3 named[28432]: loading configuration from '/etc/named.conf'
Dec  2 18:54:33 linux3 named[28432]: none:0: open: /etc/named.conf: permission denied
Dec  2 18:54:33 linux3 named[28432]: loading configuration: permission denied
Dec  2 18:54:33 linux3 named[28432]: exiting (due to fatal error)

---------- Post updated at 09:44 AM ---------- Previous update was at 08:34 AM ----------

Thanks to you guys ..

Issue resolved... Smilie

Last edited by Srvesh; 12-02-2011 at 09:43 AM..
# 7  
Old 12-02-2011
Glad it's working.

For the benefit of future struggling googlers, how was this issue resolved? Only thing more annoying than googling a problem and finding an unanswered question is finding a problem that was solved but gives no information on how Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

SunBlade 150 can't start openwin: /usr/openwin/bin/xinit: Server error.

Hi. I have a Microsystems SunBlade 150 shell# cat /etc/release Solaris 8 2/02 s28s_u7wos_08a SPARC shell# uname -a SunOS HOSTNAME 5.8 Generic_108528-14 sun4u sparc SUNW,Sun-Blade-100 shell# prtconf -F /pci@1f,0/SUNW,m64B@13:m640 When I join to the only account the server try to... (5 Replies)
Discussion started by: siegroup
5 Replies

2. Solaris

DNS client added to DNS server but not working

Hi, We have built a new server (RHEL VM)and added that IP/hostname into dns zone configs file on DNS server (Solaris 10). Reloaded the configuration using and added nameserver into resolv.conf on client. But when I am trying nslookup, its not getting resolved. The nameserver is not able to... (8 Replies)
Discussion started by: snchaudhari2
8 Replies

3. UNIX and Linux Applications

Is it mandatory or not to stop/start Applcation server ehen Restarting Database Server?

Good afternoon I need your help please. There is a Mantenance Windos which needs to Restart de Database Server 192.x.x.97 to set up some configuration Is it mandatory or not to stop/start Applcation server that runs in 192.x.x.95 ? Is it mandatory or not to stop/start apache and Tomcat?... (3 Replies)
Discussion started by: alexcol
3 Replies

4. Red Hat

DNS Service not Start in RHEL 6.4 64 bit

Hi All, I am new to linux and i am configuring DNS server but while i restart service it shows below given error. Please help to solve this error. # /etc/init.d/named restart Stopping named: Generating /etc/rndc.key: ... (2 Replies)
Discussion started by: Chintanghanti
2 Replies

5. UNIX for Advanced & Expert Users

DNS server choice: Windows DNS vs Linux BIND

I'd like to get some opnions on choosing DNS server: Windows DNS vs Linux BIND comparrsion: 1) managment, easy of use 2) Security 3) features 4) peformance 5) ?? I personally prefer Windows DNS server for management, it supports GUI and command line. But I am not sure about security... (2 Replies)
Discussion started by: honglus
2 Replies

6. Solaris

To Shut down the server. Do the Maintainance and Start Up the server

Hello All I just want to know how to Shut Down the Solaris Machines( Servers ) for Maintainance and then Start Up the Machines ( Servers ) . I think I will have to Log In as root to do that . Also how do i Check if all the services running on that server before shut down are running... (6 Replies)
Discussion started by: supercops
6 Replies

7. Solaris

Solaris DNS Client For Microsoft DNS Server

hey guys, how to add soalris box as a microsoft DNS Client ? and how to register in the microsoft DNS ?? i managed to query from the DNS server after adding /etc/resolve.conf and editing /etc/nsswitch.conf but i need to register the soalris server (dns Client) into Microsoft DNS automatically.... (3 Replies)
Discussion started by: mduweik
3 Replies

8. UNIX for Dummies Questions & Answers

setup a DNS server for my redhat server

Using Redhat Linux Enterprise AS 4 can someone teach me how to setup a dns server for my webserver? i've registered a domainname at mydomain.com but when i type in the domain i register i cannot enter to my webserver. someone told me that it is related with the DNS setting on my server. i've... (2 Replies)
Discussion started by: kaixiang88
2 Replies

9. UNIX for Advanced & Expert Users

DNS on DG-UX server

I'm trying to configure a DG-UX server to be a DNS client (connecting to a Novell DNS server). I've configured /etc/resolv.conf to reflect the settings for the DNS server, but I don't know what else to do to get the server to resolve DNS names. Any ideas? (2 Replies)
Discussion started by: soliberus
2 Replies

10. UNIX for Dummies Questions & Answers

X-server fatal error,KDM refused to start

I was working with network configuration utility of linux first by netconfig command and then in GUI.It refused to take the new IP address I assigned and GUI utility raised an exception.aAfter that I tried to luanch the application for a couple of times but it was not starting.I rebooted. Now it... (1 Reply)
Discussion started by: callmedctr
1 Replies
Login or Register to Ask a Question