rac安裝過程中 error while loading shared libraries libpthread.so.0 問題的解決

cnhtm發表於2009-12-03

在CentOS 5上安裝Oracle 10.2.0.1 RAC的cluster software的時候,在最後一步,第二個節點,執行root.sh的時候,報告error while loading shared libraries: libpthread.so.0的錯誤,詳細錯誤資訊如下:

[root@rac2 crs]# /u01/crs/oracle/product/10.2.0/crs/root.sh
WARNING: directory '/u01/crs/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/crs/oracle/product' is not owned by root
WARNING: directory '/u01/crs/oracle' is not owned by root
WARNING: directory '/u01/crs' is not owned by root
WARNING: directory '/u01' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/u01/crs/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/crs/oracle/product' is not owned by root
WARNING: directory '/u01/crs/oracle' is not owned by root
WARNING: directory '/u01/crs' is not owned by root
WARNING: directory '/u01' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
assigning default hostname rac1 for node 1.
assigning default hostname rac2 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
rac1
rac2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
/u01/crs/oracle/product/10.2.0/crs/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory





解決這個問題,需要三個步驟來完成:

[@more@]

1、在每個節點上,修改$CRS_HOME/bin目錄下的srvctl和vipca檔案,在vipca檔案ARGUMENTS=""行之前和srvctl檔案的export LD_ASSUME_KERNEL行之後增加 unset LD_ASSUME_KERNEL 語句
2、使用$CRS_HOME/bin目錄下的oifcfg工具配置pub ip和pri ip
3、在任意一個節點上,用root使用者,手動執行vipca,配置完正確的prvip和vip 資訊之後,crs就可以安裝完成,操作過程如下:






1.1、修改vipca檔案,增加標記為紅色的那一行:

[root@rac2 crs]# pwd
/u01/crs/oracle/product/10.2.0/crs
[root@rac2 crs]# cd bin/
[root@rac2 bin]# cp vipca vipca.bak
[root@rac2 bin]# vi vipca

#!/bin/sh
#
# $Header: vipca.sbs 10-dec-2004.15:30:55 khsingh Exp $
#
# vipca
#
# Copyright (c) 2001, 2004, Oracle. All rights reserved.
#
# NAME
# vipca - Node Apps and VIPs Configuration Assistant
#
# DESCRIPTION
# Oracle Cluster Node Applications Configuration Assistant is
# used to configure the Node Applications and the virtual IPs.
#
# MODIFIED (MM/DD/YY)
# khsingh 12/10/04 - fix LINUX workaround for bug 4054430
# khsingh 11/22/04 - remove obsolete files
# rxkumar 11/29/04 - fix bug4024708
# khsingh 10/07/04 - add workaround for bug (3937317)
# khsingh 09/27/04 - changes for PLE (3914991)
# khsingh 09/13/04 - add orahome arg back
# khsingh 08/16/04 - remove orahome arg
# khsingh 12/07/03 - change oembase to oemlt
# khsingh 10/31/03 - fix ice browser
# khsingh 10/29/03 - add jewt var
# khsingh 08/08/03 - fix ==
# jtellez 06/10/03 - change to srvm_trace
# rdasari 06/02/03 - set LD_LIBRARY_PATH appropriately for 32 and 64 bit solaris platforms
# jtellez 11/15/02 - change SRVM_DEFS to SRVM_PROPERTY_DEFS
# jtellez 11/04/02 - Add srvm_defs
# jtellez 10/10/02 - fix srvmhas
# jtellez 10/04/02 - srvmhas to jlib
# jtellez 09/24/02 - add tracing
# jtellez 09/09/02 - add versions to jars
# rdasari 08/07/02 - use java instead of jre
# jtellez 08/08/02 - enhance comment
# jtellez 08/06/02 - add GUI jars
# rdasari 08/01/02 - use jdk131
# jtellez 07/26/02 - add srvmhas.jar to classpath
# jtellez 07/29/02 - add gui jars
# jtellez 07/24/02 - jtellez_vipca
# jtellez 7/24/02 - creation
#
#!/bin/sh

# Properties to pass directly to java
if [ "X$SRVM_PROPERTY_DEFS" = "X" ]
then
SRVM_PROPERTY_DEFS=""
fi

# Check for tracing
if [ "X$SRVM_TRACE" != "X" ]
then
SRVM_PROPERTY_DEFS="$SRVM_PROPERTY_DEFS -DTRACING.ENABLED=true -DTRACING.LEVEL=2"
fi

# External Directory Variables set by the Installer
JREDIR=/u01/crs/oracle/product/10.2.0/crs/jdk/jre/
ORACLE_HOME=/u01/crs/oracle/product/10.2.0/crs
export ORACLE_HOME;
/export
EMBASE_FILE=oemlt-10_1_0.jar

# GUI jars
EWTJAR=$JLIBDIR/$EWT_FILE
JEWTJAR=$JLIBDIR/$JEWT_FILE
ICEJAR=$JLIBDIR/$ICE_BROWSER5_FILE
EMBASEJAR=$JLIBDIR/$EMBASE_FILE
SHAREJAR=$JLIBDIR/$SHARE_FILE
HELPJAR=$JLIBDIR/$HELP_FILE
GUIJARS=$EWTJAR:$JEWTJAR:$SHAREJAR:$EMBASEJAR:$HELPJAR:$ICEJAR

# Set Classpath for Net Configuration Assistant
CLASSPATH=$JREJAR:$JRECLASSES:$OPSMJAR:$SRVMHASJAR:$VIPCAJAR:$GUIJARS

#Used for specifying any platforms specific Java options
JRE_OPTIONS=""

# Set the shared library path for JNI shared libraries
# A few platforms use an environment variable other than LD_LIBRARY_PATH
PLATFORM=`uname`
case $PLATFORM in
HP-UX) SHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/srvm/lib32:$SHLIB_PATH
export SHLIB_PATH
;;
AIX) LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/srvm/lib32:$LIBPATH
export LIBPATH
;;
Linux) LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/srvm/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

#Remove this workaround when the bug 3937317 is fixed
arch=`uname -m`
if [ "$arch" = "i686" -o "$arch" = "ia64" ]
121 LD_ASSUME_KERNEL=2.4.19
122 export LD_ASSUME_KERNEL
123 fi
124 #End workaround
125 ;;
126 SunOS) MACH_HARDWARE=`/bin/uname -i`
127 case $MACH_HARDWARE in
128 i86pc)
129 LD_LIBRARY_PATH=$ORACLE_HOME/lib:ORACLE_HOME/srvm/lib:$LD_LIBRARY_PATH
130 export LD_LIBRARY_PATH
131 ;;
132 *)
133 LD_LIBRARY_PATH_64=$ORACLE_HOME/lib:$ORACLE_HOME/srvm/lib:$LD_LIBRARY_PATH_64
134 export LD_LIBRARY_PATH_64
135 JRE_OPTIONS="-d64"
136 ;;
137 esac
138 ;;
139 OSF1) LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/srvm/lib:$LD_LIBRARY_PATH
140 export LD_LIBRARY_PATH
141 ;;
142
143 Darwin) DYLD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/srvm/lib:$DYLD_LIBRARY_PATH
144 export DYLD_LIBRARY_PATH
145 ;;
146 *) if [ -d $ORACLE_HOME/lib32 ];
147 then
148 LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/srvm/lib32:$LD_LIBRARY_PATH
149 else
150 LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/srvm/lib:$LD_LIBRARY_PATH
151 fi
152 export LD_LIBRARY_PATH
153 ;;
154 esac
155
156 unset LD_ASSUME_KERNEL
157
158 ARGUMENTS=""
159 NUMBER_OF_ARGUMENTS=$#
160 if [ $NUMBER_OF_ARGUMENTS -gt 0 ]; then
161 ARGUMENTS=$*
162 fi
163
164 # Run Vipca
165 exec $JRE $JRE_OPTIONS $SRVM_PROPERTY_DEFS -classpath $CLASSPATH oracle.ops.vipca.VipCA -orahome $ORACLE_HOME $ARGUME NTS
"vipca" 167L, 5034C written





1.2、修改srvctl檔案,增加標記為紅色的那一行:

[root@rac2 bin]# ls -l srvctl*
-rwxr-xr-x 1 oracle oinstall 5554 Dec 2 17:17 srvctl
[root@rac2 bin]# cp srvctl srvctl.bak
[root@rac2 bin]# vi srvctl

#!/bin/sh
#
# $Header: srvctl.sbs 29-nov-2004.11:56:24 rxkumar Exp $
#
# srvctl
#
# Copyright (c) 2000, 2004, Oracle. All rights reserved.
#
# NAME
# srvctl - Oracle Server Control Utility
#
# DESCRIPTION
# Oracle Server Control Utility can be used to administer a RAC database,
# i.e., to modify the configuration information of a RAC
# database server as well as to do start/stop/status operations on the
# instances of the server.
#
# MODIFIED (MM/DD/YY)
# rxkumar 11/29/04 - fix bug4024708
# dliu 11/18/04 - replace OH
# khsingh 10/07/04 - add workaround for bug (3937317)
# khsingh 09/27/04 - update case statement (3914991)
# gdyoung 09/17/04 - ;;
# gdyoung 08/20/04 - ple/st script merging
# dliu 08/04/04 - get them work on linux
# dliu 11/20/03 - support for trace
# dliu 11/12/03 - unset ORA_CRSDEBUG
# bhamadan 09/18/03 - replacing s_jre131Location with s_jreLocation
# khsingh 06/25/03 - remove policy file
# rxkumar 06/03/03 - add srvmasm.jar
# rdasari 06/02/03 - set LD_LIBRARY_PATH appropriately for 32 and 64 bit solaris platforms
# dliu 02/21/03 - add i18n.jar
# dliu 11/13/02 - use ORA_CRS_UI_FMT to turn on output capture
# dliu 10/17/02 - turn on output capture
# jtellez 10/04/02 - make policy ==
# surchatt 09/06/02 - puttint policy file location
# rdasari 08/07/02 - use java instead of jre
# rdasari 08/01/02 - use jdk131
# jtellez 07/26/02 - add srvmhas.jar to classpath
# rdasari 05/09/01 - changing the header information
# rdasari 03/22/01 - changing to ops to srv.
# dliu 03/02/01 - use "$@" for argument list. this iscritical for correct interpretation of arguments with spaces in them..
# dliu 02/26/01 - fix bug #1656127: SHLIB_PATH change.
# dliu 02/23/01 - replace $ORACLE_HOME in classpath with an install variable..
# jcreight 11/08/00 - define OPSMJAR, not OPSJAR
"srvctl" 171L, 5554C
126 JRE_OPTIONS="-d64"
127 ;;
128 esac
129 ;;
130 OSF1) LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/srvm/lib:$LD_LIBRARY_PATH
131 export LD_LIBRARY_PATH
132 ;;
133 Darwin)
134 DYLD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/srvm/lib:$DYLD_LIBRARY_PATH
135 export DYLD_LIBRARY_PATH
136 ;;
137 *) if [ -d $ORACLE_HOME/lib32 ];
138 then
139 LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/srvm/lib32:$LD_LIBRARY_PATH
140 else
141 LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/srvm/lib:$LD_LIBRARY_PATH
142 fi
143 export LD_LIBRARY_PATH
144 ;;
145 esac
146
147
148 # turn off crs debug flag that would otherwise interfere with crs profile
149 # modification
150 ORA_CRSDEBUG=0
151 export ORA_CRSDEBUG
152
153 # environment variable to turn on trace: set SRVM_TRACE to turn it on.
154 if [ "X$SRVM_TRACE" != "X" ]
155 then
156 TRACE="-DTRACING.ENABLED=true -DTRACING.LEVEL=2"
157 else
158 TRACE=
159 fi
160
161 if [ "X$SRVM_TRACE" != "X" ]
162 then
163 echo $JRE $JRE_OPTIONS -classpath $CLASSPATH $TRACE oracle.ops.opsctl.OPSCTLDriver "$@"
164 fi
165
166 #Remove this workaround when the bug 3937317 is fixed
167 LD_ASSUME_KERNEL=2.4.19
168 export LD_ASSUME_KERNEL
169 unset LD_ASSUME_KERNEL
170
171 # Run ops control utility
"srvctl" 173L, 5578C written




2、在任意一個節點上使用oifcfg配置public和vip網路


[root@rac1 bin]# ./oifcfg setif -global eth0/192.168.2.0:public
[root@rac1 bin]# ./oifcfg setif -global eth1/192.168.0.0:cluster_interconnect
[root@rac1 bin]# ./oifcfg getif
eth0 192.168.2.0 global public
eth1 192.168.0.0 global cluster_interconnect

./oifcfg iflist




3、用root使用者身份手動執行$CRS_HOME/bin/vipca工具,配置IP資訊。


[root@rac1 bin]# export DISPLAY=192.168.0.1:0.0
[root@rac1 bin]# xclock
Warning: Missing charsets in String to FontSet conversion
[root@rac1 bin]# ./vipca



vipca工具配置成功後,檢查crs狀態,兩個節點的crs都已正常執行

[root@rac1 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22049049/viewspace-1029304/,如需轉載,請註明出處,否則將追究法律責任。

相關文章