1833130 Members
3313 Online
110051 Solutions
New Discussion

Re: DNS side effects

 
nuwendam
Occasional Advisor

DNS side effects

Hi,

I add a DNS in the panel DNS resolver list of the system.

After this, when I invoke aCC (the compiler), I have the foloowing message :

ERROR: NAMESERVER IS DOWN!!
TRY AGAIN WHEN IT IS UP!!

the DNS is a valid address (194.2.0.20)

any idea.

thanks
12 REPLIES 12
Sachin Patel
Honored Contributor

Re: DNS side effects

hi Nuwendam,

Where did you add this? in /etc/resolv.conf? did you check your /etc/nsswitch.conf file?
Try pinging dns server.

Sachin
Is photography a hobby or another way to spend $
Bill Hassell
Honored Contributor

Re: DNS side effects

Use nslookup to see if you can resolve your own name, as in:

nslookup $(/usr/bin/hostname)

If this fails, then either the nameserver is not responding (down) or the nameserver does not know your hostname. In both cases, this is a bad thing for many applications so create (or change) /etc/nsswitch.conf to resolve important hostnames from /etc/hosts first, then using DNS as a last resort. nsswitch.conf would have a hosts line like this:

hosts: files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]

This will improve the reliability (and performance) of your system by reducing the dependence on a DNS server to run various programs. Your local hostname MUST always be there, plus any important hosts (and LAN printers) that you may need.


Bill Hassell, sysadmin
nuwendam
Occasional Advisor

Re: DNS side effects

Hi,

I don't know in which file is stored this information.
I just used SAM/Networking&communications/dns(bind)/dns resolver

and add my dns ip address which is 194.2.0.20 which i can ping

thanks
Sachin Patel
Honored Contributor

Re: DNS side effects

Hi Nuwendam,

OK when you use sam for that it goes in to one file /etc/resolv.conf.

As Bill says first change your nsswitch.conf file and use file as first resolvere.

Your dns server might be up but may be named daemon is down on that server. But if you have files first on your /etc/nsswitch.conf then atleast it works for your hostname.

Sachin
Is photography a hobby or another way to spend $
pap
Respected Contributor

Re: DNS side effects

Hi ,
It seems that your name resolution service is not properly configured

1. You have to check your /etc/resolv.conf file for proper name server in order. try to ping each of the name server in order whether they are responding.
Then do nslookup for your machine name.

2. Look for /etc/nsswitch.conf file. Check the order for host name resolution order. It should be dns..... depending upon your configuration.

hopefully the things will be working fine.

Also if trying above two steps , you are not able to resolv your problem, change the order in /etc/nsswitch.conf by putting "files" first then dns......
for that you need to have entry for host name in /etc/hosts with correct IP address.....and chck for /etc/rc.config.d/netconf file.

Thanks,
-pap


"Winners don't do different things , they do things differently"
MANOJ SRIVASTAVA
Honored Contributor

Re: DNS side effects

Hi Nuwendam

1. Do a nslookup for the server name , iot will resolve etiher using DNS or /etc/hosts , most likely in you case it is the /etc/hosts .

2. In case you have /etc/resolv.conf please add the following :

nameserver < IP ADRESSS for the DNS>

Now check by nslookup localhost name ,


You should be good to go as you can already ping it .


Manoj Srivastava
nuwendam
Occasional Advisor

Re: DNS side effects

nslookup resulkts :

Script started on Mon Apr 8 14:59:30 2002
root@messira:/tmp # nslookup $(/usr/bin/hostname)
*** Warning - the local domain is not set.
*** Either hostname should be a domain name,
*** the domain should be specified in /etc/resolv.conf,
*** or the shell variable LOCALDOMAIN should be set.

Name Server: ns-cache0.oleane.net
Address: 194.2.0.20

Trying DNS
Trying NIS
looking up FILES
Name: messira
Address: 192.168.200.42
Aliases: messira.corobor.com

root@messira:/tmp # exit

script done on Mon Apr 8 14:59:53 2002

something is wrong ?
nuwendam
Occasional Advisor

Re: DNS side effects

/etc/resolv.conf contains:
nameserver 194.2.0.20


/etc/nsswitch.conf : does not exist


thanks
Ian Dennison_1
Honored Contributor

Re: DNS side effects

If the DNS Server is a UNIX System, have you checked that 'named' is running on it?

Share and Enjoy! Ian
Building a dumber user
Sachin Patel
Honored Contributor

Re: DNS side effects

Your domainname is not set.
edit /etc/resolv.conf file. It sould look like this

domain your_domainname.com
nameserver ip_of_dns_server
nameserver ip_of_dns_server2


Sachin
Is photography a hobby or another way to spend $
nuwendam
Occasional Advisor

Re: DNS side effects

I set domain name to
corobor.com

I set the default domain name to
corobor.com

/etc/resolv.conf contains

domain corobor.com
nameserver 194.2.0.20


I still got error message when invoking compiler (aCC or cc)

thanks
Mark Fenton
Esteemed Contributor

Re: DNS side effects

create nsswitch.conf with something like

hosts: files [conditions...] NIS ... DNS

(man nsswitch.conf for details on syntax)

I didn't know it was possible to run without one....