Skip to content
Commitpedia
Log in Join & edit

Fix: ORA-12541: TNS:no listener

The client reached the host but nothing was listening on that port. Start or fix the Oracle listener, or correct the host and port in your connect string.

Not checked by a trusted editor yet Last edited Outdated?

Edit history of Fix: ORA-12541: TNS:no listener: 1 recorded edit
Edit history · 1 edit
Type
Article
Edits
1
Editors
1
First issued
15 Oct 2026
Last edit
15 Oct 2026
Reading
2 min

In Oracle Database 19c and older clients the error reads:

ORA-12541: TNS:no listener

Newer releases print a more specific message that includes the address the client tried, in the form ORA-12541: Cannot connect. No listener at host_port. Both mean the same thing: the connection request reached a host, but no Oracle listener was accepting connections at that host and port (or, for IPC connections, at that key).

Cause 1: the listener is not running

This is the most common cause, for example after a server reboot when the listener is not started automatically. On the database server, as the Oracle software owner:

lsnrctl status
lsnrctl start
lsnrctl status

If your listener.ora defines a listener with another name, pass it: lsnrctl status LISTENER_APP. lsnrctl start can only start a listener on the machine you run it on.

After the listener starts, a running database registers its services with it dynamically, so give it a short moment and run lsnrctl status again. The services summary should list your PDB’s service with status READY.

Cause 2: wrong host or port in the connect string

Compare what the client uses with what the listener listens on. lsnrctl status prints the protocol addresses the listener is listening on, including HOST and PORT.

  • Easy Connect: check host:port/service. The port defaults to 1521 if you leave it out, so a listener on 1522 needs the port spelled out.
  • tnsnames.ora alias: check HOST and PORT in the entry, and that the client reads the file you think it reads (TNS_ADMIN, $ORACLE_HOME/network/admin).
  • Typing errors in the host name can also resolve to another machine that has no listener at all.

Cause 3: the listener only listens on another interface

If listener.ora uses HOST=localhost or a specific internal IP, connections to another address of the same server get no listener. Make the HOST match the name or address clients use, then lsnrctl reload (or stop and start the listener).

Cause 4: firewall or network path

A firewall that rejects the connection can produce the same symptom. Test the TCP path from the client:

nc -vz db1.example.com 1521

If the test works from the database server itself but not from the client, open port 1521/tcp (or your listener’s port) in the host firewall and any network firewalls in between.

Next errors you may meet

Once the listener answers, a wrong service name gives a different error from the listener, and wrong credentials give ORA-01017. That is progress: it means the network path and listener now work.

Official documentation

See also

Repos in the wild

History

Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.

  1. Commitpedia +2,772 chars

Report a problem

Something wrong, unsafe or copied? Tell the editors.
What is wrong?