Oracle Rac With Scan Error

listeneroraclerac

I have installed Oracle RAC with ASM on Oracle Linux 5.8. My database version is 11.2.0.1.
I have 2 node in my plan and all of them are active.
I set scan in my DNS server but I can not connect to database with scan listener. I can connect to each node with their VIP.
Some of data about listener is listed in below.

[grid@rac1 ~]$ srvctl config scan_listener
SCAN Listener LISTNERE_SCAN_1_SCAN1 exists. Port: TCP:1521

[grid@rac1 ~]$ srvctl status scan_listener
SCAN Listener LISTNERE_SCAN_1_SCAN1 is enabled
SCAN listener LISTNERE_SCAN_1_SCAN1 is running on node rac1

[grid@rac1 ~]$ lsnrctl status LISTNERE_SCAN_1_SCAN1


LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 02-JUL-2015 05:46:23


Copyright (c) 1991, 2009, Oracle.  All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTNERE_SCAN_1_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTNERE_SCAN_1_SCAN1
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                02-JUL-2015 05:04:58
Uptime                    0 days 0 hr. 41 min. 25 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/11.2.0/grid/log/diag/tnslsnr/rac1/listnere_scan_1_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTNERE_SCAN_1_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.245)(PORT=1521)))
Services Summary...
Service "orcl" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully


[grid@rac1 ~]$ lsnrctl sERVICES LISTNERE_SCAN_1_SCAN1


LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 02-JUL-2015 05:46:58


Copyright (c) 1991, 2009, Oracle.  All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTNERE_SCAN_1_SCAN1)))
Services Summary...
Service "orcl" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:blocked
         REMOTE SERVER
         (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip)(PORT=1521)))
  Instance "orcl2", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:blocked
         REMOTE SERVER
         (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac2-vip)(PORT=1521)))
Service "orclXDB" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: rac1.localdomain, pid: 5305>
         (ADDRESS=(PROTOCOL=tcp)(HOST=rac1.localdomain)(PORT=30855))
  Instance "orcl2", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: rac2.localdomain, pid: 5293>
         (ADDRESS=(PROTOCOL=tcp)(HOST=rac2.localdomain)(PORT=36946))
The command completed successfully



[grid@rac1 ~]$nano /u01/app/11.2.0/grid/network/admin/listener.ora
LISTNERE_SCAN_1_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTNERE_SCAN_1_SCAN1))))          # $
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent
# listener.ora.rac1 Network Configuration File: /u01/app/11.2.0/grid/network/admin/listener.ora.rac1
# Generated by Oracle configuration tools.


ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON


ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER1 = ON


LISTENER_SCAN1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1))
    )
  )


ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTNERE_SCAN_1_SCAN1=ON         # line added by Agent

[oracle@rac1 ~]$ nano /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.


ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )



[oracle@rac1 ~]$ nano /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 02-JUL-2015 05:56:20

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (20 msec)

The error when I want to connect to racdb with scan name is:

[oracle@rac1 ~]$ sqlplus system/oracle@orcl


SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 2 05:57:03 2015


Copyright (c) 1982, 2009, Oracle.  All rights reserved.


ERROR:
ORA-12520: TNS:listener could not find available handler for requested type of server 

Best Answer

I had similar issue and local listener was null, fixed it when enetered proper values

I'm no expert in RAC but here is how they could look

show parameter listener

NAME                       TYPE                 VALUE
-------------------------- -------------------- ------------------------------
listener_networks          string               ((NAME=network2)(LOCAL_LISTENER=ot1pfcrs001_net002p)(REMOTE_LISTENER=ot1pfcrs001_net2))
local_listener             string               (ADDRESS=(PROTOCOL=TCP)(HOST=10.101.73.140)(PORT=1541))
remote_listener            string               ot1pfcrs001.database.dv.hgn:1541