ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 建立11G DATA GUARD环境后Listener无法启动

建立11G DATA GUARD环境后Listener无法启动

原创 Linux操作系统 作者:yangtingkun 时间:2007-09-21 00:00:00 0 删除 编辑

前几天通过VMWare建立了11g的DATA GUARD环境,这两天由于调整了VMWare的网络设置,发现standby数据库的LISTENER无法启动。

利用VMWare建立11R1的物理DATA GUARDhttp://yangtingkun.itpub.net/post/468/388465


错误信息为:

$ lsnrctl start

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 19-SEP-2007 20:36:51

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

Starting /data/oracle/product/11.1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /data/oracle/product/11.1/network/admin/listener.ora
Log messages written to /data/oracle/diag/tnslsnr/yangtk/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=yangtk.ytk-thinkpad)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 104: Connection reset by peer
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=yangtk.ytk-thinkpad)(PORT=1521)))
TNS-12532: TNS:invalid argument
TNS-12560: TNS:protocol adapter error
TNS-00502: Invalid argument
Linux Error: 113: No route to host

$ORACLE_HOME/network/admin/listener.ora中配置的主机名称改为ip地址后,错误依旧。

查询了一下Oraclemetalink,找到了错误原因:Incorrect IP Address specified for host in the /etc/hosts file.

这个虚机是利用另一个虚机备份建立的,因此在建立后没有修改hosts文件,导致Oraclelistener.ora无法正常启动。

$ su -
Password:
# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
172.25.4.127 yangtk.ytk-thinkpad
# vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
172.25.4.70 yangtk.ytk-thinkpad
~
~
~
~
"/etc/hosts" 3L, 137C written
[root@yangtk ~]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
172.25.4.70 yangtk.ytk-thinkpad

下面重启listener,错误信息变为:

$ lsnrctl start

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 19-SEP-2007 21:02:30

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

Starting /data/oracle/product/11.1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /data/oracle/product/11.1/network/admin/listener.ora
Log messages written to /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.25.4.70)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.25.4.70)(PORT=1521)))
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 104: Connection reset by peer

看来光修改IP还不能解决问题。于是修改了/etc/sysconfig/network文件和/etc/hosts中的主机名,并将系统重新启动,listener终于启动:

$ lsnrctl start

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 19-SEP-2007 22:56:53

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

Starting /data/oracle/product/11.1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /data/oracle/product/11.1/network/admin/listener.ora
Log messages written to /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.25.4.70)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.25.4.70)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date 19-SEP-2007 22:56:53
Uptime 0 days 0 hr. 0 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /data/oracle/product/11.1/network/admin/listener.ora
Listener Log File /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.25.4.70)(PORT=1521)))
The listener supports no services
The command completed successfully
$ hostname
yangtk2.ytk-thinkpad

不过没过多长时间,就发现listenerdown了,只好再次寻找问题:

$ tnslsnr
Unable to resolve address for localhost:6150
ONS runtime exiting

执行tnslsnr命令发现Oracle找不到localhost,在/etc/hosts中添加localhost信息:

$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
172.25.4.70 yangtk2.ytk-thinkpad
127.0.0.1 localhost.localdomain localhost

再次启动listener,问题解决:

$ lsnrctl start

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 19-SEP-2007 23:23:01

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

Starting /data/oracle/product/11.1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /data/oracle/product/11.1/network/admin/listener.ora
Log messages written to /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.25.4.70)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.25.4.70)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date 19-SEP-2007 23:23:01
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /data/oracle/product/11.1/network/admin/listener.ora
Listener Log File /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.25.4.70)(PORT=1521)))
The listener supports no services
The command completed successfully

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

请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2007-12-29

  • 博文量
    1955
  • 访问量
    10354570