weiranth 发表于 2014-3-26 12:02:39

Oralce 11g rac listener的问题...


现在有一套oracle 11g R2 RAC 环境..

在Node 1上
>  lsnrctl status listener   

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 26-MAR-2014 11:50:09

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                26-MAR-2014 10:32:16
Uptime                    0 days 1 hr. 17 min. 52 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/11.2.0.3/grid/network/admin/listener.ora
Listener Log File         /opt/grid/diag/tnslsnr/mydb1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.19.21)(PORT=1521)))    ---- 这个是vip
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "mydb" has 1 instance(s).
  Instance "mydb1", status READY, has 1 handler(s) for this service...
The command completed successfully

#cat /etc/hosts
127.0.0.1               mydb1 localhost.localdomain localhost
#::1            localhost6.localdomain6 localhost6
# mydb1
192.168.19.11   mydb1
192.168.19.21   mydb1-vip
1.1.1.1             mydb1-priv

# mydb2
192.168.19.12   mydb2
192.168.19.22   mydb2-vip
1.1.1.2             mydb2-priv

# scan-ip
192.168.19.15   mydb-cluster    mydb-cluster-scan

现在困惑的就是:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))  为什么不是本地的public ip(192.168.19.11) 而是127.0.0.1

还有grid用户$ORACLE_HOEM/network/admin/endpoints_listener.ora 中也记录的127.0.0.1.

手动修改也不生效..


另外Node2 上显示是正常的...

whutabs 发表于 2014-3-27 09:50:31

个人感觉,hosts文件有问题吧,把第一行127的mydb1删除

应该这样

127.0.0.1          localhost.localdomain     localhost
192.168.19.11   mydb1.domain             mydb1
192.168.19.21   mydb1-vip.domain       mydb1-vip
1.1.1.1             mydb1-priv.domain      mydb1-priv

Liu Maclean(刘相兵 发表于 2014-3-27 11:41:43

whutabs 发表于 2014-3-27 09:50 static/image/common/back.gif
个人感觉,hosts文件有问题吧,把第一行127的mydb1删除

应该这样


表示赞同, lz的网络配置 hosts 有问题

mql535 发表于 2014-3-27 12:31:40

whutabs 发表于 2014-3-27 09:50 static/image/common/back.gif
个人感觉,hosts文件有问题吧,把第一行127的mydb1删除

应该这样


改成这个样子也会有问题吧,找的是hosts文件中的localhost,在hosts文件中定义,192.168.19.11 localhost应该就可以了。listener.ora中配置的HOST应该是LOCALHOST

mql535 发表于 2014-3-27 12:37:19

mql535 发表于 2014-3-27 12:31 static/image/common/back.gif
改成这个样子也会有问题吧,找的是hosts文件中的localhost,在hosts文件中定义,192.168.19.11 localhost应 ...

刚才测试发一下:hosts改成这样# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost
::1             localhost6.localdomain6 localhost6
#192.168.9.7    localhost
192.168.9.7     ora10g启动listener后Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))后来又改回去了# Do not remove the following line, or various programs
# that require network functionality will fail.
::1             localhost6.localdomain6 localhost6
192.168.9.7     localhost
192.168.9.7     ora10g重启listenerListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora10g)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Liu Maclean(刘相兵 发表于 2014-3-27 13:39:58

$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

192.168.1.200  vrh-cluster vrh-cluster-scan


192.168.1.161  vrh1 vrh1.oracle.com
192.168.1.162  vrh1-vip
172.168.1.18   vrh1-priv


192.168.1.163  vrh2 vrh2.oracle.com
192.168.1.164  vrh2-vip
172.168.1.19   vrh2-priv

192.168.1.191  vrh8 vrh8.oracle.com
172.168.1.68   vrh8-priv


192.168.1.178 mlab2
$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 27-MAR-2014 13:39:50

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date                03-MAR-2014 20:03:39
Uptime                    23 days 17 hr. 36 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /s01/oracle/product/10.2.0.5/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vrh8)(PORT=1521)))
Services Summary...
Service "G10R25" has 1 instance(s).
  Instance "G10R25", status READY, has 1 handler(s) for this service...
Service "G10R25XDB" has 1 instance(s).
  Instance "G10R25", status READY, has 1 handler(s) for this service...
Service "G10R25_XPT" has 1 instance(s).
  Instance "G10R25", status READY, has 1 handler(s) for this service...
The command completed successfully

weiranth 发表于 2014-3-27 14:28:16

感谢!~的确是把mydb1 删除就可以了!~
但是节点2上的hosts文件和节点1是一样的!~节点2就是正常的,有点奇怪!~
页: [1]
查看完整版本: Oralce 11g rac listener的问题...