问题: 监听日志中出现错误TNS-12502: TNS:listener received no CONNECT_DATA from client (注:客户端的机器没有发现问题)
错误现象:
1、每隔几分钟出现一次上面的错误,即使在没有人使用Oracle的情况下也会出现。
2、直到现在也没有发现客户端机器不能正常连接数据库的情况。
错误分析:
Oracle关于TNS-12502错误的解释:
Error: ORA-12502 / TNS-12502
Text: TNS:listener received no CONNECT_DATA from client
Cause: No CONNECT_DATA was passed to the listener.
Action: Check that the service name resolved from TNSNAMES.ORA has the
CONNECT_DATA component of the connect descriptor.
根据上面的说法分析,只有在TNSNAMES.ORA文件中不包含CONNECT_DATA时会出现此问题。
在我们通过一些网络工具或HA工具等检测监听器端口的时候,日志中就可能会记录上面的错误。以下是一个模拟的示例,在客户端通过telnet数据库服务器的1521端口测试连通性:
C:>telnet 172.16.30.11 1521
此时在日志中就会记录如下信息:
TNS-12502:
TNS:listener received no CONNECT_DATA from client
09-AUG-2006 16:21:03 * 12502
TNS-12502: TNS:listener received no CONNECT_DATA from client
09-AUG-2006 16:21:13 * 12502
TNS-12502: TNS:listener received no CONNECT_DATA from client
09-AUG-2006 16:21:22 * 12502
TNS-12502: TNS:listener received no CONNECT_DATA from client