Thursday, February 09, 2012

Listener Fails To Start With IPC Permission Errors (TNS-12546 TNS-12555 TNS-00516 TNS-00525)


Ran into this issue where multiple Oracle Homes resides with listeners running from under different OS users or we are/have been running the same listener under different OS user(s).
Trying  to start the listener it is failing with permissions errors:
LSNRCTL> startStarting /app/oracle/product/102/bin/tnslsnr: please wait...
TNSLSNR for Solaris: Version 10.2.0.3.0 - ProductionSystem parameter file is /app/oracle/product/102/network/admin/listener.oraLog messages written to /app/oracle/product/102/network/log/listener.logListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=meta4)))Error listening on: (DESCRIPTION=(address=(protocol=ipc)(key=meta3)))
TNS-12546: TNS:permission denied
TNS-12560: TNS:protocol adapter error 
TNS-00516: Permission denied  
Solaris Error: 13: Permission denied
— OR —
$ lsnrctl start LISTENERLSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUN-2007 11:05:52Copyright (c) 1991, 2005, Oracle.  All rights reserved.Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 10.2.0.1.0 - ProductionSystem parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.oraError listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC2)))
TNS-12555: TNS:permission denied
TNS-12560: TNS:protocol adapter error 
TNS-00525: Insufficient privilege for operation  
Linux Error: 1: Operation not permittedListener failed to start. See the error message(s) above...
Some of the changes associated with such errors are:
  • Some IPC keys have been reused from older listener(s)
  • Same listener has previously been started under different OS users
  • Listeners running under different OS users are using the same IPC keys
  • Permissions in /var/tmp have been previously reset.
Cause
Older IPC socket file(s) were left in /var/tmp/.oracle and they cannot be deleted by the listener upon startup.

Solution
Please be aware that this step should ONLY be taken as a last resort and ONLY when there are no  Net connections to the database(s).  This procedure could cause active sessions to be terminated.  It is NOT recommended to take this action in a RAC environment. 
·         Stop all listeners
·         Remove the /var/tmp/.oracle directory, e.g. run the following from the root account:

rm -rf /var/tmp/.oracle

Clearing the /var/tmp/.oracle directory will force the listeners to recreate the socket files from fresh, each with its own correct ownership.

8 comments:

A Fan said...

Thank you! The solution you provided worked.

Ferdous Nadvi said...

Good to know that it worked. Thanks for your feedback :)

Janpreet Singh said...

Superb!! It worked and you saved my day Nadvi

Ferdous Nadvi said...

Thanks for the appreciation Janpreet :)

Unknown said...

Superb :) Worked like a Treat

Gunny KC said...

Thanks for posting. It helped me.

Unknown said...

wow... it works.. thanks man

Piyush Mishra said...

its really awesome man