LLI Wiki — My Digital Knowledge Base

Oracle: managing the listener (lsnrctl) and troubleshooting it

Common lsnrctl commands, listener.ora configuration and fixes for Oracle listener failures, including 'The listener supports no services'.

The Oracle Net listener accepts client connections and is managed with lsnrctl. Its configuration is stored in listener.ora. This page lists the day-to-day commands and the fixes for the most common listener problems.

Configuration file

The listener is defined in $ORACLE_HOME/network/admin/listener.ora. The listener name and port can be changed there.

vi $ORACLE_HOME/network/admin/listener.ora

When several instances or listeners run from the same Oracle home, always pass the listener name to lsnrctl commands.

Control commands

lsnrctl status LISTENER
lsnrctl services LISTENER
lsnrctl start LISTENER
lsnrctl stop LISTENER

Check the listener processes:

ps -ef | grep tnslsnr | grep -v grep
ps -ef | grep lsnrctl | grep -v grep

List the listener endpoints and the services registered with them, from the database:

SELECT * FROM gv$listener_network;

Read the listener log

ps -auxwwf | grep lsnrctl
lsnrctl
LSNRCTL> set current_listener LISTENER_APP

LISTENER_APP is a placeholder for the listener name.

Listener does not start

Set the Oracle environment, then relink the Oracle binaries:

export ORACLE_HOME=/path/to/oracle/home
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
$ORACLE_HOME/bin/relink all

If the listener still does not start, clear the stale socket files as root:

su - root
cd /var/tmp/.oracle
rm -Rf *

"The listener supports no services"

This message means the database instance has not registered its services with the listener. Check the local_listener parameter:

SHOW PARAMETER local_listener

Point it to the listener address (192.0.2.10 and port 1522 are placeholders) and force a registration:

ALTER SYSTEM SET local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.0.2.10)(PORT=1522))';
ALTER SYSTEM REGISTER;

Then check the result with lsnrctl status.

Notes

Mastodon LLIMastodon SocialFosstodon