Operating System - HP-UX
1819681 Members
3571 Online
109605 Solutions
New Discussion юеВ

Force A Re-Read of the /etc/resolv.conf File ?

 

Force A Re-Read of the /etc/resolv.conf File ?

Hey All -

We've got an odd sort of situation where we changed our dns look-up servers in the /etc/resolv.conf file, removing one.

However, since the servers have not been rebooted, the new /etc/resolv.conf file was never re-read to take effect.

All processes that were running when we made the change, are still "thinking" that the old resolv.conf is still in effect ( and are therefore now trying to resolve off of what will be an invalid dns ).

My question is two fold :

1) Is there a way to force a system to re-read the /etc/resolv.conf file?

2) If a dns is removed completely, will the system recognize that it is missing and then automatically re-read the /etc/resolv.conf file?

Thanks in advance for any info.
"...it's turtles all the way down."
11 REPLIES 11
OFC_EDM
Respected Contributor

Re: Force A Re-Read of the /etc/resolv.conf File ?

I think it's
#sig_named restart
to re-read the /etc/resolv.conf.

Best read up on that first before trying...I don't have a system to double check for you right now.

Also do you have any old information still sitting around in your hosts file that could be causing an issue?
The Devil is in the detail.
OFC_EDM
Respected Contributor

Re: Force A Re-Read of the /etc/resolv.conf File ?

Also what's in your /etc/nsswitch.conf file?
The Devil is in the detail.
OFC_EDM
Respected Contributor

Re: Force A Re-Read of the /etc/resolv.conf File ?

Which OS / Version are you using?
The Devil is in the detail.

Re: Force A Re-Read of the /etc/resolv.conf File ?


Thank you, I will read up on sig_named, thank you.

Right now, we're talking about a hundred servers or so, and they have varying nsswitch.conf files.

Do you have a suggestion where this is concerned?

Thanks again.
"...it's turtles all the way down."

Re: Force A Re-Read of the /etc/resolv.conf File ?


The majority are running 11.11 right now ( with perhaps 10 or so at 11.23 ).
"...it's turtles all the way down."
sreekanthtm
Trusted Contributor

Re: Force A Re-Read of the /etc/resolv.conf File ?

Hi,

>>>1) Is there a way to force a system to re-read the /etc/resolv.conf file?

No need to run any command to re-read /etc/resolv.conf file. There will be immediate effect, after you edit the file.

>>>2) If a dns is removed completely, will the system recognize that it is missing and then automatically re-read the /etc/resolv.conf file?

It depends on your /etc/nsswitch.conf configuration. There, if you specified to check DNS for name resolution, server will definitely read /etc/resolv.conf and would try to contact the DNS server specified.


Rgds
Sreekanth

Re: Force A Re-Read of the /etc/resolv.conf File ?


That isn't working. These are not dns servers, so no named is running.

I'm talking about server which have had their /etc/resolv.conf file edited to remove a dns lookup server.

"...it's turtles all the way down."

Re: Force A Re-Read of the /etc/resolv.conf File ?


From what I am seeing - there was no automatic re-read of the file after editing for the processes that are currently running.

The servers have not been rebooted since the change, so they are still using the "old" resolv.conf file.

I would like to force them to see the new file.

"...it's turtles all the way down."
sreekanthtm
Trusted Contributor

Re: Force A Re-Read of the /etc/resolv.conf File ?

Hi,

Use # nslookup for checking the name resolution. If it happens, then the prblm is with your Application, which requires a restart. In HPUX, DNS client configuration would have immediate effect.

Rgds
Sreekanth

Re: Force A Re-Read of the /etc/resolv.conf File ?


Yes, perhaps the problem is with passing the information to the applications.

Thank you all for your help.
"...it's turtles all the way down."

Re: Force A Re-Read of the /etc/resolv.conf File ?

/etc/resolv.conf file is correct.

Once the "search" name is removed by networking, file should be re-read by any searching dns.
"...it's turtles all the way down."