Monday, March 29, 2010

TNS-01150: The address of the specified listener name is incorrect

Problem Description
While start Oracle listener it fails with error "TNS-01150: The address of the specified listener name is incorrect" like below.
E:\Arju>lsnrctl start LISTENER12

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-MAR-2010 10:38:21

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

Starting tnslsnr: please wait...

TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
System parameter file is E:\oracle\product\10.2.0\db_2\network\admin\listener.ora
Log messages written to E:\oracle\product\10.2.0\db_2\network\log\listener12.log
TNS-01150: The address of the specified listener name is incorrect

Listener failed to start. See the error message(s) above...
Problem Investigation
If you open the logfile "Log messages written to E:\oracle\product\10.2.0\db_2\network\log\listener12.log" as suggest in the error message above you will see an entry like,
TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-MAR-2010 15:51:16

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

System parameter file is E:\oracle\product\10.2.0\db_2\network\admin\listener.ora
Log messages written to E:\oracle\product\10.2.0\db_2\network\log\listener12.log
Trace information written to E:\oracle\product\10.2.0\db_2\network\trace\listener12.trc
Trace level is currently 0

Started with pid=4644
TNS-01150: The address of the specified listener name is incorrect
But unfortunately you no longer will see trace file information in the file "E:\oracle\product\10.2.0\db_2\network\trace\listener12.trc" as written in listener log file unless you have enable listener tracing.

Cause of the Problem
The problem happened because the address on which the listener attempted to listen contains a syntax error or have indention problem.

Solution of the Problem
My listener entry within listener.ora file was like below which cause TNS-01150 error.
LISTENER12 =
(DESCRIPTION = 
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) 
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1524))
)
I changed the indentation as,
LISTENER12 =
 (DESCRIPTION = 
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) 
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1524))
 )
Now starting the listener is working perfect.
E:\Arju>lsnrctl start LISTENER12

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-MAR-2010 18:48:28

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

Starting tnslsnr: please wait...

TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
System parameter file is E:\oracle\product\10.2.0\db_2\network\admin\listener.ora
Log messages written to E:\oracle\product\10.2.0\db_2\network\log\listener12.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1524)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER12
Version                   TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date                29-MAR-2010 18:48:29
Uptime                    0 days 0 hr. 0 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   E:\oracle\product\10.2.0\db_2\network\admin\listener.ora
Listener Log File         E:\oracle\product\10.2.0\db_2\network\log\listener12.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1524)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "a" has 1 instance(s).
  Instance "a", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Note that, a variant of above problem throws following TNS-01150:, NL-00303: if the indention/syntax is not ok.
E:\Arju>lsnrctl stop LISTENER12

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-MAR-2010 18:50:58

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

TNS-01150: The address of the specified listener name is incorrect
 NL-00303: syntax error in NV string

So as soon as you hit TNS-01150 look for your Oracle version listener.ora syntax and make sure you have tab starting from second lines in listener entry.

Related Documents
ORA-12518: TNS:listener could not hand off client connection
The listener supports no services
lsnrctl start fails with TNS-12541, TNS-12560,TNS-00511, Linux Error: 111:
Listener Hangs, Child listener process remains persistence
EM Daemon is not running
ORA-12541: TNS:no listener
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Login to Dbconsole, Authentication failed!null Returned
How to Enable Listener Logging and Tracing
How to set oracle listener password

No comments: