ORA-12541: TNS No Listener is one of those errors every Oracle DBA encounters — especially when databases are restarted, listeners are misconfigured, or services fail to register.
The message usually looks like this:
ORA-12541: TNS: no listener
It means your Oracle client cannot connect to the database because the listener process on the server isn’t available — or your connection string is pointing to the wrong host or port.
Let’s break it down and walk through how to diagnose and fix it step by step.
⚙️ What Is ORA-12541?
Oracle’s TNS (Transparent Network Substrate) handles communication between clients and the database server.
The listener process (tnslsnr) runs on the server to accept incoming client connections.
The ORA-12541 error means:
Your client is trying to connect to the listener, but the listener is not running, not reachable, or misconfigured.
🧠 Common Causes of ORA-12541
- 🔌 Listener not started on the server.
- 🌍 Incorrect hostname or port in the TNS entry or connection string.
- ⚙️ Listener.ora file misconfiguration (wrong SID or service).
- 🚫 Firewall or security group blocking port 1521.
- 🧩 Database not registered with listener after restart.
- 🪫 Multiple Oracle Homes with mismatched configurations.
🔍 Step-by-Step Troubleshooting Guide
Step 1: Verify Listener Status
On the database server, run:
lsnrctl status
If the listener is running, you’ll see something like:
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0
Start Date 06-NOV-2025 07:30:00
Listening Endpoints Summary...
If it’s not running, you’ll see:
TNS-12541: TNS: no listener
✅ Fix: Start the listener.
lsnrctl start
Step 2: Check Listener Configuration
Open your listener.ora file:
vi $ORACLE_HOME/network/admin/listener.ora
You should see something like:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521))
)
)
✅ Verify that:
- The HOST matches your actual server hostname or IP.
- The PORT matches what your client uses (default is 1521).
Step 3: Verify TNS Entry on Client Side
On the client (or local machine), open:
vi $ORACLE_HOME/network/admin/tnsnames.ora
Example:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
✅ Ensure the HOST and PORT are identical to the server’s listener.ora.
You can test using:
tnsping ORCL
Expected result:
OK (10 msec)
If it fails — the listener isn’t reachable or configuration is mismatched.
Step 4: Check Database Registration with Listener
Even if the listener is running, the database may not have registered with it.
Connect as SYSDBA:
sqlplus / as sysdba
Run:
ALTER SYSTEM REGISTER;
Then verify:
lsnrctl services
You should see your service name listed like:
Service "orcl" has 1 instance(s).
Instance "orcl", status READY
If not — check your LOCAL_LISTENER parameter:
SHOW PARAMETER local_listener;
Fix it if empty:
ALTER SYSTEM SET local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver)(PORT=1521))' SCOPE=BOTH;
ALTER SYSTEM REGISTER;
Step 5: Confirm Firewall and Port Accessibility
Sometimes, the listener is up — but the port is blocked.
On the server:
netstat -tulnp | grep 1521
If you don’t see the listener process, restart it.
If you do, try from the client:
telnet dbserver 1521
If the connection fails, your firewall or network security group is blocking it.
✅ Fix:
- Open port 1521 on the firewall (
firewall-cmdoriptables). - Ensure network ACLs allow communication between client and DB server.
Step 6: Multiple Listeners or Homes
In some setups, you may have multiple Oracle Homes or multiple listeners.
Ensure you’re using the correct ORACLE_HOME for your listener:
echo $ORACLE_HOME
ps -ef | grep tnslsnr
Stop duplicate listeners:
lsnrctl stop LISTENER2
Keep only the main one active.
🧩 Real Production Example
A financial system’s application suddenly started throwing:
ORA-12541: TNS: no listener
DBA checked:
lsnrctl status
and found:
TNS-12541: TNS: no listener
Turns out the database server had restarted overnight — but the listener didn’t auto-start.
Fix:
lsnrctl start
and then enabled auto-start in /etc/oratab:
LISTENER:ON
After that, the listener came up automatically after each reboot — and the issue never returned.
Proactive Prevention Tips
- Enable listener auto-start in your OS startup scripts.
- Monitor listener availability with OEM, Datadog, or a cron job.
- Ensure LOCAL_LISTENER parameter is set so the DB registers automatically.
- Check TNS configurations after any hostname or port change.
- Use multiple listeners for HA environments with RAC or Data Guard.
Related Articles
- ORA-12514: Listener Does Not Currently Know of Service Requested
- ORA-00257: Archiver Error – Connect Internal Only Until Freed
- ORA-15041: Diskgroup Space Usage Too High – Fix Guide
Final Thoughts
The ORA-12541: TNS No Listener error is one of the simplest yet most disruptive Oracle connectivity issues.
In most cases, the fix is as easy as starting the listener — but understanding why it stopped (configuration, registration, or firewall) ensures it doesn’t happen again.
With proactive monitoring and proper listener configuration, your Oracle environment will stay connected and reliable.





