Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Thursday, April 24, 2008

TNS issues

Recently in a fresh installation, TNS listener refused to start with these errors:

TNS-12546 / ORA-12546: TNS:permission denied
TNS-12560 / ORA-12560: TNS:protocol adapter error
TNS-00516: permission denied
Solaris Error: 13: permission denied

I checked the port on which we were trying to start:

$ telnet localhost 1521
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
telnet: Unable to connect to remote host: Network is unreachable

This means the port is free

I checked the directory /var/tmp/.oracle

$ ls -ld /var/tmp/.oracle
drwxrwxrwt 2 root root 2560 Apr 22 11:10 /var/tmp/.oracle

Even though the permission was 777 on this directory, it was unable to write to it. So I gave ownership of this directory to oracle user

su - root
chown oracle:dba /var/tmp/.oracle

I started listener again. It worked. ls -ltr /var/tmp/.oracle showed two new files:

srwxrwxrwx 1 oracle dba 0 Apr 23 14:26 sEXTPROCgpslmpd1
srwxrwxrwx 1 oracle dba 0 Apr 23 14:26 s#23310.1

If you issue a file command on these:

$ file sEXTPROCgpslmpd1
sEXTPROCgpslmpd1: socket
$ file s#23310.1
s#23310.1: socket
oralmpd1@tsgsd1007 #

These are not files but sockets. Because the ownership was not with oracle, it was unable to create a socket in this directory. Since listener had started and socket was created, I changed back the permission of this directory to root:

su - root
chown root:root /var/tmp/.oracle

I shutdown and restarted listener just to double check and it worked fine.

7 comments:

Atul Kumar said...

Good one Vikram.

I prefer manual one, I am not sure how you reached on figures that using dbua is faster anyway nice post and keep coming such posts in future

Vikram Das said...

Hi Atul,

Your comment is for my post DBUA vs Manual upgrade http://oracleappstechnology.blogspot.com/2008/04/dbua-vs-manual-upgrade.html
We finally realized why manual upgrade was slower than DBUA. During manual upgrade we never disturbed the parameter job_queue_processes and it remained at 2. So even when we increased the parallelism to 24, only 2 jobs would be started. DBUA on the other hand dynamically increases the job_queue_processes which results in more processes and faster compilation of invalids. If we set job_queue_processes to 24 then manual is as fast as DBUA.

- Vikram

Soumyen said...

In my hope PC I have Windows XP, I am going to install Oracle 9i,

Installation completed successfully except 'Agent Configuration Assistant' failed.

When I am trying to start the listener services from the Windows Service Utility, i am getting the following error for couple of services namely --OracleOraHome92Agent,OracleOraHome92HTTPServer,OracleOraHome92PagingServer
OracleOraHome92TNSListener etc.

Error:
The Oracle81listenerTNSListener on Local Computer Started and then Stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alert service

If i delete all my previous listener services from oracle through "Net Manager", although these listener services are showing in the " Window's Service window" --why?

When i am trying to run listener from windows command prompt, getting the following error

TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production
System parameter file is E:\oracle\ora92\network\admin\listener.ora
Log messages written to E:\oracle\ora92\network\log\listener.log
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=home-8bdc697937)(P
ORT=1521)))
TNS-12546: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00516: Permission denied
32-bit Windows Error: 13: Permission denied

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

How to proceed?

Vikram Das said...

Hi Soumyen,

You have written:

Error:
The Oracle81listenerTNSListener on Local Computer Started and then Stopped.

Shouldn't it be saying Oracle92Listener instead of Oracle81Listener. It seems that you have an old listener running.

To verify do this
Click on Start> Run > cmd

On command prompt
type:

telnet localhost 1521

If the screen goes blank, it means that you have a listener running on 1521. You can do Ctrl+] and type quit to come out of the blank screen.

Stop the old listener. Disable the old listener service.

Vijay said...

Good One
Thx.
Vijay

Arun said...

Hi Vikram,

I am having a similar problem with the Windows system.


TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production on 29-JAN-2010 19:51:12

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

System parameter file is D:\oracle\NTAMLT99\network\admin\listener.ora
Log messages written to D:\oracle\NTAMLT99\network\log\listener.log
Trace information written to D:\oracle\NTAMLT99\network\trace\listener.trc
Trace level is currently 0

Started with pid=2140
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NTAMLT99)(PORT=1521)))
TNS-12546: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00516: Permission denied
32-bit Windows Error: 13: Permission denied
No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))

TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production on 29-JAN-2010 21:44:12

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

System parameter file is D:\oracle\NTAMLT99\network\admin\listener.ora
Log messages written to D:\oracle\NTAMLT99\network\log\listener.log
Trace information written to D:\oracle\NTAMLT99\network\trace\listener.trc
Trace level is currently 0

Started with pid=3080
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NTAMLT99)(PORT=1521)))
TNS-12546: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00516: Permission denied
32-bit Windows Error: 13: Permission denied
No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))


Can you let me know which folder I should try to give access in Windows as per your earlier response.

Anonymous said...

Nice fix. Worked for me after a E-Business Clone from a Hot Backup restore from Production.