1

我的问题是成功启动 Oracle Listener 后,它会在几秒钟后自动停止。

cache1-> lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-MAY-2013 16:35:36

Copyright (c) 1991, 2009, 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.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Log messages written to /u02/ora/diagnostic_dest/diag/tnslsnr/cache1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                20-MAY-2013 16:35:36
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         /u02/ora/diagnostic_dest/diag/tnslsnr/cache1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "ora" has 1 instance(s).
  Instance "ora", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

同时,来自其他服务器的 tnsping 工作。

cache2-> tnsping cache1

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 20-MAY-2013 16:35:38

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:

Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
OK (0 msec)

几秒钟后,我再次检查它,它自动停止:

cache1-> lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-MAY-2013 16:36:36

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused

并且 tnsping 不起作用。

cache2-> tnsping cache1

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 20-MAY-2013 16:36:37

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:

Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.200.2)(PORT=1521)))
TNS-12541: TNS:no listener

listener.ora:

/u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = ora)
      (GLOBAL_DBNAME = ora)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
    )
  )

LISTENER =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )

ADR_BASE_LISTENER = /u02/ora/diagnostic_dest

谢谢

4

1 回答 1

0

在 rhel 6.x 中遇到与 oracle11gr2 类似的问题...

不确定是否同样的问题...在我的情况下检查 log.xml 文件以获取 trc 日志位置:

/u01/app/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml

从上面的文件中,我们得到了以下日志文​​件的链接:

/u01/app/oracle/diag/tnslsnr/dbserver/listener/trace/listener.log

上面的文件,我们检查了,我们不断得到以下信息:

警告:节点关闭事件的订阅仍在等待 2017 年 2 月 13 日 17:28:42 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=dbserver)(USER=oracle))(COMMAND=status)(ARGUMENTS=64 )(SERVICE=LISTENER)(VERSION=186647040)) * status * 0 WARNING: Subscription for node down event still pending


谷歌搜索了一下后,我们在“ https://docs.oracle.com/cd/E11882_01/network.112/e10835/listener.htm#NETRF312 ”中找到了一些信息,我们需要在 listener.ora 的末尾添加以下内容

/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER = off
于 2017-02-13T13:29:12.330 回答