Wednesday, April 15, 2015

Fix [INS-40718] Single Client Access Name (SCAN):clus-scan could not be resolved.

Two host machines with following settings
  • rac1.dbaora.com
  • rac2.dbaora.com

public private vip
rac1 192.168.0.50 192.168.56.60 192.168.0.70
rac2 192.168.0.51 192.168.56.61 192.168.0.71

with single client access name (SCAN) address

public
rac-scan 192.168.0.20
192.168.0.21
192.168.0.22

My WIFI router generates ip adress like 192.168.1.X so it doesn’t interfere with RAC public, private and SCAN. It’s important to have your internet network on separate subnet.

So my entry in “/ect/hosts” looks following. As you can notice SCAN entries are commented and will be resolved via dnsmasq.

127.0.0.1     localhost.localdomain localhost

#public
192.168.0.50   rac1        rac1.dbaora.com
192.168.0.51   rac2        rac2.dbaora.com

#private
192.168.56.60  rac1-priv   rac1-priv.dbaora.com 
192.168.56.61  rac2-priv   rac2-priv.dbaora.com

#virtual
192.168.0.70   rac1-vip    rac1-vip.dbaora.com
192.168.0.71   rac2-vip    rac2-vip.dbaora.com

#scan
#192.168.0.20   rac-scan    rac-scan.dbaora.com
#192.168.0.21   rac-scan    rac-scan.dbaora.com
#192.168.0.22   rac-scan    rac-scan.dbaora.com
 
Install and configure dnsmasq

1. To install dnsmasq run as root following command
yum install dnsmasq
2. Configure dnsmasq
create new file “/etc/racdns” with settings for SCAN
 
[root@rac1 ~]# cat /etc/racdns
#scan
192.168.0.20   rac-scan    rac-scan.dbaora.com
192.168.0.21   rac-scan    rac-scan.dbaora.com
192.168.0.22   rac-scan    rac-scan.dbaora.com
 
 
modify dnsmasq default configuration file “/etc/dnsmasq.conf”. One parameter addn-hosts should be changed to point to file “/etc/racdns”.

[root@rac1 ~]# cat /etc/dnsmasq.conf | grep addn-hosts
addn-hosts=/etc/racdns
 
3. Start dnsmasq
service dnsmasq start
chkconfig dnsmasq on
4. Next step is to resolve problem with file “/etc/resolv.conf”
I’m using third network card as NAT with DHCP so each time you restart network card or reboot host the file is overwritten with automatically generated settings. Nameserver points for 192.168.1.1 which is required to resolve internet entries but not enough to resolve SCAN settings via dnsmasq.
[root@rac1 ~]# cat /etc/resolv.conf
# Generated by Networkmanager
search dbaora.com
nameserver 192.168.1.1
As default dnsmasq is running on ip adress 127.0.0.1 so it requires following settings in “/etc/resolv.conf”.
[root@rac1 ~]# cat /etc/resolv.conf
# Generated by Networkmanager
nameserver 127.0.0.1
search dbaora.com
nameserver 192.168.1.1
You must protect the file from being automatically overwritten by host reboot, network card restart etc.
[root@rac1 ~]# chattr +i /etc/resolv.conf
Verification
It’s just running nslookup to verify all is working fine
rac-scan
[root@rac1 ~]# nslookup rac-scan
Server:        127.0.0.1
Address:    127.0.0.1#53

Name:    rac-scan.dbaora.com
Address: 192.168.0.22
Name:    rac-scan.dbaora.com
Address: 192.168.0.20
Name:    rac-scan.dbaora.com
Address: 192.168.0.21

[root@rac1 ~]# nslookup rac-scan
Server:        127.0.0.1
Address:    127.0.0.1#53

Name:    rac-scan.dbaora.com
Address: 192.168.0.20
Name:    rac-scan.dbaora.com
Address: 192.168.0.21
Name:    rac-scan.dbaora.com
Address: 192.168.0.22

[root@rac1 ~]# nslookup rac-scan
Server:        127.0.0.1
Address:    127.0.0.1#53

Name:    rac-scan.dbaora.com
Address: 192.168.0.21
Name:    rac-scan.dbaora.com
Address: 192.168.0.22
Name:    rac-scan.dbaora.com
Address: 192.168.0.20
rac1, rac2, rac1-priv, rac2-priv, rac1-vip, rac2-vip
[root@rac1 ~]# nslookup rac1
Server:        127.0.0.1
Address:    127.0.0.1#53

Name:    rac1.dbaora.com
Address: 192.168.0.50

[root@rac1 ~]# nslookup rac2
Server:        127.0.0.1
Address:    127.0.0.1#53

Name:    rac2.dbaora.com
Address: 192.168.0.51

[root@rac1 ~]# nslookup rac1-priv
Server:        127.0.0.1
Address:    127.0.0.1#53

Name:    rac1-priv.dbaora.com
Address: 192.168.56.60

[root@rac1 ~]# nslookup rac2-priv
Server:        127.0.0.1
Address:    127.0.0.1#53

Name:    rac2-priv.dbaora.com
Address: 192.168.56.61

[root@rac1 ~]# nslookup rac1-vip
Server:        127.0.0.1
Address:    127.0.0.1#53

Name:    rac1-vip.dbaora.com
Address: 192.168.0.70

[root@rac1 ~]# nslookup rac2-vip
Server:        127.0.0.1
Address:    127.0.0.1#53

Name:    rac2-vip.dbaora.com
Address: 192.168.0.71
Have a fun

No comments: