格式是: $ORA_CRS_HOME/log//racg/ora..ons.log

跟踪日志发现如下信息:

2012-06-12 17:21:05.030: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: GETHOSTBYNAME(rhel): 2

GETHOSTBYNAME(rhel): 2

Remote port for local node in local config does not match that from OCR.

Number of configuration nodes retrieved: 2

0: {node = rhel, port = 6251}

Adding remote host rhel:6251

1: {node = rhel2, port = 6251}

2012-06-12 17:21:05.032: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: GETHOSTBYNAME(rhel): 2

GETHOSTBYNAME(rhel): 2

Remote port for local node in local config does not match that from OCR.

GETHOSTBYNAME(rhel): 2

GETHOSTBYNAME(rhel): 2

Remote port for local node in local config does not match that from OCR.

2012-06-12 17:21:05.032: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: Number of configuration nodes retrieved: 2

0: {node = rhel, port = 6251}

Adding remote host rhel:6251

1: {node = rhel2, port = 6251}

onsctl: ons failed to start

2012-06-12 17:21:05.133: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: clsrcexecut: env ORACLE_CONFIG_HOME=/u01/app/oracle/crs

2012-06-12 17:21:05.133: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: clsrcexecut: cmd = /u01/app/oracle/crs/bin/racgeut -e _USR_ORA_DEBUG=0 540 /u01/app/oracle/crs/bin/onsctl start

2012-06-12 17:21:05.133: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: clsrcexecut: rc = 1, time = 1.650s

2012-06-12 17:21:05.448: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: GETHOSTBYNAME(rhel): 2

GETHOSTBYNAME(rhel): 2

Remote port for local node in local config does not match that from OCR.

Number of configuration nodes retrieved: 2

0: {node = rhel, port = 6251}

Adding remote host rhel:6251

1: {node = rhel2, port = 6251}

2012-06-12 17:21:05.448: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: ons is not running ...

2012-06-12 17:21:05.448: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: clsrcexecut: env ORACLE_CONFIG_HOME=/u01/app/oracle/crs

2012-06-12 17:21:05.448: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: clsrcexecut: cmd = /u01/app/oracle/crs/bin/racgeut -e _USR_ORA_DEBUG=0 540 /u01/app/oracle/crs/bin/onsctl ping

2012-06-12 17:21:05.448: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: clsrcexecut: rc = 1, time = 0.310s

2012-06-12 17:21:05.448: [    RACG][3999896128] [13230][3999896128][ora.rhel2.ons]: end for resource = ora.rhel2.ons, action = start, status = 1, time = 2.060s

2012-06-12 17:21:07.228: [    RACG][740729408] [13260][740729408][ora.rhel2.ons]: onsctl: shutting down ons daemon ...

GETHOSTBYNAME(rhel): 2

GETHOSTBYNAME(rhel): 2

Remote port for local node in local config does not match that from OCR.

Number of configuration nodes retrieved: 2

0: {node = rhel, port = 6251}

2012-06-12 17:21:07.228: [    RACG][740729408] [13260][740729408][ora.rhel2.ons]: Adding remote host rhel:6251

1: {node = rhel2, port = 6251}

onsctl: shutdown of ons failed!

2012-06-12 17:21:07.228: [    RACG][740729408] [13260][740729408][ora.rhel2.ons]: clsrcexecut: env ORACLE_CONFIG_HOME=/u01/app/oracle/crs

2012-06-12 17:21:07.228: [    RACG][740729408] [13260][740729408][ora.rhel2.ons]: clsrcexecut: cmd = /u01/app/oracle/crs/bin/racgeut -e _USR_ORA_DEBUG=0 540 /u01/app/oracle/crs/bin/onsctl stop

2012-06-12 17:21:07.228: [    RACG][740729408] [13260][740729408][ora.rhel2.ons]: clsrcexecut: rc = 3, time = 0.470s

从上面的日志可以看出应该是两个节点的端口不匹配导致的问题,手动创建ONS服务使用的是6251端口,使用vipca创建的可能不是6251端口,所以导致两边的端口不匹配。

一.onsctl工具

下面是onsctl工具的帮助信息:

[root@rhel1 bin]#./onsctl

usage: ./onsctl start|stop|ping|reconfig|debug

start                            - Start opmn only.

stop                             - Stop ons daemon

ping                             - Test to see if ons daemon is running

debug                            - Display debug information for the ons daemon

reconfig                         - Reload the ons configuration

help                             - Print a short syntax description (this).

detailed                         - Print a verbose syntax description.

[root@rhel1 bin]#./onsctl detailed

usage: ./onsctl start|stop|ping|reconfig|debug

start

Start ons daemon

stop

Shutdown ons daemon

reconfig

Trigger ons to re-read it's configuration files.

ping

Test to see if ons daemon is alive

debug

Display debug information about the ons daemon

help

Print a short syntax description.

detailed

Print a verbose syntax description (this message).

在第一个节点执行onsctl ping命令:

[root@rhel1 bin]#./onsctl ping

Number of configuration nodes retrieved: 2

0: {node = rhel, port = 6251}

GETHOSTBYNAME(rhel): 2

Adding remote host rhel:6251

GETHOSTBYNAME(rhel): 2

1: {node = rhel2, port = 6251}

Adding remote host rhel2:6251

ons is running ...

ons在第一个节点已经处于运行状态。

在第二个节点执行onsctl ping命令:

[root@rhel2 bin]#./onsctl ping

Number of configuration nodes retrieved: 2

0: {node = rhel, port = 6251}

GETHOSTBYNAME(rhel): 2

Adding remote host rhel:6251

GETHOSTBYNAME(rhel): 2

1: {node = rhel2, port = 6251}

Remote port for local node in local config does not match that from OCR.

ons is not running ...

发现第二个节点ons因为端口与第一个节点不匹配的原因而没有启动。

二.查看节点进程:

查看第一个节点的ons进程:

[root@rhel1 bin]#ps -ef | grep ons

root      2412     1  0 16:47 ?        00:00:00 sendmail: accepting connections

oracle   13513     1  0 17:17 ?        00:00:00 /u01/app/oracle/crs/opmn/bin/ons -d

oracle   13515 13513  0 17:17 ?        00:00:00 /u01/app/oracle/crs/opmn/bin/ons -d

root     15646  3340  0 17:22 pts/0    00:00:00 grep ons

查看第二个节点的osn进程:

[root@rhel2 bin]#ps -ef | grep ons

root      2400     1  0 16:45 ?        00:00:00 sendmail: accepting connections

root     13847  3546  0 17:22 pts/0    00:00:00 grep ons

三.ONS配置文件

执行find命令找到了ons的配置文件,如下:

./opmn/conf/ons.config.tmp

./opmn/conf/ons.config

./opmn/conf/ons.config.backup.10205

[root@rhel1 crs]#cat ./opmn/conf/ons.config

localport=6113

remoteport=6200

loglevel=3

useocr=on

显然配置文件中的端口与执行racgons配置的6251不匹配。

四.RACGONS工具

RACGONS的帮助信息如下:

[root@rhel1 bin]#./racgons

To add ONS daemons configuration:

./racgons.bin add_config hostname:port [hostname:port] ...

To remove ONS daemons configuration:

./racgons.bin remove_config hostname[:port] [hostname:port] ...

在OCR中可能配置有两条ONS的信息,执行以下的命令删除原有的6251端口配置:

[root@rhel1 bin]#./racgons remove_config rhel:6251 rhel2:6251

racgons: Existing key value on rhel = 6251.

racgons: rhel:6251 removed from OCR.

racgons: Existing key value on rhel2 = 6251.

racgons: rhel2:6251 removed from OCR.

重新启动nodeapps:

[root@rhel1 bin]# ./srvctl start nodeapps -n rhel2

[root@rhel1 bin]# ./srvctl start nodeapps -n rhel1

查看两个节点的状态:

[root@rhel1 bin]#./crs_stat -t

Name           Type           Target    State     Host

------------------------------------------------------------

ora.rhel1.gsd  application    ONLINE    ONLINE    rhel1

ora.rhel1.ons  application    ONLINE    ONLINE    rhel1

ora.rhel1.vip  application    ONLINE    ONLINE    rhel1

ora.rhel2.gsd  application    ONLINE    ONLINE    rhel2

ora.rhel2.ons  application    ONLINE    ONLINE    rhel2

ora.rhel2.vip  application    ONLINE    ONLINE    rhel2

恢复正常。

--end--

Oracle的ONS创建,Oracle 10gR2 RAC Clusterware ONS服务的管理相关推荐

  1. Oracle的ONS创建,Oracle中的ONS

    Oracle中的ONS ONS(Oracle notification service) ONS--A publish and subscribe service for communicating ...

  2. oracle手工快照,创建oracle快照的步骤

    创建oracle快照的步骤[@more@] 1. 创建快照之前需要在sys用户下运行catrep.sql(此操作需要一个大的回滚段), 并且给user授予CREATE ANY SNAPSHOT.ALT ...

  3. oracle中表空间创建,Oracle 如何创建表空间

    在Oracle中如何创建表空间呢?主要有两种方式:一种是用sql命令的方式,另外一种是通过Oracle客户端Enterprise Manager Console来创建.下面分别介绍一下: 1 通过sq ...

  4. oracle 11g job创建,Oracle 11g 手动创建库完整实施过程

    Oracle数据库除了使用DBCA创建数据库的方式外,还可以使用命令手动创建数据库.本文为Oracle 11g手动创建数据库的完整过程,供大家参考使用. 1.修改oracle用户环境变量 $ vim ...

  5. 新建oracle数据库定时任务,创建 Oracle 定时任务

    功能说明: 要求实现数据库中的表数据每天午夜时分定时自动执行数据迁移动作. 1. 创建历史数据存储表(USER_TAB_BAK), 要求与源表(USER_TAB)结构一致; for example: ...

  6. oracle logical standby,创建Oracle 11g logical standby

    其实过程很简单....做过10g创建logical standby的同志看都不用看了,除了新增加一个ALTER DATABASE RECOVER TO LOGICAL STANDBY KEEP IDE ...

  7. oracle 双结点监听文件,RAC监听服务两个节点 只能起一个

    我的问题是, RAC系统有两个节点, endpoints_listener和istener 配置如下: node1: LISTENER_DB1=(DESCRIPTION=(ADDRESS_LIST=( ...

  8. OMF(Oracle Managed Files,Oracle管理的文件)介绍

    Oracle Managed Files是一个文件命名策略,让你可以按照数据库对象而不是文件名来指定操作.Oracle 管理的文件简化了Oracle数据库的管理,减少错误和降低浪费的磁盘空间. 使用O ...

  9. 使用 VMware 在 Linux 5.4 上安装、升级及维护 Oracle 10gR2 RAC

    使用 VMware 在 Linux 5.4 上安装.升级及维护 Oracle 10gR2 RAC ---- 实验名称 使用 VMware Server 2.0 在 Linux Enterprise 5 ...

最新文章

  1. Python isinstance() 函数
  2. jquery_3month
  3. 华为TE30点对点呼叫TE40提示不允许使用ip地址呼叫如何解决?
  4. 编程之美-构造数独方法整理
  5. ISA Server 2007 beta TAP 开始招人
  6. php多主写数据,多数据库的配置(从主)
  7. java王大拿谢大脚_《乡村爱情1》:“王大拿”赵本山有3大亮点,追谢大脚根本不算啥...
  8. WCF中DBNull序列化的问题
  9. 最大连续子序列和的问题
  10. C语言中用二进制输出一个数字
  11. 动易html在线编辑器,动易系统解决IE8网站后台编辑器无效问题
  12. IT6561 IT6563 IT6562 IT6564系列 DP转HDMI
  13. js获取最大整数的方法
  14. texturepacker图片打包偶然出现的错误
  15. java面试看这一篇就够了
  16. 基于MATLAB燃料电池控制系统测试平台
  17. h5前端开发,css图片轮播图带小圆点
  18. Deblurring by Realistic Blurring 图像去模糊论文解读
  19. matlab中读文件的行数_【Matlab】 读取文件各种方法
  20. Notion-我的最后一款笔记应用

热门文章

  1. 浅析arm的异常、中断和arm工作模式的联系
  2. 一个页面多个swiper问题解决
  3. 解决页面使用overflow: scroll在iOS上滑动卡顿的问题
  4. iis 网页HTTP 错误 404.3 - Not Found解决方案
  5. 是否提交由npm 5创建的package-lock.json文件?
  6. 在objective-c / cocoa中抛出异常
  7. 如何使用JavaScript漂亮地打印JSON?
  8. Select和SelectMany之间的区别
  9. 如何正确克隆JavaScript对象?
  10. 如何替换所有出现的字符串?