I have 11.2.0.2 2 node RAC system on AIX 6.1 64 bit.

I had some e-mails from our developer team about database connection problem. They got “ORA-12541: TNS:no listener” error message.

I started to investigate issue by checking current status of services by using crsctl stat res -t I noticed that SCAN_LISTENER service status were UNKNOWN.

I checked first what is my listener up or not on my RAC system.

[oramgr@node1]</home/oramgr> ps -ef|grep inherit
oramgr 10420314 1 0 09:59:27 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit

[oramgr@node2]</home/oramgr> ps -ef|grep inherit
oramgr 10420314 1 0 09:59:27 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oramgr 12386336 1 0 10:27:16 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN2 –inherit
oramgr 15663244 1 0 10:11:31 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 –inherit

Checking Ip’s:

[oramgr@node2]</home/oramgr> srvctl config scan
SCAN name: test-scan.mydomain.com, Network: 1/192.168.1.0/255.255.255.0/en1
SCAN VIP name: scan1, IP: /test-scan.mydomain.com/192.168.1.10
SCAN VIP name: scan2, IP: /test-scan.mydomain.com/192.168.1.11

While I checked my Ip configuration I also noticed node1 SCAN VIP moved to Node2. You can check it by using ifconfig -a command

After that I run below command to see what is current status by checking the SCAN details on node2.

To see what is option for relocationg the scan is:

$ srvctl relocate scan -h

Usage: srvctl relocate scan -i <ordinal_number> [-n <node_name>]
-i <scan_ordinal_number> Ordinal number of IP address
-n <node_name> SCAN VIP node name
-h Print usage

So here is my steps:

1. Checking current status:
[oramgr@node2]</home/oramgr> srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node node2
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node node2
[oramgr@node2]</home/oramgr> srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node node2
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node node2

[oramgr@node2]</home/oramgr> ps -ef|grep inherit
oramgr 10420314 1 0 09:59:27 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oramgr 12386336 1 0 10:27:16 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN2 –inherit
oramgr 15663244 1 0 10:11:31 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 –inherit

2. Relocate SCAN_LISTENER:
As you see my LISTENER_SCAN1 moved from node1 to node2, so I need to relocate from node2 to node1

srvctl relocate scan_LISTENER -i 1 -n node1

3. Check current status after Relocate SCAN_LISTENER:
[oramgr@node2]</home/oramgr> srvctl status scan

SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node node1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node node2
[oramgr@node2]</home/oramgr> srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node node1
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node node2

[oramgr@node2]</home/oramgr> ps -ef|grep inherit
oramgr 10420314 1 0 09:59:27 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oramgr 12386336 1 0 10:27:16 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN2 –inherit

[oramgr@node1]</home/oramgr> ps -ef|grep inherit
oramgr 10420314 1 0 09:59:27 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oramgr 15663244 1 0 10:11:31 – 0:00 /oracle11g/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 –inherit

So What is difference is between relocating the SCAN using srvctl relocate scan and SCAN_LISTENER  by using srvctl relocate scan_listener command?

Regarding questions; The difference between a SCAN VIP and a normal RAC VIP, is that the RAC VIP has a node it want’s to run on and each node has one (whereas you only have 3 SCANs). If it fails over to another node, the normal VIP exists, but does not accept connections, whereas the SCAN is not fix to a node and can run on any node in the cluster (and will accept connections anytime).

Now that this works, the SCAN VIP will always move with the SCAN listener (otherwise it would not make any sense). Hence there is really no difference in moving the SCAN VIP (because this will trigger a relocate of the listener) or to move the SCAN_Listener (since this will move the VIP it depends on).

Source:
http://www.oracle.com/technetwork/database/clustering/overview/scan-129069.pdf
Top 5 Issues That Cause Troubles with Scan VIP and Listeners [ID 1373350.1]

Advertisements