Listener

How to Resolve TNS-01106: Listener using listener name listener has already been started

TNS-01106

I setup multiple listeners to listen different databases in listener.ora, but when I tried to start the LISTENER2, I got TNS-01106 like this:

[grid@primary01 ~]$ lsnrctl start listener2
...
TNS-01106: Listener using listener name listener has already been started

Rationale: Key Name Collision

I know LISTENER is running, but how could it be relavent to LISTENER2? Maybe there’re some conflictions between LISTENER and LISTENER2 and then caused TNS-01106. So I decided to have a real good look at the listener.ora again and inspect any conflicts.

After inspecting listener.ora, I found both listeners had the same key name “EXTPROC1521” on IPC protocol, I think it might be the root cause of TNS-01106.

Solutions: Avoid Name Collision

There’re two ways that can avoid key name collision.

  1. Rename IPC key
  2. You can rename the key, let’s say, EXTPROC will be fine. Now, we can try to start the LISTENER2 and see what’s happened.

    [grid@primary01 ~]$ vi $ORACLE_HOME/network/admin/listener.ora
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.11)(PORT = 1521))
        )
      )

    LISTENER2 =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.21)(PORT = 1521))
        )
      )

  3. Don’t use IPC
  4. If you don’t use IPC protocol or external procedures in your database server, you can either remove or comment out the IPC line in order to escape from TNS-01106.

    Just add a # symbol to lead the line of PROTOCOL = IPC in LISTENER2.

    [grid@primary01 ~]$ vi $ORACLE_HOME/network/admin/listener.ora
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.11)(PORT = 1521))
        )
      )

    LISTENER2 =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          #(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.21)(PORT = 1521))
        )
      )

Start LISTENER2 Again

In my case, I choose to comment out IPC protocol in order to prevent TNS-01106.

[grid@primary01 admin]$ lsnrctl start listener2

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on

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

Starting /u01/app/12.1.0/grid/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /u01/app/12.1.0/grid/network/admin/listener.ora
Log messages written to /u01/app/grid/diag/tnslsnr/primary01/listener2/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.21)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.21)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     listener2
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date              
Uptime                    0 days 0 hr. 0 min. 0 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/listener2/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.21)(PORT=1521)))
The listener supports no services
The command completed successfully

Does LISTENER2 start to listen? Let’s see the status of LISTENER2.

[grid@primary01 ~]$ lsnrctl status listener2

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.21)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     listener2
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date
Uptime                    0 days 0 hr. 0 min. 33 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/listener2/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.21)(PORT=1521)))
Services Summary...
Service "SMALLDB" has 1 instance(s).
  Instance "SMALLDB", status READY, has 1 handler(s) for this service...
Service "SMALLDBXDB" has 1 instance(s).
  Instance "SMALLDB", status READY, has 1 handler(s) for this service...
The command completed successfully

Good! No more TNS-01106.

For further toubleshooting on listener, you may check this post:
TNSPING – 8 Aspects You Should Know

2 thoughts on “How to Resolve TNS-01106: Listener using listener name listener has already been started

Leave a Reply

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