`
itspace
  • 浏览: 958133 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Oracle监听启动故障诊断

阅读更多
凌晨2:02分,还在电信机房奋斗。闲来无事,再写一篇文章。
在linux 32位环境下,启动监听出现如下故障
引用
[oracle@hzmc admin]$ lsnrctl start

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 02-MAR-2011 23:37:53

Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.

Starting /oracle/app/oracle/product/9.2.0/bin/tnslsnr: please wait...

TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
  TNS-00517: Lost contact
   Linux Error: 32: Broken pipe

其中监听配置如下,并没有问题
引用
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = hzmc)(PORT = 1521))
      )

)
)
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = ora9i)
      (ORACLE_HOME = /oracle/app/oracle/product/9.2.0)
      (SID_NAME = ora9i)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = active)
      (ORACLE_HOME = /oracle/app/oracle/product/9.2.0)
      (SID_NAME = active)
    )
       (SID_DESC =
      (GLOBAL_DBNAME = king)
      (ORACLE_HOME = /oracle/app/oracle/product/9.2.0)
      (SID_NAME = king)
    )
  )

根据提示:
引用
Linux Error: 32: Broken pipe
管道发生错误,猜测应该是Oracle写监听日志时出现故障,查看监听日志发现已经达到2G,将其清空,监听启动正常。
引用
-rwxrwxr-x 1 oracle oinstall 2147483647 Dec 22 10:48 listener.log
[oracle@hzmc log]$ >listener.log
[oracle@hzmc network]$ lsnrctl start

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 02-MAR-2011 23:39:14

Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.

Starting /oracle/app/oracle/product/9.2.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 9.2.0.4.0 - Production
System parameter file is /oracle/app/oracle/product/9.2.0/network/admin/listener.ora
Log messages written to /oracle/app/oracle/product/9.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hzmc)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hzmc)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date                02-MAR-2011 23:39:14
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Parameter File   /oracle/app/oracle/product/9.2.0/network/admin/listener.ora
Listener Log File         /oracle/app/oracle/product/9.2.0/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hzmc)(PORT=1521)))
Services Summary...
Service "active" has 1 instance(s).
  Instance "active", status UNKNOWN, has 1 handler(s) for this service...
Service "king" has 1 instance(s).
  Instance "king", status UNKNOWN, has 1 handler(s) for this service...
Service "ora9i" has 1 instance(s).
  Instance "ora9i", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

至此我们不仅要问,当listener.log无权限访问时,会出现什么错误呢?
引用
[root@hzmc log]# chown root:root listener.log
[root@hzmc log]# su - oracle
[oracle@hzmc ~]$ lsnrctl stop

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 03-MAR-2011 01:12:19

Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.122.1)(PORT=1585)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
[oracle@hzmc ~]$ ps -ef|grep tns
ora10g   27661     1  0 Mar02 ?        00:00:00 /ora10g/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit
oracle   28779 28587  0 01:12 pts/1    00:00:00 grep tns
[oracle@hzmc ~]$ lsnrctl start

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 03-MAR-2011 01:12:28

Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.

Starting /oracle/app/oracle/product/9.2.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 9.2.0.4.0 - Production
NL-00280: error creating log stream /oracle/app/oracle/product/9.2.0/network/log/listener.log
NL-00278: cannot open log file
  SNL-00016: snlfohd: error opening file
   Linux Error: 13: Permission denied

Listener failed to start. See the error message(s) above..
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics