ORA-12541: TNS: no listener
Nothing is listening at the host and port the client tried: the listener isn't running, or the address or port is wrong or blocked.
- Error code
ORA-12541- Category
- Connection and login
What it means
The client opened a connection to the address in the connect descriptor and nothing answered as an Oracle listener. Either the listener process isn't running on that host and port, or the client is aiming at the wrong place.
Newer releases word it as Cannot connect. No listener at host_port.
Common causes
- The listener is stopped, for example after a server reboot.
- Wrong host or port in the connect string; the default port is 1521 but many installations change it.
- The listener listens only on
localhostor another interface. - A firewall rejects the port.
How to fix it
-
On the database server, check and start the listener:
lsnrctl status, thenlsnrctl start. -
Compare the host and port in the client's connect string with the addresses
lsnrctl statusreports. -
From the client, test the port with
tnspingor a TCP check such asnc -vz db-host 1521, and open it in any firewall in between.
Related errors
ORA-12514TNS: listener doesn't know the requested serviceORA-12170TNS: connect timeout occurredORA-12154TNS: could not resolve the connect identifier2003MySQL: Can't connect to MySQL server on host08001PostgreSQL: unable to establish connection
More connection and login errors
ORA-01017invalid username/password; logon deniedORA-12505TNS: listener doesn't know the SIDORA-03113end-of-file on communication channelORA-03135connection lost contactORA-28000the account is lockedORA-28001the password has expiredORA-01034ORACLE not availableORA-27101shared memory realm does not exist
The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.
Work on Oracle in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Oracle and the other databases you use.