Tag Archives: Failed to open service

Listener Name incorrectly defined in lsnrctl

Listener Name incorrectly defined in lsnrctl

Normally, connection to an Oracle database is performed through the use of an Oracle listener, whose job it is to listen on a specific machine and port for request to connect to a one or more database instances. The listener is controlled by a utility named lsnrctl located under $ORACLE_HOME/bin no matter the OS. By default Oracle will name you listener process LISTENER on a standard Oracle installation. However, this is not a good practice due to security concerns. In this article we will discuss the error you will receive if you have a non-default Listener name and specify the incorrect name while attempting to start the process. This article was written using a window’s based install but will work just as well on UNIX and Linux.

1. Switch directories to your $ORACLE_HOME/bin directory.

cd C:\oracle\product\10.2.0\db_1\bin
C:\oracle\product\10.2.0\db_1\BIN>

2. Start your listener utility with the command lsnrctl.

C:\oracle\product\10.2.0\db_1\BIN>lsnrctl

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 – Production on 01-MAY-2010 10:30
:17

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

Welcome to LSNRCTL, type “help” for information.

LSNRCTL>

3. Believing that your listener’s name is listener attempt to startup the listener with the command start

LSNRCTL> start listener
Starting tnslsnr: please wait…

Failed to open service , error 106
0.
TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 – Production
System parameter file is C:\oracle\product\10.2.0\db_1\network\admin\listener.or
a
Log messages written to C:\oracle\product\10.2.0\db_1\network\log\listener_orcl.
log
TNS-01151: Missing listener name, listener, in LISTENER.ORA

Listener failed to start. See the error message(s) above…

LSNRCTL>

4. NOTE: the error message returned by lsnrctl states: that we are missing the listener name in the file listener.ora.

5. Navigate to the directory given for listener.ora file and view its contents. You will see that the actual name of the listener is listener_oracle not listener.

LISTENER_ORACLE =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.110)(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)

SID_LIST_LISTENER_ORACLE =
(SID_LIST =
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
)

(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
)

6. There is no reason to change the listener.ora file but only to give the correct listener name in the lsnrctl utilities start command. As shown below the listener startups correctly.

LSNRCTL> start listener_oracle
Starting tnslsnr: please wait…

TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 – Production
System parameter file is C:\oracle\product\10.2.0\db_1\network\admin\listener.or
a
Log messages written to C:\oracle\product\10.2.0\db_1\network\log\listener_oracl
e.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.110)(PORT=1521)
))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)
))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.110)(PORT=1521)
))
STATUS of the LISTENER
————————
Alias listener_oracle
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 – Produ
ction
Start Date 01-MAY-2010 11:04:00
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\oracle\product\10.2.0\db_1\network\admin\listener.o
ra
Listener Log File C:\oracle\product\10.2.0\db_1\network\log\listener_ora
cle.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.110)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)))
Services Summary…
Service “PLSExtProc” has 1 instance(s).
Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
Service “orcl” has 1 instance(s).
Instance “orcl”, status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully
LSNRCTL>

7. As shown above once we present the correct listener name, the listener starts without error.

Larry J Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com