When Listener Seems Not Working in RAC

  • by
You may found out the listener seems not working:
[oracle@primary01 ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 05-JUN-2016 19:40:08

Copyright (c) 1991, 2014, 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

But the incoming connections are all established and listener seems pretty healthy from RAC view.
[oracle@primary01 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): primary01,primary02

The reason is really simple, listeners belong to grid infrastructure since 11g for RAC database. So you have to use grid to handle it.
[root@primary01 ~]# su - grid
[grid@primary01 ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 05-JUN-2016 19:40:47

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                05-JUN-2016 16:38:27
Uptime                    0 days 3 hr. 2 min. 19 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/12.1.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/primary01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.111)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=primary01)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/12.1.0/db_1/admin/compdb/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "-MGMTDBXDB" has 1 instance(s).
  Instance "-MGMTDB", status READY, has 1 handler(s) for this service...
Service "_mgmtdb" has 1 instance(s).
  Instance "-MGMTDB", status READY, has 1 handler(s) for this service...
Service "compdb.example.com" has 1 instance(s).
  Instance "primdb1", status READY, has 1 handler(s) for this service...
Service "primary_cluster" has 1 instance(s).
  Instance "-MGMTDB", status READY, has 1 handler(s) for this service...
Service "primdbXDB.example.com" has 1 instance(s).
  Instance "primdb1", status READY, has 1 handler(s) for this service...
The command completed successfully

In RAC design, grid can do almost all the physical work that oracle can not. But at least, oracle can switch listener on and off through SRVCTL.
[oracle@primary01 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): primary01,primary02
[oracle@primary01 ~]$ srvctl stop listener
[oracle@primary01 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is not running

Leave a Reply

Your email address will not be published. Required fields are marked *