CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...,有需要的朋友可以参下。 今天将服务器的监听程序重启了一下,重启后成功,但是数据库死活注册不上去,导致客户端没法连接到数据库: <span style="font-family: Arial, Helvetica, sans-serif;">-- 启动监听 [

Instance "orcl",status UNKNowN,has 1 handler(s) for this service...,有需要的朋友可以参下。

@H_674_16@

今天将服务器的监听程序重启了一下,重启后成功,但是数据库死活注册不上去,导致客户端没法连接到数据库

@H_674_16@

@H_674_16@

<span style="font-family: Arial,Helvetica,sans-serif;">-- 启动监听
[Oracle@localhost dbs]$ lsnrctl start</span>
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-FEB-2015 13:43:40

Copyright (C) 1991,2011,Oracle.  All rights reserved.

TNS-01106: Listener using listener name LISTENER has already been started
[Oracle@localhost dbs]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-FEB-2015 13:43:45

Copyright (C) 1991,Oracle.  All rights reserved.

ConnecTing to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                04-FEB-2015 13:43:21
Uptime                    0 days 0 hr. 0 min. 23 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/Oracle/network/admin/listener.ora
Listener Log File         /u01/app/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints SumMary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipC)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.100)(PORT=1521)))
services SumMary...
service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc",has 1 handler(s) for this service...
service "orcl" has 1 instance(s).
  Instance "orcl",has 1 handler(s) for this service...
The command completed successfully
启动后,提示 Instance "orcl",has 1 handler(s) for this service... 这个提示一般认为很正常,是由于实例没有注册到监听服务中去,于是注册实例
sql> alter system register; System altered. @H_674_16@ 实例已经注册,再来看看监听状态:
[Oracle@localhost dbs]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-FEB-2015 13:43:40 Copyright (C) 1991,has 1 handler(s) for this service... The command completed successfully @H_674_16@发现orcl 还是未知状态( ),查看监听配置是否有问题
--监听文件内容 [Oracle@localhost admin]$ pwd /u01/app/Oracle/network/admin [Oracle@localhost admin]$ more listener.ora # listener.ora Network Configuration File: /u01/app/Oracle/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProC) (OracLE_HOME = /u01/app/OraclE) (PROGRAM = extproC) ) (SID_DESC = (GLOBAL_dbname = orcl) (OracLE_HOME = /u01/app/OraclE) (SID_NAME = orcl) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCp)(HOST =192.168.3.100)(PORT = 1521)) ) ) ADR_BASE_LISTENER = /u01/app @H_674_16@监听文件貌似没有问题,因为我之前是没有问题,看看前面监听的日志:
[Oracle@localhost admin]$ tail -30 /u01/app/diag/tnslsnr/localhost/listener/alert/log.xml <msg time='2015-02-04T13:43:21.139+08:00' ORG_ID='Oracle' comp_id='tnslsnr' type='UNKNowN' level='16' host_id='localhost.localdomain' host_addr='::1'> <txt>WARNING: Subscription for node down event still pending </txt> </msg> <msg time='2015-02-04T13:43:21.140+08:00' ORG_ID='Oracle' comp_id='tnslsnr' type='UNKNowN' level='16' host_id='localhost.localdomain' host_addr='::1'> <txt>04-FEB-2015 13:43:21 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=localhost.localdomain)(USER=OraclE))(COMMAND=status)(ARGUMENTS=64)(serviCE=LISTENER)(VERSION=186647296)) * status * 0 </txt> </msg> <msg time='2015-02-04T13:43:40.091+08:00' ORG_ID='Oracle' comp_id='tnslsnr' type='UNKNowN' level='16' host_id='localhost.localdomain' host_addr='::1'> <txt>04-FEB-2015 13:43:40 * ping * 0 </txt> </msg> <msg time='2015-02-04T13:43:45.083+08:00' ORG_ID='Oracle' comp_id='tnslsnr' type='UNKNowN' level='16' host_id='localhost.localdomain' host_addr='::1'> <txt>WARNING: Subscription for node down event still pending </txt> </msg> <msg time='2015-02-04T13:43:45.084+08:00' ORG_ID='Oracle' comp_id='tnslsnr' type='UNKNowN' level='16' host_id='localhost.localdomain' host_addr='::1'> <txt>04-FEB-2015 13:43:45 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=localhost.localdomain)(USER=OraclE))(COMMAND=status)(ARGUMENTS=64)(serviCE=LISTENER)(VERSION=186647296)) * status * 0 </txt> 发现监听在启动时,读取了主机名: localhost.localdomain ,个人感觉应该是主机名解析有问题,于是看看hosts文件
[root@localhost Oracle]# hostname localhost.localdomain [root@localhost Oracle]# more /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.3.100 localhost.localdomain 发现三个IP都对应了机器名localhost.localdomain ,可能这种情况导致监听无法解析导致数据库不能注册到监听程序中
[root@localhost Oracle]# more /etc/hosts #127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 172.0.0.1 localhost 192.168.3.100 localhost.localdomain #::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 @H_674_16@然后再重启监听程序
[Oracle@localhost dbs]$ lsnrctl LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-FEB-2015 15:10:10 Copyright (C) 1991,Oracle. All rights reserved. Welcome to LSNRCTL,type "Help" for information. LSNRCTL> stop ConnecTing to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) The command completed successfully LSNRCTL> start StarTing /u01/app/Oracle/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.3.0 - Production System parameter file is /u01/app/Oracle/network/admin/listener.ora Log messages written to /u01/app/diag/tnslsnr/localhost/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipC)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.100)(PORT=1521))) ConnecTing to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production Start Date 04-FEB-2015 15:10:29 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/network/admin/listener.ora Listener Log File /u01/app/diag/tnslsnr/localhost/listener/alert/log.xml Listening Endpoints SumMary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipC)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.100)(PORT=1521))) services SumMary... service "CLRExtProc" has 1 instance(s). Instance "CLRExtProc",has 1 handler(s) for this service... The command completed successfully LSNRCTL> @H_674_16@ 实例注册后,再看看监听状态


LSNRCTL> status ConnecTing to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production Start Date 04-FEB-2015 15:10:29 Uptime 0 days 0 hr. 1 min. 29 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/Oracle/network/admin/listener.ora Listener Log File /u01/app/diag/tnslsnr/localhost/listener/alert/log.xml Listening Endpoints SumMary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipC)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.100)(PORT=1521))) services SumMary... service "CLRExtProc" has 1 instance(s). Instance "CLRExtProc",has 1 handler(s) for this service... service "orcl.localdomain" has 1 instance(s). Instance "orcl",status READY,has 1 handler(s) for this service... service "orcl11gXDB.localdomain" has 1 instance(s). Instance "orcl",sans-serif; font-size:14px"> 发现实例已经处于ready状态了。

@H_674_16@ OK,到此,客户端已经可以连接到数据库

大佬总结

以上是大佬教程为你收集整理的Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...全部内容,希望文章能够帮你解决Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。