A technical troubleshooting blog about Oracle with other Databases & Cloud Technologies.

Unable to generate Listener Log in Prod RAC DB

4 min read

Cause: Looks like ADR is having the issue.


Solution: Added the below parameter in the both the nodes and restarted the listener


DIAG_ADR_ENABLE_LISTENER=OFF

There are 3 parameters associated with ADR:

DIAG_ADR_ENABLED
DIAG_SIGHANDLER_ENABLED
DIAG_DDE_ENABLED
As long as you don't set "DIAG_ADR_ENABLED = OFF" ... ADR will still be enabled for the other services.
[grid@asrblg ~]$ ps -ef |grep tns
root        28     2  0 Aug27 ?        00:00:00 [netns]
grid      2684     1  0 Aug27 ?        07:42:19 /opt/app/grid/11.2.0/grid/bin/tnslsnr LISTENER -inherit
grid      3029     1  0 Oct31 ?        01:17:20 /opt/app/grid/11.2.0/grid/bin/tnslsnr LISTENER_SCAN3 -inherit
grid      3040     1  0 Oct31 ?        01:19:15 /opt/app/grid/11.2.0/grid/bin/tnslsnr LISTENER_SCAN2 -inherit
grid     13800 13711  0 08:35 pts/0    00:00:00 grep --color=auto tns


[grid@asrblg ~]$ . oraenv
ORACLE_SID = [grid] ? +ASM2
The Oracle base has been set to /opt/app/oracle

THIS LOG.XML NEED TO BE SORTED /opt/app/oracle/diag/tnslsnr/asrblg/listener/alert/log.xml

[grid@asrblg ~]$ lsnrctl status LISTENER
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 19-DEC-2022 08:36:25
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                27-AUG-2022 17:12:46
Uptime                    113 days 16 hr. 23 min. 38 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/app/grid/11.2.0/grid/network/admin/listener.ora
Listener Log File         /opt/app/oracle/diag/tnslsnr/asrblg/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.166)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.168)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "prod" has 1 instance(s).
  Instance "prod2", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 1 instance(s).
  Instance "prod2", status READY, has 1 handler(s) for this service...
The command completed successfully

Due to lack of ADR parameter, logs were not generating:

[grid@asrblg ~]$ cat /opt/app/grid/11.2.0/grid/network/admin/listener.ora


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=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # 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=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
[grid@asrblg ~]$ cd  /opt/app/grid/11.2.0/grid/network/admin/
[grid@asrblg admin]$ ls -ltr
total 24
-rw-r--r--. 1 grid oinstall  381 Sep 19  2016 shrept.lst
drwxr-xr-x. 2 grid oinstall 4096 Sep 19  2016 samples
-rw-r--r--. 1 grid oinstall  235 Sep 19  2016 sqlnet.ora
-rw-r--r--. 1 grid oinstall  198 Sep 19  2016 endpoints_listener.ora
-rw-r--r--. 1 grid oinstall  534 Nov 16  2016 listener.ora.bak.asrblg
-rw-r--r--. 1 grid oinstall  718 Nov 16  2016 listener.ora

Take a backup copy of listener file:

[grid@asrblg admin]$ cp listener.ora listener.ora.bkp.12192022

Add below parameter in listener.ora file:

DIAG_ADR_ENABLED_LISTENER=OFF
[grid@asrblg admin]$ vi listener.ora

----------------------------------------------------------------------------------------------------------------
[grid@asrblg admin]$ cat listener.ora
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=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # 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=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
DIAG_ADR_ENABLED_LISTENER=OFF

Check the node name:

[grid@asrblg admin]$ crsctl get nodename
asrblg

Stop and start the listener :

[grid@asrblg admin]$ srvctl stop listener -n asrblg


[grid@asrblg admin]$ srvctl start listener -n asrblg


[grid@asrblg admin]$ lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 19-DEC-2022 08:41:14
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                19-DEC-2022 08:41:08
Uptime                    0 days 0 hr. 0 min. 6 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/app/grid/11.2.0/grid/network/admin/listener.ora
Listener Log File         /opt/app/grid/11.2.0/grid/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.166)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.168)(PORT=1521)))
Services Summary...
Service "prod" has 1 instance(s).
  Instance "prod2", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 1 instance(s).
  Instance "prod2", status READY, has 1 handler(s) for this service...
The command completed successfully

Issue is fixed, listener logs are now start generating:

[grid@asrblg admin]$ tail -f  /opt/app/grid/11.2.0/grid/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.166)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.168)(PORT=1521)))
19-DEC-2022 08:41:08 * service_register * LsnrAgt * 0
19-DEC-2022 08:41:09 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=asrblg.prod.asrblg.se)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186642)) * status * 0
19-DEC-2022 08:41:10 * service_register * prod2 * 0
19-DEC-2022 08:41:13 * service_update * prod2 * 0
19-DEC-2022 08:41:13 * (CONNECT_DATA=(SERVICE_NAME=prod)(CID=(PROGRAM=python)(HOST=asrblg.localdomain)(USER=gcorn))(SERVER=dedicated)(INSTANCE_NAME=prod2)) *