About Me

My photo
Bangalore, India
I am an Oracle Certified Professional working in SAP Labs. Everything written on my blog has been tested on my local environment, Please test before implementing or running in production. You can contact me at amit.rath0708@gmail.com.

Monday, September 1, 2014

Oracle Error starting listener: "Failed to start service, error 0"

Today I faced Below error when I was trying to start listener in my Windows machine :-

C:\Users\NewAdmin>lsnrctl start

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 01-SEP-2014 21:40:10

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

Starting tnslsnr: please wait...

Failed to start service, error 0.

I checked the log in G:\app\NewAdmin\cfgtoollogs\netca also I got below message :-

[AWT-EventQueue-0] [ 2014-09-01 20:37:08.704 IST ] [WindowsSystem.dorunRemoteExecCmd:2078]  _WS_: remote command executed, but didn't return zero.
[AWT-EventQueue-0] [ 2014-09-01 20:37:08.704 IST ] [GETCRSHOMEUtil.getCRS_HOME:147]  cmdTool.execute() failed.
[AWT-EventQueue-0] [ 2014-09-01 20:37:08.706 IST ] [HAUtils.isHASConfigured:364]  Ignoring exception in isHASConfigured: PRCT-1400 : getcrshome execution failed. Detailed error:
localnode
[AWT-EventQueue-0] [ 2014-09-01 20:37:08.707 IST ] [HAUtils.isHASConfigured:365]  oracle.cluster.deployment.ClusterwareInfo.getConfiguredCRSHome(ClusterwareInfo.java:425)
oracle.sysman.assistants.util.hasi.HAUtils.getCRSHome(HAUtils.java:592)
oracle.sysman.assistants.util.hasi.HAUtils.getHASHome(HAUtils.java:652)
oracle.sysman.assistants.util.hasi.HAUtils.isHASConfigured(HAUtils.java:360)
oracle.net.ca.ConfigureListener.getLsnrsRegWithHA(ConfigureListener.java:557)
oracle.net.ca.ConfigureListener.getListeners(ConfigureListener.java:774)
oracle.net.ca.NetCA.prepareNextPage(NetCA.java:1220)
oracle.net.ca.NetCA.wizardValidatePage(NetCA.java:1036)
oracle.ewt.wizard.WizardPage.processWizardValidateEvent(Unknown Source)
oracle.ewt.wizard.WizardPage.validatePage(Unknown Source)
oracle.ewt.wizard.BaseWizard.validateSelectedPage(Unknown Source)
oracle.ewt.wizard.BaseWizard.doFinish(Unknown Source)
oracle.ewt.wizard.BaseWizard$Action.actionPerformed(Unknown Source)
oracle.ewt.button.PushButton.processActionEvent(Unknown Source)
oracle.ewt.button.PushButton.processEventImpl(Unknown Source)
oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
oracle.ewt.button.PushButton.activate(Unknown Source)
oracle.ewt.lwAWT.AbstractButton.processMouseReleased(Unknown Source)
oracle.ewt.lwAWT.AbstractButton.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Component.java:5282)
java.awt.Container.processEvent(Container.java:1966)
oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)
oracle.ewt.button.PushButton.processEventImpl(Unknown Source)
oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Component.java:3984)
java.awt.Container.dispatchEventImpl(Container.java:2024)
java.awt.Component.dispatchEvent(Component.java:3819)
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
java.awt.Container.dispatchEventImpl(Container.java:2010)
java.awt.Window.dispatchEventImpl(Window.java:1791)
java.awt.Component.dispatchEvent(Component.java:3819)
java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
java.awt.Dialog$1.run(Dialog.java:535)
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
[AWT-EventQueue-0] [ 2014-09-01 20:37:08.708 IST ] [ConfigureListener.getLsnrsRegWithHA:568]  HAS is installed but *NOT* Configured !!
[AWT-EventQueue-0] [ 2014-09-01 20:37:08.708 IST ] [ConfigureListener.getLsnrsRegWithCRS:650]  NOT a Cluster !!
[AWT-EventQueue-0] [ 2014-09-01 20:37:08.709 IST ] [ConfigureListener.getScanLsnrNames:693]  NOT a Cluster !!

[AWT-EventQueue-0] [ 2014-09-01 20:37:08.710 IST ] [ConfigureListener.getListeners:811]  Returning SI lsnrs = LISTENER

By checking the above its seems port was free but still it's not able to read the listener related files.

LSNRCTL status was giving me below message :-

C:\Users\NewAdmin>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 01-SEP-2014 21:40:00

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=amit-PC)(PORT=9001)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   64-bit Windows Error: 61: Unknown error
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC9001)))
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

It seems LSNRCTL command was not able to read the listener related files from already set environment variables(ORACLE_HOME and PATH).

I checked the environment variables , In User level settings ORACLE_HOME and PATH variables was properly defined but in System level Settings ORACLE_HOME was set to another location. I changed it as its in USER level setting and then tried to start the listener and it started successfully. PFB output :-

C:\Users\NewAdmin>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 01-SEP-2014 21:51:22

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=amit-PC)(PORT=9001)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date                01-SEP-2014 21:51:09
Uptime                    0 days 0 hr. 0 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   G:\app\NewAdmin\product\11.1.0\db_1\network\admin\listener.ora
Listener Log File         g:\app\newadmin\diag\tnslsnr\amit-PC\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=amit-PC)(PORT=9001)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 2 handler(s) for this service...
The command completed successfully

I hope this article helped you.

Regards,
Amit Rath

2 comments: