/etc/hosts 文件引起的监听无法发动的处理进程51CTO博客 - 亚美娱乐

/etc/hosts 文件引起的监听无法发动的处理进程51CTO博客

2019年03月10日13时58分29秒 | 作者: 迎梅 | 标签: 监听,发动,文件 | 浏览: 1989

 
      新装了1个11.2的oracle数据库,装备监听时总是无法发动,最终发现竟然是hosts文件的原因,下面详细信息。 1.发动监听:
[oracle@chenbo ~]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-JAN-2011 15:12:46 Copyright (c) 1991, 2009, Oracle.  All rights reserved. Starting /u01/app/oracle/ora11gR2/product/11.2.0/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/ora11gR2/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/ora11gR2/diag/tnslsnr/chenbo/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.150.1)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.150.1)(PORT=1521)))
STATUS of the LISTENER

Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                12-JAN-2011 15:12:46
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/ora11gR2/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/ora11gR2/diag/tnslsnr/chenbo/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.150.1)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully   2.检查监听状况,却提示没有监听效劳发动。
[oracle@chenbo dbs]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-JAN-2011 15:30:16 Copyright (c) 1991, 2009, Oracle.  All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.150.1)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused   
3.检查监听日志:
  
[oracle@chenbo ~]$ tail -f /u01/app/oracle/ora11gR2/diag/tnslsnr/chenbo/listener/trace/listener.log
Trace information written to /u01/app/oracle/ora11gR2/diag/tnslsnr/chenbo/listener/trace/ora_20443_47949057950496.trc
Trace level is currently 0 Started with pid=20443
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.150.1)(PORT=1521)))
Listener completed notification to CRS on start TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
WARNING: Subscription for node down event still pending
12-JAN-2011 14:25:47 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=chenbo)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186646784)) * status * 0
Wed Jan 12 14:29:26 2011
System parameter file is /u01/app/oracle/ora11gR2/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/ora11gR2/diag/tnslsnr/chenbo/listener/alert/log.xml
Trace information written to /u01/app/oracle/ora11gR2/diag/tnslsnr/chenbo/listener/trace/ora_20479_47689240552224.trc
Trace level is currently 0
能够看到监听在发动的时分去读取了体系的主机名chenbo和登陆的用户oracle,因而这个主机名gaojf应该在/etc/hosts中仅有存在的,而且对oracle用户是能够运用的,
   4.检查hosts文件,
[oracle@chenbo ~]$ cat /etc/hosts
# Do not remove the following line, or various programs # that require network functionality will fail.
127.0.0.1               chenbo
192.168.150.1           chenbo
#::1            localhost6.localdomain6 localhost6   5.刚开始测验屏蔽 127.0.0.1行,重新发动效劳器后,发动监听,仍是过错。 后来修正127.0.0.1的机器名为localhost,如下: [oracle@chenbo dbs]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost
192.168.150.1           chenbo
# ::1           localhost6.localdomain6 localhost6
6.再次发动监听,能够看到现已成功发动了。
[oracle@chenbo dbs]$ lsnrctl start [oracle@chenbo dbs]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-JAN-2011 16:03:34 Copyright (c) 1991, 2009, Oracle.  All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.150.1)(PORT=1521)))
STATUS of the LISTENER

Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                12-JAN-2011 15:43:47
Uptime                    0 days 0 hr. 19 min. 47 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/ora11gR2/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/ora11gR2/diag/tnslsnr/chenbo/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.150.1)(PORT=1521)))
Services Summary...
Service "orcl" has 2 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully  
 
版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表亚美娱乐立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章