Categories: Oracle

【Oracle】Oracle Enterprise Linux 6.2にGridを入れた時にこけたときの解決策

Oracle Enterprise Linux 6.2にGridをいれようとしてrunInstallerを走らせた後に、root.shをはしらせたら以下のメッセージでこけた

/opt/oracle/app/product/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory
Failed to create keys in the OLR, rc = 32512, 32512
OLR configuration failed

Oracleが出してるなら一発でいれられるようにしろよヽ(`Д´)ノ
と、思いつつ調べ調べなんとか入ったのでその時のメモ。
解決策は↓へ


Oracle Linux 6.1 And libcap.so.1: cannot open shared object
ここを参考に以下をやってみる。

# cd /lib64
# ls -ltr libcap*
-rwxr-xr-x. 1 root root 21160 Jan 28 2011 libcap-ng.so.0.0.0
-rwxr-xr-x. 1 root root 19016 Oct 13 01:30 libcap.so.2.16
lrwxrwxrwx. 1 root root 14 Feb 21 09:50 libcap.so.2 -> libcap.so.2.16
lrwxrwxrwx. 1 root root 18 Feb 21 09:51 libcap-ng.so.0 -> libcap-ng.so.0.0.0

ここにlibcap.so.1を追加する

# ln -s libcap.so.2.16 libcap.so.1
# ls -ltr libcap*
-rwxr-xr-x. 1 root root 21160 Jan 28 2011 libcap-ng.so.0.0.0
-rwxr-xr-x. 1 root root 19016 Oct 13 01:30 libcap.so.2.16
lrwxrwxrwx. 1 root root 14 Feb 21 09:50 libcap.so.2 -> libcap.so.2.16
lrwxrwxrwx. 1 root root 18 Feb 21 09:51 libcap-ng.so.0 -> libcap-ng.so.0.0.0
lrwxrwxrwx. 1 root root 14 Mar 1 01:35 libcap.so.1 -> libcap.so.2.16

そしてroot.shスクリプトを動かす

# /opt/oracle/app/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script…
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/oracle/app/product/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file “dbhome” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin …
The file “oraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin …
The file “coraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
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.
2012-03-01 01:36:56: Checking for super user privileges
2012-03-01 01:36:56: User has super user privileges
2012-03-01 01:36:56: Parsing the host name
Using configuration parameter file: /opt/oracle/app/product/11.2.0/grid/crs/install/crsconfig_params
Improper Oracle Clusterware configuration found on this host
Deconfigure the existing cluster configuration before starting
to configure a new Clusterware
run ‘/opt/oracle/app/product/11.2.0/grid/crs/install/rootcrs.pl -deconfig’
to configure existing failed configuration and then rerun root.sh

なんやら deconfigしろといわれたので先ほどの参考サイトもやってたforceオプション付きでやってみる

# /opt/oracle/app/product/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force
2012-03-01 01:38:06: Parsing the host name
2012-03-01 01:38:06: Checking for super user privileges
2012-03-01 01:38:06: User has super user privileges
Using configuration parameter file: /opt/oracle/app/product/11.2.0/grid/crs/install/crsconfig_params
Usage: srvctl <command> <object> [<options>]
commands: enable|disable|start|stop|status|add|remove|modify|getenv|setenv|unsetenv|config
objects: database|service|asm|diskgroup|listener|home|ons|eons
For detailed help on each command and object and its options use:
srvctl <command> -h or
srvctl <command> <object> -h
PRKO-2012 : nodeapps object is not supported in Oracle Restart
ADVM/ACFS is not supported on oraclelinux-release-6Server-2.0.2.x86_64
ACFS-9201: Not Supported
CRS-4013: This command is not supported in a single-node configuration.
CRS-4000: Command Stop failed, or completed with errors.
You must kill crs processes or reboot the system to properly
cleanup the processes started by Oracle clusterware
error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node

改めてroot.shを実行する

# /opt/oracle/app/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script…
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/oracle/app/product/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file “dbhome” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “oraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “coraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
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.
2012-03-01 01:46:21: Checking for super user privileges
2012-03-01 01:46:21: User has super user privileges
2012-03-01 01:46:21: Parsing the host name
Using configuration parameter file: /opt/oracle/app/product/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user ‘grid’, privgrp ‘oinstall’..
Operation successful.
CRS-4664: Node mogora successfully pinned.
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: Inappropriate ioctl for device at /opt/oracle/app/product/11.2.0/grid/crs/install/roothas.pl line 296.

ぬーーんおこられた。
参考サイトになぞってddをやってみる

/bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1

しかしこれがなかなかコマンドかえってこない。


- forums.oracle.com

dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1
を実行するとちっともプロンプトが返ってきませんが、それでも実行しっ放しの状態で、実行しておけば
root.shはエラーにならず正常終了することがわかりました。

どうやらこのまま放置してroot.shを実行するらしい。
再度チャレンジ。

# /opt/oracle/app/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script…
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/oracle/app/product/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file “dbhome” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “oraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “coraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
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.
2012-03-01 01:52:39: Checking for super user privileges
2012-03-01 01:52:39: User has super user privileges
2012-03-01 01:52:39: Parsing the host name
Using configuration parameter file: /opt/oracle/app/product/11.2.0/grid/crs/install/crsconfig_params
CRS is already configured on this node for crshome=1
Cannot configure two CRS instances on the same cluster.
Please deconfigure before proceeding with the configuration of new home.

再設定しろやといわれてるきがするのでdeconfigしてみる

# /opt/oracle/app/product/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force
2012-03-01 01:54:05: Parsing the host name
2012-03-01 01:54:05: Checking for super user privileges
2012-03-01 01:54:05: User has super user privileges
Using configuration parameter file: /opt/oracle/app/product/11.2.0/grid/crs/install/crsconfig_params
Usage: srvctl <command> <object> [<options>]
commands: enable|disable|start|stop|status|add|remove|modify|getenv|setenv|unsetenv|config
objects: database|service|asm|diskgroup|listener|home|ons|eons
For detailed help on each command and object and its options use:
srvctl <command> -h or
srvctl <command> <object> -h
PRKO-2012 : nodeapps object is not supported in Oracle Restart
ADVM/ACFS is not supported on oraclelinux-release-6Server-2.0.2.x86_64
ACFS-9201: Not Supported
CRS-4013: This command is not supported in a single-node configuration.
CRS-4000: Command Stop failed, or completed with errors.
You must kill crs processes or reboot the system to properly
cleanup the processes started by Oracle clusterware
error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node

なんかエラー出てるような気もしなくもないが、とりあえずなんかSuccessfullyとかいわれてるからいっか。
今度こそこりずにroot.shを実行する

# /opt/oracle/app/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script…
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/oracle/app/product/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file “dbhome” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “oraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “coraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
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.
2012-03-01 01:56:02: Checking for super user privileges
2012-03-01 01:56:02: User has super user privileges
2012-03-01 01:56:02: Parsing the host name
Using configuration parameter file: /opt/oracle/app/product/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user ‘grid’, privgrp ‘oinstall’..
Operation successful.
CRS-4664: Node mogora 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-2.0.2.x86_64
mogora 2012/03/01 01:58:09 /opt/oracle/app/product/11.2.0/grid/cdata/mogora/backup_20120301_015809.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 2015 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /opt/oracle/oraInventory
‘UpdateNodeList’ was successful.

成功したような気がする。
たぶん。
また、OS再起動するたびにddコマンドを実行しないといけないらしいので、
/etc/init.d/ohasdの80行目当たりをちょっといじります。

     75   if [ -r $AUTOSTARTFILE ]
76   then
77     case `$CAT $AUTOSTARTFILE` in
78       enable*)
79         $LOGERR "Oracle HA daemon is enabled for autostart."
dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1 &  

こんなのでいいのかOracle linux 6.2よ・・・
まぁとりあえずこれで任務完了フラグではある。

mogmet

View Comments

Share
Published by
mogmet