ITPUX技术网

交流 . 资讯 . 分享
Make progress together!
Linux操作系统下Oracle11g R2 RAC 安装配置教程
Oracle数据库培训-备份恢复-性能优化-集群容灾
Oracle数据库DBA高级工程师培训视频

在aix6.1上安装oracle 11g r2 grid单机执行root.sh报错Failed to start the Cluste..

内容发布:风哥| 发布时间:2014-5-16 10:10:37
aix6.1(6106)上安装oracle 11g r2 grid单机执行root.sh报错Failed to start the Clusterware的处理方法

报错日志如下:

#/oracle/app/11.2.0/grid/root.sh
Running Oracle 11g root script...
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /oracle/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'system'..
Operation successful.
CRS-4664: Node p550b successfully pinned.
Adding daemon to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow:
2014-05-15 01:59:46.561
[client(7995444)]CRS-2101:The OLR was formatted using version 3.
2014-05-15 01:59:50.126
[client(7995452)]CRS-1001:The OCR was formatted using version 3.
ohasd failed to start at /oracle/app/11.2.0/grid/crs/install/roothas.pl line 330.
/oracle/app/11.2.0/grid/perl/bin/perl -I/oracle/app/11.2.0/grid/perl/lib -I/oracle/app/11.2.0/grid/crs/install /oracle/app/11.2.0/grid/crs/install/roothas.pl execution failed

同时检查并无相关可参考的日志,在网上和官方查询,基本可以定为是oracle bug,最终解决方法为:
游客,如果您要查看本帖隐藏内容请回复




上一篇:Oracle的概述(体系结构,物理结构,逻辑结构)
下一篇:oracle服务端存在字符问题,修改字符
专业提供Oracle数据库服务、主机、存储、备份、中间件等相关技术支持服务,QQ号:176140749
关注ITPUX技术网微信公众号itpux_com  ,了解本站最新技术资料的分享.

欢迎加QQ群,提供超多高质量Oracle/Unix/Linux技术文档与视频教程的下载。

Oracle/Linux/Unix群1-4:199479729   158277749   336282998   189070296   
Oracle/Linux/Unix群5-8:150201289   244609803   522261684   522651731
备注:请勿重复加群,另请注明 from itpux

加群分享视频教程部分如下:

1、公开课视频:Oracle云数据库工程师职业发展前景讲解(免费)
http://edu.51cto.com/course/course_id-8614.html

2、51CTO学院Oracle DBA数据库高级工程师培训(高薪就业.课程介绍)
http://edu.51cto.com/px/train/131?xiaotu

3、Oracle DBA数据库高级工程师培训视频课程1.1(系列78套+七大阶段+上千案例)
套餐视频地址: http://edu.51cto.com/course/10159.html
回复

使用道具 举报

内容发布:风哥| 发布时间:2014-5-16 10:13:15
可以参考:
执行root.sh时ohasd启动失败解决办法http://www.vydbs.com/failed-executing-root-sh-ohasd-start-the-solution/

在Red Hat 6.2上安装Oracle grid 11.2.0.1,执行root.sh脚本的时候出现一些问题,无法启动ohasd。
由于Redhat Enterprise Linux 6开始的启动初始化已由init改用upstart的方式,inittab只保留和支持运行级别的配置,其它配置放到了别的地方,oracle 11.2.0.1的grid在安装时执行root.sh脚本还是使用的init方式,会写启动配置到inittab,而11.2.0.1还是按照5的init模式配置。
实际上造成11.2.0.1在Red Hat6上安装错误是因为upstart/init不一致性,从RHEL6开始,/etc/inittab文件内容变了,只有默认的启动等级。而Oracle 11.2.0.1仍是按照以前的习惯把启动命令写在/etc/inittab文件中。
以下实验只适合用于测试与实验环境,生产环境强烈推荐使用Oracle操作系统认证的环境,比如Red Hat6上使用11.2.0.3版本。
执行root.sh脚本报错

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2013-04-03 14:53:56: Checking for super user privileges
2013-04-03 14:53:56: User has super user privileges
2013-04-03 14:53:56: Parsing the host name
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
/etc/profile: line 6: ulimit: max user processes: cannot modify limit: Operation not permitted
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node oracle11gr2 successfully pinned.
Adding daemon to inittab
Failed to start oracle-ohasd, error:
ohasd failed to start: Inappropriate ioctl for device at /u01/app/11.2.0/grid/crs/install/roothas.pl line 296.




或者可能如下错误:


1
2
3
4
5
6
7
8
9
10

Adding daemon to inittab
CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
ohasd failed to start: Inappropriate ioctl for device
ohasd failed to start at/u01/app/11.2.0/grid/crs/install/rootcrs.pl line 443.

CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
ohasd failed to start: Inappropriate ioctl for device
ohasd failed to start: Inappropriate ioctl for device at /u01/app/11.2.0/grid/crs/install/roothas.pl line 296.



回退root.sh脚本操作
回退root.sh脚本操作

1
2
3
4
5
6
7
8
9
10
11
12
13
14

# /u01/app/11.2.0/grid/crs/install/roothas.pl -deconfig -force -verbose
2013-04-03 14:44:34: Checking for super user privileges
2013-04-03 14:44:34: User has super user privileges
2013-04-03 14:44:34: Parsing the host name
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Delete failed, or completed with errors.
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
/u01/app/11.2.0/grid/bin/acfsdriverstate: line 51: /lib/acfstoolsdriver.sh: No such file or directory
/u01/app/11.2.0/grid/bin/acfsdriverstate: line 51: exec: /lib/acfstoolsdriver.sh: cannot execute: No such file or directory
Successfully deconfigured Oracle Restart stack


步骤一:
方法1: 编辑$GRID_HOME/crs/install/s_crsconfig_lib.pm,查找if ($srv eq “ohasd”) { # Start OHASD)
# Start OHASD后方插入下列代码:
插入的代码

1
2
3
4
5
6
7
8

my $UPSTART_OHASD_SERVICE = "oracle-ohasd";
my $INITCTL = "/sbin/initctl";
($status, @output) = system_cmd_capture ("$INITCTL start $UPSTART_OHASD_SERVICE");
if (0 != $status)
{
error ("Failed to start $UPSTART_OHASD_SERVICE, error: $!");
return $FAILED;
}


最后应该如下所示一样:
修改s_crsconfig_lib.pm

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

# Check to see if the service is OHASD
    if ($srv eq "ohasd") {

        # Create the autorun file
        my $AUTORUNFILE = catfile ($SCRBASE, $HOST, $HAS_USER, "ohasdrun");
        open (AUTORUN, ">$AUTORUNFILE")
            or die "Can't open $AUTORUNFILE for write: $!";
        print AUTORUN "stopn";
        close (AUTORUN);
        s_set_ownergroup ($HAS_USER, $HAS_GROUP, $AUTORUNFILE)
            or die "Can't change ownership of $AUTORUNFILE: $!";
        s_set_perms ("0644", $AUTORUNFILE)
            or die "Can't change permissions of $AUTORUNFILE: $!";

        # Add OHASD to inittab

        print "Adding daemon to inittabn";
        s_remove_itab ("cssd|evmd|crsd|ohasd") or return $FAILED;
        system ("$INIT q");
        sleep (5);
        s_add_itab () or return $FAILED;
        system ("$INIT q");

        # Start OHASD
####################插在此处地方############################
my $UPSTART_OHASD_SERVICE = "oracle-ohasd";
my $INITCTL = "/sbin/initctl";

($status, @output)=system_cmd_capture ("$INITCTL start $UPSTART_OHASD_SERVICE");
if (0 != $status)
{
error ("Failed to start $UPSTART_OHASD_SERVICE, error: $!");
return $FAILED;
}
#####################################################################
        $status = system ("$CRSCTL start has");
      } elsif ($srv eq "crsexcl") {
        trace ("Starting Oracle clusterware exclusive");
        # Create the autorun file


方法2:在执行root.sh脚本时出现Adding daemon to inittab的时候,使用root立即执行命令:  
/bin/dd if=/var/tmp/.oracle/npohasd of=/dev/nullbs=1024 count=1

步骤二:
vi /etc/init/oracle-ohasd.conf

1
2
3
4
5
6

# Oracle OHASD startup

start on runlevel [35]
stop on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null


如果使用方法1,必须在执行root.sh脚本之前按照上述方法创建conf,否则执行root.sh也会无法通过。
如果使用方法2:则在执行完毕root.sh脚本后也必须创建,否则重启系统后无法自动启动HAS
验证:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2013-04-03 14:45:16: Checking for super user privileges
2013-04-03 14:45:16: User has super user privileges
2013-04-03 14:45:16: Parsing the host name
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
/etc/profile: line 6: ulimit: max user processes: cannot modify limit: Operation not permitted
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node oracle11gr2 successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
ADVM/ACFS is not supported on oraclelinux-release-6Server-3.0.2.x86_64

oracle11gr2     2013/04/03 14:45:50     /u01/app/11.2.0/grid/cdata/oracle11gr2/backup_20130403_144550.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 4020 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
[root@oracle11gR2 grid]#



root.sh脚本执行成功
按照方法一的实施方法,会net配置错误,在安装完成后还需要手动netca
所以比较推荐方法二
专业提供Oracle数据库服务、主机、存储、备份、中间件等相关技术支持服务,QQ号:176140749
关注ITPUX技术网微信公众号itpux_com  ,了解本站最新技术资料的分享.

欢迎加QQ群,提供超多高质量Oracle/Unix/Linux技术文档与视频教程的下载。

Oracle/Linux/Unix群1-4:199479729   158277749   336282998   189070296   
Oracle/Linux/Unix群5-8:150201289   244609803   522261684   522651731
备注:请勿重复加群,另请注明 from itpux

加群分享视频教程部分如下:

1、公开课视频:Oracle云数据库工程师职业发展前景讲解(免费)
http://edu.51cto.com/course/course_id-8614.html

2、51CTO学院Oracle DBA数据库高级工程师培训(高薪就业.课程介绍)
http://edu.51cto.com/px/train/131?xiaotu

3、Oracle DBA数据库高级工程师培训视频课程1.1(系列78套+七大阶段+上千案例)
套餐视频地址: http://edu.51cto.com/course/10159.html
回复 支持 反对

使用道具 举报

内容发布:风哥| 发布时间:2014-5-24 08:44:39
如果上面出现以下报错:

CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
ohasd failed to start: Inappropriate ioctl for device
ohasd failed to start at/u01/app/11.2.0/grid/crs/install/rootcrs.pl line 443.


则处理方法相同。
专业提供Oracle数据库服务、主机、存储、备份、中间件等相关技术支持服务,QQ号:176140749
关注ITPUX技术网微信公众号itpux_com  ,了解本站最新技术资料的分享.

欢迎加QQ群,提供超多高质量Oracle/Unix/Linux技术文档与视频教程的下载。

Oracle/Linux/Unix群1-4:199479729   158277749   336282998   189070296   
Oracle/Linux/Unix群5-8:150201289   244609803   522261684   522651731
备注:请勿重复加群,另请注明 from itpux

加群分享视频教程部分如下:

1、公开课视频:Oracle云数据库工程师职业发展前景讲解(免费)
http://edu.51cto.com/course/course_id-8614.html

2、51CTO学院Oracle DBA数据库高级工程师培训(高薪就业.课程介绍)
http://edu.51cto.com/px/train/131?xiaotu

3、Oracle DBA数据库高级工程师培训视频课程1.1(系列78套+七大阶段+上千案例)
套餐视频地址: http://edu.51cto.com/course/10159.html
回复 支持 反对

使用道具 举报

内容发布:风哥| 发布时间:2014-5-24 08:50:46
另外还有一种解决方法就是更改文件权限
chown root:oinstall /tmp/.oracle/npohasd

重新执行root.sh之前别忘了删除配置:/grid/app/11.2.0/grid/crs/install/roothas.pl -deconfig -force-verbose


专业提供Oracle数据库服务、主机、存储、备份、中间件等相关技术支持服务,QQ号:176140749
关注ITPUX技术网微信公众号itpux_com  ,了解本站最新技术资料的分享.

欢迎加QQ群,提供超多高质量Oracle/Unix/Linux技术文档与视频教程的下载。

Oracle/Linux/Unix群1-4:199479729   158277749   336282998   189070296   
Oracle/Linux/Unix群5-8:150201289   244609803   522261684   522651731
备注:请勿重复加群,另请注明 from itpux

加群分享视频教程部分如下:

1、公开课视频:Oracle云数据库工程师职业发展前景讲解(免费)
http://edu.51cto.com/course/course_id-8614.html

2、51CTO学院Oracle DBA数据库高级工程师培训(高薪就业.课程介绍)
http://edu.51cto.com/px/train/131?xiaotu

3、Oracle DBA数据库高级工程师培训视频课程1.1(系列78套+七大阶段+上千案例)
套餐视频地址: http://edu.51cto.com/course/10159.html
回复 支持 反对

使用道具 举报

内容发布:smk613| 发布时间:2016-3-14 22:44:24

问题相同,请高手求助
回复 支持 反对

使用道具 举报

内容发布:wymat1| 发布时间:2016-11-4 11:40:36
学习学习学习学习,zhijiaozhijiao
回复 支持 反对

使用道具 举报

内容发布:2849087| 发布时间:2016-11-12 20:17:56
不错啊  好东西  谢谢了
回复 支持 反对

使用道具 举报

内容发布:lanshuangxue| 发布时间:2017-3-7 16:53:40
遇到问题,正需要此文章!
回复 支持 反对

使用道具 举报

内容发布:yexiao1006| 发布时间:2017-3-24 00:08:19
谢谢整理与分享,很需要这样的资料。
回复 支持 反对

使用道具 举报

内容发布:renxucong| 发布时间:2017-5-9 13:42:35
求看,我也碰到了这错误啊
回复 支持 反对

使用道具 举报

1框架
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表