Tuesday 18 December 2012

Database Listener Issue | TNS-12555: TNS permission denied

[oracrp2@mkkdbserver1 ~]$ lsnrctl start LISTENER
LSNRCTL for Linux: Version 10.1.0.5.0 - Production on 13-MAR-2011 23:45:33
Copyright (c) 1991, 2004, Oracle.  All rights reserved.
Starting /hypprod/oracrp2/OraHome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.1.0.5.0 - Production
System parameter file is /hypprod/oracrp2/OraHome_1/network/admin/listener.ora
Log messages written to /hypprod/oracrp2/OraHome_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mkkdbserver1.mkkdomain.local)(PORT=1521)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted



Solution: 1
****************

[root@mkkdbserver1 ~]# rm -rf /var/tmp/.oracle
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.  see Note 391790.1 for details.
Clear the /var/tmp/.oracle directory and start from fresh:
1. Stop all listeners
2. Remove the /var/tmp/.oracle directory, e.g. run the following from the root account:

rm -rf /var/tmp/.oracle
3. Check the listener(s) configuration contains unique keys specified for each IPC endpoint and each listener
4. Start the listener(s) from the normal Oracle OS user.
Clearing the /var/tmp/.oracle directory will force the listeners to recreate the socket files from fresh, each with its own correct ownership.
You need to make sure that you always start the listener(s) from the same OS user(s) and that you do not reuse IPC key endpoints between listeners running under different users, otherwise the problem will resurface.

Solution: 2
**************

1. Ensure that /tmp/.oracle or /var/tmp/.oracle directory exists.
2. Confirm that the user who is trying to start the listener has adequate read and write permissions on the directory specified above. The permissions should be 777.
3. If the /tmp directory has reached full capacity, this would cause the listener to fail to write the socket files.

To implement the solution, please use the following example:
1. cd /var/tmp
2. Check the whether the .oracle directory exists:
cd .oracle
3. If the directory does not exist, request the System Administrator create the directory and set the ownership as root:root with the permissions set to 01777

mkdir /var/tmp/.oracle
chmod 01777 /var/tmp/.oracle
chown root /var/tmp/.oracle
chgrp root /var/tmp/.oracle
4. Next try starting the TNS Listener using the ‘lsnrctl start <listener_name>’ command.


 

5 comments:

  1. Thank you.

    First solution helped me

    ReplyDelete
  2. first one will be the fine...just remove /var/tmp/.oracle

    ReplyDelete
  3. Thank you.

    First solution helped me

    ReplyDelete