DNS resolving issue

Issues related to configuring your network
Post Reply
alexfox20
Posts: 2
Joined: 2020/06/25 08:51:26

DNS resolving issue

Post by alexfox20 » 2020/06/25 09:04:43

I have a hybrid datacenter (Linux and Windows), DNS server is a Microsoft windows server.
i have 3 Oracle database server clustered with oracle clusterware.
these 3 servers are configured to resolve from 2 Microsoft DNS servers, my resolv.conf file content is:

search xxxxxx.com
domain xxxxxx.com
namserver x.x.x.x
nameserver x.x.x.x

the problem is, when the first nameserver is unreachable for any reason, linux start to resolve from the second one, but it has been tried to resolve from the first one every time and when it returns with unreachable error then it resolves from the second one.
this action is makes the clusterware hange which means we must reboot all 3 oracle database servers, which means that everything will be down.

i want to make linux resolve from the second nameserver without trying to resolve from the first one in case of the first nameserver is unreachable to avoid the clusterware hange issue.

Thanks in advance.

User avatar
TrevorH
Forum Moderator
Posts: 28831
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: DNS resolving issue

Post by TrevorH » 2020/06/25 09:19:13

That is the way that DNS lookups work on linux. The list of nameservers is consulted starting from the top of the list and subsequent entries are only consulted if the current one does not respond. Any answer at all from the current one is taken as the definite answer and no more nameservers are checked once that happens.

There are some options you can specify, listed in man resolv.conf to change the default behaviour but there is no way to stop it from asking questions of a dead nameserver in the list. Look at the options parameter in that man page. None of those options do what you ask.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

alexfox20
Posts: 2
Joined: 2020/06/25 08:51:26

Re: DNS resolving issue

Post by alexfox20 » 2020/06/25 10:13:23

Any suggestions to avoid the clusterware hang issue?

User avatar
TrevorH
Forum Moderator
Posts: 28831
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: DNS resolving issue

Post by TrevorH » 2020/06/25 10:15:53

Fix whatever clusterware is?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 2870
Joined: 2007/12/11 08:17:33
Location: Finland

Re: DNS resolving issue

Post by jlehtone » 2020/06/25 18:51:16

TrevorH wrote:
2020/06/25 09:19:13
That is the way that DNS lookups work on linux.
What one can do is to run a nameserver process, like dnsmasq, on the machine.
Such programs have more features/options for coping with flakey servers.

Then the /etc/resolv.conf can have nameserver 127.0.0.1 as first entry.


Note:
man resolv.conf wrote:The domain and search keywords are mutually exclusive.
If more than one instance of these keywords is present, the last instance wins.

Post Reply

Return to “CentOS 6 - Networking Support”