Monday, July 18, 2011

Just learn about listener on RAC (grid)

On 11gR2 RAC (Grid Infrastructure), I tests use LISTENER_SCAN* on port 1521 and LISTENER on port 1522. I would like to check what service names are registered in LISTENER. Umm...
[oracle@db01 ~]$ cat /grid/network/admin/listener.ora
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))) # line added by Agent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON # line added by Agent
[oracle@db01 ~]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
[oracle@db01 ~]$ srvctl config listener
Name: LISTENER
Network: 1, Owner: oracle
Home: /grid
End points: TCP:1522
[oracle@db01 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): db01,db02

[oracle@db01 ~]$ srvctl status service -d db
Service service1 is running on instance(s) db1,db2

[oracle@db01 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 18-JUL-2011 17:28:27

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
So, that is not the problem. I was on db01, then used ...
[oracle@db01 ~]$ lsnrctl status "(ADDRESS=(PROTOCOL=tcp)(HOST=db01-vip)(PORT=1522))"

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 18-JUL-2011 17:28:36

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=db01-vip)(PORT=1522))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 18-JUL-2011 17:11:33
Uptime 0 days 0 hr. 17 min. 3 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /grid/network/admin/listener.ora
Listener Log File log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db01)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db01-vip)(PORT=1522)))
Services Summary...
Service "service1" has 1 instance(s).
Instance "db1", status READY, has 1 handler(s) for this service...
The command completed successfully
OK... I learned to use "lsnrctl" different... I used. "Security = ON: Local OS Authentication", so i can use " lsnrctl status "(ADDRESS=(PROTOCOL=tcp)(HOST=db01-vip)(PORT=1522))". Or
[oracle@db01 ~]$ lsnrctl status db01-vip:1522
If I am on db01 but ask other nodes... it'll error: TNS-01189: The listener could not authenticate the user

It's just something, I learned.

No comments: