ITPub博客

首页 > 数据库 > Oracle > ORA-12537: TNS:connection closed -- oracle 11g 监听拒绝连接问题

ORA-12537: TNS:connection closed -- oracle 11g 监听拒绝连接问题

原创 Oracle 作者:hgl56 时间:2016-06-29 00:08:14 0 删除 编辑

ORA-12537: TNS:connection closed -- oracle 11g 监听拒绝连接问题


TNS-12518 TNS-12546 TNS-12560 TNS-00516


OS:AIX 6.1
2节点RAC
版本:11.2.0.4.4


说明:
oracle服务端本地可以连接。监听是正常的,数据库服务都已经注册到监听里面了。但是通过tns远程连接,监听拒绝连接。


martdb2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.25.21)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = martdb)
      (INSTANCE_NAME = martdb2)
    )
  )


ora11g[martdb_2]/ora11g/oracle/OracleHomes/db11g/network/admin> sqlplus system/Ora123@martdb2


SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 21 17:30:22 2015


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


ERROR:
ORA-12537: TNS:connection closed




Enter user-name: 
ERROR:
ORA-01017: invalid username/password; logon denied




Enter user-name: 
ERROR:
ORA-01017: invalid username/password; logon denied




SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus



查看监听日志
21-JAN-2015 17:33:34 * (CONNECT_DATA=(SERVICE_NAME=martdb)(INSTANCE_NAME=martdb2)(CID=(PROGRAM=sqlplus)(HOST=martdb_2)(USER=ora11g))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.25.21)(PORT=51475)) * establish * martdb * 12518
TNS-12518: TNS:listener could not hand off client connection
 TNS-12546: TNS:permission denied
  TNS-12560: TNS:protocol adapter error
   TNS-00516: Permission denied
    IBM/AIX RISC System/6000 Error: 13: Permission denied


查看错误代码
ora11g[martdb_2]/ora11g/oracle/OracleHomes/db11g/network/admin> oerr TNS 12518
12518, 00000, "TNS:listener could not hand off client connection"
// *Cause: The process of handing off a client connection to another process
// failed.
// *Action: Turn on listener tracing and re-execute the operation. Verify
// that the listener and database instance are properly configured for
// direct handoff.  If problem persists, call Oracle Support.
// *Comment: The problem can be worked around by configuring dispatcher(s)
// to specifically handle the desired presentation(s), and connecting
// directly to the dispatcher, bypassing the listener.

ora11g[martdb_2]/ora11g/oracle/OracleHomes/db11g/network/admin> oerr TNS 12546
12546, 00000, "TNS:permission denied"
// *Cause: User has insufficient privileges to perform the requested operation.
// *Action: Acquire necessary privileges and try again.

ora11g[martdb_2]/ora11g/oracle/OracleHomes/db11g/network/admin> oerr TNS 00516
00516, 00000, "Permission denied"
// *Cause: User has insufficient privileges to perform the requested operation.
// *Action: Acquire necessary privileges and try again. 

经过诊断,原因有如下两点:

1、oracle用户的如下文件权限不对
# ls -l /ora11g/oracle/OracleHomes/db11g/bin/oracle
-rwxrwsr-x    1 ora11g   dba       309766004 Jan 08 17:53 /ora11g/oracle/OracleHomes/db11g/bin/oracle
--权限为2755,正确的应该为6751 


# chmod 6751 /ora11g/oracle/OracleHomes/db11g/bin/oracle
# ls -l /ora11g/oracle/OracleHomes/db11g/bin/oracle
-rwsr-s--x    1 ora11g   dba       309766004 Jan 08 17:53 /ora11g/oracle/OracleHomes/db11g/bin/oracle


2、以grid用户,查询数据库的$ORACLE_HOME目录
ls -l /ora11g/oracle/OracleHomes/db11g/bin/oracle

发现,oracle用户下的OracleHomes目录权限不对
之前为700,正确的应该为755

cd /ora11g/oracle
chmod 755 OracleHomes


修改后,通过tns远程正常连接。





来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24626891/viewspace-2121155/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-01-21

  • 博文量
    28
  • 访问量
    75494