ListenerSolaris

How to Resolve TNS-12546: TNS:permission denied + Solaris Error: 13: Permission denied

TNS-12546

I got TNS-12546: TNS:permission denied when I tried to start listener as oracle.

oracle@solaris11vm:~$ lsnrctl start

LSNRCTL for Solaris: Version 11.2.0.4.0 - Production on 31-JAN-2018 21:01:57

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

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/solaris11vm/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12546: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00516: Permission denied
   Solaris Error: 13: Permission denied

Listener failed to start. See the error message(s) above...

This is because there were some files locked by root and oracle can do nothing about it.

root@solaris11vm:~# cd /var/tmp
root@solaris11vm:/var/tmp# ls -al
total 11
drwxrwxrwt   3 root     sys            3 Jan 31 21:01 .
drwxr-xr-x  37 root     sys           44 Jan 22 22:46 ..
drwxrwxrwt   2 root     root           6 Jan 31 21:01 .oracle

So I removed all the files in this directory .oracle by root.

root@solaris11vm:/var/tmp# rm -rf .oracle/

Try it again by user oracle. Will we see TNS-12546 this time?

oracle@solaris11vm:~$ lsnrctl start

LSNRCTL for Solaris: Version 11.2.0.4.0 - Production on 01-FEB-2018 00:08:33

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

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/solaris11vm/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=solaris11vm)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Solaris: Version 11.2.0.4.0 - Production
Start Date                01-FEB-2018 00:08:33
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/solaris11vm/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

It’s working well. No TNS-12546.

2 thoughts on “How to Resolve TNS-12546: TNS:permission denied + Solaris Error: 13: Permission denied

Leave a Reply

Your email address will not be published. Required fields are marked *