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

本文档介绍了解决Oracle Net Services在尝试启动监听器时遇到的权限错误问题。该问题通常发生在Solaris和Linux平台上,并提供了详细的症状、原因分析及解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

In this Document

 Symptoms
 Changes
 Cause
 Solution
 References

Applies to:

Oracle Net Services - Version 10.2.0.1.0 to 11.2.0.3 [Release 10.2 to 11.2]
Information in this document applies to any platform.
Checked for relevance on 7-MAY-2010.


Symptoms

When we try to start the listener it is failing with permissions errors:

LSNRCTL> start
Starting /app/oracle/product/102/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 10.2.0.3.0 - Production
System parameter file is /app/oracle/product/102/network/admin/listener.ora
Log messages written to /app/oracle/product/102/network/log/listener.log
Listening 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 LISTENER

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUN-2007 11:05:52

Copyright (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 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Error 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 permitted

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

OR

lsnrctl start

LSNRCTL for Solaris: Version 10.2.0.3.0 - Production on 06-OCT-2012 02:43:55

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

Starting /ipdsns048/oracle/product/10.2.0/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 10.2.0.3.0 - Production
System parameter file is /ipdsns048/oracle/home/network/admin/listener.ora
Log messages written to /ipdsns048/oracle/home/network/log/listener.log

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

Error listening on: (ADDRESS=(PROTOCOL=IPC)(KEY=key1))
TNS-12542: TNS:address already in use
TNS-12560: TNS:protocol adapter error
 TNS-00512: Address already in use
  Solaris Error: 125: Address already in use

 

We have multiple Oracle Homes with listeners running from under different OS users or we are/have been running the same listener under different OS user(s).

Changes

One or more of the following items:

  • 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.

Listener IPC endpoints on UNIX platforms are implemented with local UNIX sockets. IPC key names are used to form the socket file names created in /var/tmp/.oracle. The listener creates the files with the same user ownership as the OS user it has been started from.

 

The /var/tmp/.oracle directory is has the "sticky" flag set so the files can be removed only by the user that created them. At listener startup, if the listener finds an older socket file with the same name (same IPC key) but with different user ownership as the user it's running then it will fail to delete this socket file due to OS permission restrictions.

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.  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.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值