ITPub博客

首页 > 数据库 > Oracle > 监听报错处理小记

监听报错处理小记

原创 Oracle 作者:tiny_cion 时间:2020-11-19 10:54:55 0 删除 编辑

[oracle@dan trace]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 12-NOV-2020 10:51:12

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

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

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/dan/listener/alert/log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dan)(PORT=1521)))

TNS-12542: TNS:address already in use
 TNS-12560: TNS:protocol adapter error
  TNS-00512: Address already in use
   Linux Error: 98: Address already in use

然后告警日志报错如下:

12-NOV-2020 10:31:48 * 12546
TNS-12546: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00516: Permission denied
   Linux Error: 2: No such file or directory
Thu Nov 12 10:32:51 2020
Incoming connection from 192.168.5.60 rejected
12-NOV-2020 10:32:51 * 12546
TNS-12546: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00516: Permission denied
   Linux Error: 2: No such file or directory

其实有经验的话,在启动报错就可以看出可能是端口占用,mos上也直接说考虑端口问题


Listener Failed To Start :  TNS-12542 Address Already in Use (Doc ID 2591361.1)

Netstat reveals that there are established connections on the port used by the listener:

[TEST]oracle@/oracle/product/database/network/admin>netstat -an|grep 1559
tcp        0      0 10.3.xxx.yyy:1559                 ESTABLISHED


Solution

There was an issue with the port used  by the listener even though there was no LISTEN process on that port.
The listener was started successfully on a different port so no indication of an issue with the TNS Listener itself.
Needed to kill the established session on the port/restart of the server is required.
After restarting the server issue got resolved.


然后查找端口是否被占用

[root@dan tmp]# netstat -anp |grep 1521
tcp        0      0 :::1521                     :::*                        LISTEN      3155/tnslsnr        
[root@dan tmp]# lsof -i:1521
COMMAND  PID   USER   FD   TYPE DEVICE SIZE NODE NAME
tnslsnr 3155 oracle    8u  IPv6  13302       TCP *:ncube-lm (LISTEN)
[root@dan tmp]# kill -9 3155
[root@dan tmp]# lsof -i:1521

$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 12-NOV-2020 11:15:15

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

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

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/dan/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.5.60)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.5.60)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                12-NOV-2020 11:15:15
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/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/dan/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.5.60)(PORT=1521)))
Services Summary...
Service "xdb" has 1 instance(s).
  Instance "xdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


至此,问题解决,之前以为是文件不存在,权限不对等等,走了弯路,在此小记一下。

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

下一篇: LogMiner日志挖掘
请登录后发表评论 登录
全部评论

注册时间:2015-12-23

  • 博文量
    18
  • 访问量
    7819