26

I am getting the following errors while from the lsnrctl status command:

C:\Users\pna105>lsnrctl stat

 LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-OCT-2014 17:53
 :55

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

 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
 TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   64-bit Windows Error: 2: No such file or directory
 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
 TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
 TNS-00511: No listener
 64-bit Windows Error: 61: Unknown error

It was working fine before restart but now it is not working and I also can't access my Oracle homepage.

My tnsnames.ora is:

  ORACLE = 
  (DESCRIPTION =  
    (ADDRESS_LIST =  
      (ADDRESS = (PROTOCOL = TCP)(HOST = Localhost)(PORT = 1521))  
    )  
    (CONNECT_DATA =  
      (SERVICE_NAME = ORACLE)  
    )  
   )

   LISTENER_ORACLE =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


  ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  )
   (CONNECT_DATA =
   (SID = CLRExtProc)
   (PRESENTATION = RO)
  )
  )

My listener.ora is: (Here were error due to brackets misplaced adding few spaces resolved the problem TNS-12518)

   SID_LIST_LISTENER =
   (SID_LIST =
   (SID_DESC =
    (SID_NAME = ORACLE)
    (ORACLE_HOME = C:\app\PNA105\product\11.2.0\dbhome_1)
  )  
  (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\app\PNA105\product\11.2.0\dbhome_1)
    (PROGRAM = extproc)
   )
   (SID_DESC =
  (SID_NAME = CLRExtProc)
  (ORACLE_HOME = C:\app\PNA105\product\11.2.0\dbhome_1)
  (PROGRAM = extproc)
  (ENVS = "EXTPROC_DLLS=ONLY:C:\app\PNA105\product\11.2.0\dbhome_1\bin\oraclr11.dll")
  )
  )

  LISTENER =
 (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  )
  )

  ADR_BASE_LISTENER = C:\app\PNA105

Following is the output of lsnrctl start command

C:\Users\pna105>lsnrctl start

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-OCT-2014 18:26
:22

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

 Starting tnslsnr: please wait...

  TNS-12560: TNS:protocol adapter error
   TNS-00530: Protocol adapter error

Following is the Last entry needed from log file.

 Started with pid=14784
 Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
 Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
 Listener completed notification to CRS on start

 09-OCT-2014 15:46:01 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=INL007306$))
(SERVICE_NAME=oracle)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57389)) * 
establish * oracle * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error
 TNS-00530: Protocol adapter error
 64-bit Windows Error: 203: Unknown error
 Dynamic address is already listened on (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) 
 (HOST=127.0.0.1)(PORT=1521)))
 09-OCT-2014 15:46:06 * service_register * oracle * 0
 Thu Oct 09 15:46:11 2014
 09-OCT-2014 15:46:11 * service_update * oracle * 0
 09-OCT-2014 15:46:12 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=INL007306$))
 (SERVICE_NAME=oracle)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57393)) * 
  establish * oracle * 0
 09-OCT-2014 15:46:12 * service_update * oracle * 0
 09-OCT-2014 15:46:13 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=INL007306$))
 (SERVICE_NAME=oracle)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57394)) * 
 establish * oracle * 0

Tried to resolve TNS-12518 and listener started but still not able to access Oracle home page

output of lnsrctl stat

C:\Users\pna105>lsnrctl stat

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 09-OCT-2014 17:16
:56

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

 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
 STATUS of the LISTENER
  ------------------------
 Alias                     LISTENER
 Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
 ction
 Start Date                09-OCT-2014 15:45:58
 Uptime                    0 days 1 hr. 30 min. 58 sec
 Trace Level               off
 Security                  ON: Local OS Authentication
 SNMP                      OFF
 Listener Parameter File   C:\app\PNA105\product\11.2.0\dbhome_1\network\admin\li
 stener.ora
 Listener Log File         c:\app\pna105\diag\tnslsnr\INL007306\listener\alert\lo
 g.xml
 Listening Endpoints Summary...
 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
  Services Summary...
  Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
  Service "ORACLE" has 2 instance(s).
  Instance "ORACLE", status UNKNOWN, has 1 handler(s) for this service...
  Instance "oracle", status READY, has 1 handler(s) for this service...
  Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
  Service "oracleXDB" has 1 instance(s).
  Instance "oracle", status READY, has 1 handler(s) for this service...

T he command completed successfully

Pranav Nath
  • 398
  • 1
  • 3
  • 10
  • Show the output `lsnrctl status`. – neshkeev Oct 07 '14 at 13:27
  • The error "no listener" is fairly self-explanatory isn't it? You don't have a listener running. Is it set up to start automatically on reboot? Has it tried to start but failed - does a manual `lsnrctl start` work? If it won't start then check the error message that gives and the listener log file. – Alex Poole Oct 07 '14 at 14:55
  • Outputs provided please check – Pranav Nath Oct 08 '14 at 13:27
  • Does the listener log show why it isn't starting? It'll be under somewhere like C:\app\PNA105\diag\tnslsnr\... – Alex Poole Oct 09 '14 at 09:02
  • Logs provided please check. – Pranav Nath Oct 09 '14 at 10:28
  • Problem is solved and every thing back to normal now, listener log helped a lot thanks for corroborating. please add a answer so that I can vote, thanks a lot. – Pranav Nath Oct 09 '14 at 13:03
  • If the listener is started after the database it can take a little while for the DB to register its services, which might be why the home page wasn't immediately available. I don't know what you did to get the listener to start so can't really add an answer. Glad it's working now anyway. – Alex Poole Oct 09 '14 at 15:16
  • In logs I got error TNS-12518, which i resolved and it started working fine, it was you not me who did it. You put me on right path. – Pranav Nath Oct 10 '14 at 09:23
  • Alex Poole - If you want to troll, go to Fox News like the rest and type ignorant comments there. His question is well detailed and clear. – Ed Williams Mar 31 '17 at 18:23

15 Answers15

26

I had the same problem. Solution in my case: run CMD as ADMINISTRATOR. then type and execute: "lsnrctl start" wait about 2 minutes then should work. (in my case was only 50 seconds, but just to be on the safe side)

Imre
  • 474
  • 5
  • 11
  • 1
    I had to be administrator, ordinary user got cryptic oracle failure – Ron Jensen Aug 09 '19 at 18:26
  • For me, `lsnrctl start` was hanging because I had an open connection and an uncommitted transaction in a database link/external heterogeneous connection. Once I closed it the listener started right up. – Baodad Jan 14 '20 at 23:08
  • I had this problem again. I think this only happens if you have Oracle installed in Windows with Virtual user. At first everything will be fine but as soon as you edit the listener the problem will present itself. I think it's file ownership/permission issue. Once you edit (or replace) the file the Virtual oracle user probably no longer can access it which is why it only works when ran as Administrator (who has access to all files) – Imre Aug 14 '21 at 18:53
  • Thanks. That was the way for me to find out that there was an error when starting it. Windows was saying that "maybe no one needs this service so that is why it is not starting". Fixed the error, and then started ok. – Andrei Bazanov Dec 10 '21 at 13:51
8

1.Check the Environment variables (must be set for System and not for user):

ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server
ORACLE_SID = XE

2.Check if you have the right definition in listener.ora

XE =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)

3.Restart the service (Services > OracleServiceXE)

After that you may see a new service called OracleXETNSListenerXE.
There is already an old OracleXETNSListener.

I started both and then I was able to make a successful connection.

Edit:

If everything is running but you still can't connect, check if there is no error: ORA-12557: TNS:protocol adapter not loadable.

To correct the error go back to the Environment variables and this time edit the one called: Path. Be sure that C:\oraclexe\app\oracle\product\11.2.0\server\bin is somewhere at the beginning, definitely before any other path pointing to a different version of the Oracle DB.

Piotr Kepka
  • 318
  • 3
  • 5
7

I solved it by updating listener.ora file inside oracle directory oraclexe\app\oracle\product\11.2.0\server\network\ADMIN.

Why did it happen to me was because I changed my system name but inside listener.ora there was old name for HOST.

This might be one of the reasons... for those who still face such issue might think of this possibility as well.

Muneeb Mirza
  • 810
  • 1
  • 17
  • 35
  • 2
    Thank you so much. For anybody looking for the solution, just open up `product\11.2.0\server\network\ADMIN\listener.ora` and find out the line `LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = _NEW_NAME_)(PORT = 1521)) ) ) ` Then replace `_NEW_NAME_` with the desired text string. – joninx Jul 11 '17 at 12:56
3

I had the same problem on 11.201 on Windows. After: additional install 11.203 64bit server and client in new folders. PATH environment variable was changed right after install. Error in listener appeared after listener service restart. In my case there was a night time and number of windows updates, so windows server restart helped us. Also I cleaned listener.log file according to http://pavandba.com/tag/tns-12560-tns-protocol-adapter-error/, it was surprisingly big.

  • Check your tns listener.ora file in my case problem was due to misplaced backets, hope you also find your problem. – Pranav Nath Nov 21 '14 at 12:13
3

Check that ORACLE_HOME environment variable is pointing to the correct oracle home. In my case it was changed by another software installation.

MrLymy
  • 81
  • 3
2

Same happened to me after I changed computer name. To fix that, just locate listener.ora file and replace old computer name with the new one

Mike Alex
  • 21
  • 1
2

In my case, I tried to start the listener via console:

> lsnrctl star

This command printed the following error:

TNS-12560: TNS:protocol adapter error
TNS-00583: Valid node checking: unable to parse configuration parameters

So, I performed the following actions:

  1. Check if Oracle listener.ora or sqlnet.ora file contains special characters
  2. Check if Oracle listener.ora or sqlnet.ora` file are in wrong format or syntax
  3. Check if Oracle listener.ora or sqlnet.ora file have some left justified parenthesis which are not accepted by oracle parser.

Have a look at these files and check the proper syntax. If possible remove/rename sqlnet.ora and try to restart the listener. Or remove/rename both listener.ora or sqlnet.ora file and recreate it properly. These will defenitely resolve the issue.

manix
  • 14,537
  • 11
  • 70
  • 107
2

In my case somehow windows listener service had stopped working so I was not able to connect to Qracle using SQL Developer. However I was able to connect through sqlplus.

Below solution worked for me:

First, ensure that your listener service is running.

C:\Documents and Settings\ME>lsnrctl status 

If the listener service is not running, re-start the listener service using the Windows task manager or use the DOS command line utility to re-start the Windows service with the net start command:

C:\Documents and Settings\ME>net start OracleOraDb10g_home1TNSListener 

Try to start the listener service using lsnrctl from DOS prompt.

lsnrctl start
mustaccio
  • 18,234
  • 16
  • 48
  • 57
  • This is what happened to me, for whatever reason the windows service stopped running. After manually starting everything worked without needing to manipulate the tsnnames.ora and listener.ora files – Josh Weston Sep 14 '19 at 15:47
1

I encounter similar problem when installing oracle 11gR2 on Windows 2012 server. the problem is solved when I run cmd.exe as Admistrator privilege and run "lsnrctl start LISTENER".

Jaewon Lee
  • 21
  • 3
  • yes, you can also check running services in Administrative Tools in control panel as administrator, that will also help. – Pranav Nath Dec 23 '15 at 06:44
1

I encountered the same problem and reason being: Mine is a personal windows PC. And i have modified the computer name and the same did not reflect in listener.ora. Updating ORACLE_HOME\network\ADMIN\listener.ora with updated host name fixed the issue.

0

I managed to resolve the issue that caused the configuration to fail on a docker container running the Hortonworks HDP 2.6 Sandbox.

If the initial configuration fails the listener will be running and will have to be killed first:

ps -aux | grep tnslsnr
kill {process id identified above}

Then next step is then to fix the shared memory issue which makes the configuration process fail.

Oracle XE requires 1 Gb of shared memory and fails otherwise (I didn't try 512 mb) according to https://blogs.oracle.com/oraclewebcentersuite/implement-oracle-database-xe-as-docker-containers.

vi /etc/fstab

change/add the line to:

tmpfs    /dev/shm     tmpfs   defaults,size=1024m 0 0

Then reload the configuration by:

mount -a

Keep in mind that the next time you restart the docker container you might have to do 'mount -a'.

limboy
  • 461
  • 5
  • 5
0

In my case the listener service would not start because it was set to listen to a VPN connection as well to other serveral interfaces.

Once I connected to the VPN, it just started.

However, @Imre's trick with "lsnrctl start" put me to the right track.

Adi
  • 5,113
  • 6
  • 46
  • 59
0

Problem

The listener service is stopped in services.msc.

Cause

User password was changed.

Solution

  • Open services.msc.
  • Right-click the specific listener service.
  • Click Properties.
  • Click the Logon tab.
  • Change the password.
  • Click OK.
  • Start the service.
Rasshu
  • 1,764
  • 6
  • 22
  • 53
0

In my Windows case the listener would not start, and 'lsnrctl start' would hang forever. The solution was to kill all processes of extproc. I suspect it had something funny to do with my vpn

ununiform
  • 406
  • 5
  • 6
0

There is an error in Oracle Database XE installer. It MAY be the cause of the problem described above, as it manifests exactly like this.

The thing is when You install the software not in default filesystem location, all runs smoothly until .. the first machine restart.

It can be repaired by clobbering the registry as described in previous answers, but installing XE in default location is the simplest way to get the database installation intact after restart.

vSzemkel
  • 624
  • 5
  • 11