1、[INS-40718] Single Client Access Name (SCAN):bydb-cluster-scan could not be resolved.
Cause - The name you provided as the SCAN could not be resolved using TCP/IP host name lookup.
Action - Provide name to use for the SCAN for which the domain can be resolved.
2、incorrect setting for minor number
在安装 oracle 11g rac的时候会报错如下:
Checking settings of device file "/dev/async"
Node Name Available Comment
------------ ------------------------ ------------------------
racdb2 yes failed (incorrect setting for minor number.)
racdb1 yes failed (incorrect setting for minor number.)
查了下support,得知:
Minor number Description
0x0 This is the HP-UX default value for /dev/async
0x4 Enable disc device timeouts to complete with an error code rather than retrying forever. This setting is necessary for application-level disc mirroring, so as to avoid the situation where the application waits forever for a failed disc device to be repaired. Oracle RDBMS users should enable this feature when Automatic Storage Management mirroring/replication (internal redundancy) is used. SGA will be locked in memory.
3、Check: User equivalence for user "grid"
Node Name Status
------------------------------------ ------------------------
bydb2 passed
bydb1 failed
Result: PRVF-4007 : User equivalence check failed for user "grid"
将/home/grid/.ssh/known_hosts 清空,解决
4、配置SSH发现不成功,经检查发现可能是文件权限问题。
修改/home/oracle的权限为0755。
然后修改~/.ssh/的权限为0700
修改其他文件的权限如下:
$ ls -l ~/.ssh
total 64
-rw-r--r-- 1 oracle oinstall 788 Jun 21 11:44 authorized_keys
-rw------- 1 oracle oinstall 1675 Jun 21 11:40 id_rsa
-rw-r--r-- 1 oracle oinstall 394 Jun 21 11:40 id_rsa.pub
-rw-r--r-- 1 oracle oinstall 1326 Jun 21 11:39 known_hosts
然后测试成功。
5、如何处理11gR2 RAC下oc4j和gsd服务为OFFLINE状态?
http://blog.163.com/xiaohan_008/blog/static/126347420129994358263/
$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.CRSDATA.dg ora....up.type ONLINE ONLINE bydb1
ora.DATA01.dg ora....up.type ONLINE ONLINE bydb1
ora....CKUP.dg ora....up.type ONLINE ONLINE bydb1
ora....ER.lsnr ora....er.type ONLINE ONLINE bydb1
ora....N1.lsnr ora....er.type ONLINE ONLINE bydb1
ora.asm ora.asm.type ONLINE ONLINE bydb1
ora.bydb.db ora....se.type OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE bydb1
ora....B1.lsnr application ONLINE ONLINE bydb1
ora.bydb1.gsd application OFFLINE OFFLINE
ora.bydb1.ons application ONLINE ONLINE bydb1
ora.bydb1.vip ora....t1.type ONLINE ONLINE bydb1
ora....SM2.asm application ONLINE ONLINE bydb2
ora....B2.lsnr application OFFLINE OFFLINE
ora.bydb2.gsd application OFFLINE OFFLINE
ora.bydb2.ons application ONLINE ONLINE bydb2
ora.bydb2.vip ora....t1.type ONLINE ONLINE bydb2
ora.cvu ora.cvu.type ONLINE ONLINE bydb1
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE bydb1
ora.oc4j ora.oc4j.type OFFLINE OFFLINE
ora.ons ora.ons.type ONLINE ONLINE bydb1
ora.scan1.vip ora....ip.type ONLINE ONLINE bydb1
$ lsnrctl start
那么,是我们的RAC配置有问题吗?这两类服务没有ONLINE会不会影响RAC数据库呢?我们又该如何启动这些服务呢?
其实,我们的RAC配置是没有问题的,也不会影响 数据库正常运行。在默认情况下,其中的ora.gsd服务状态是OFFLINE状态,我们可不予理会,除非需要在11g Cluster上配置Oracle 9iR2的RAC。但凡以grid用户执行crs_stat -t命令,看到Target和State这两列的状态均为OFFLINE,我们均可忽略。但是,我们该如何使之启动呢?
1、 启动ora.oc4j服务:
$ srvctl start oc4j
OC4J could not be started
PRCR-1079 : Failed to start resource ora.oc4j
CRS-2501: Resource 'ora.oc4j' is disabled
$ srvctl enable oc4j -h
Enable OC4J instance for Oracle Clusterware management.
Usage: srvctl enable oc4j [-n <node_name>] [-v]
-n <node_name> Node name
-v Verbose output
-h Print usage
$ srvctl enable oc4j
$ srvctl start oc4j -v
OC4J has been started
Cause - The name you provided as the SCAN could not be resolved using TCP/IP host name lookup.
Action - Provide name to use for the SCAN for which the domain can be resolved.
这是因为/etc/hosts配置的scan和界面中指定的scan name不一致引起
hosts文件配置:
192.168.201.16 rac-scan.localdomain rac-scan
所以界面中的SCAN Name要是rac-scan才不会报错。
hosts文件配置:
192.168.201.16 rac-scan.localdomain rac-scan
所以界面中的SCAN Name要是rac-scan才不会报错。
2、incorrect setting for minor number
在安装 oracle 11g rac的时候会报错如下:
Checking settings of device file "/dev/async"
Node Name Available Comment
------------ ------------------------ ------------------------
racdb2 yes failed (incorrect setting for minor number.)
racdb1 yes failed (incorrect setting for minor number.)
查了下support,得知:
Minor number Description
0x0 This is the HP-UX default value for /dev/async
0x4 Enable disc device timeouts to complete with an error code rather than retrying forever. This setting is necessary for application-level disc mirroring, so as to avoid the situation where the application waits forever for a failed disc device to be repaired. Oracle RDBMS users should enable this feature when Automatic Storage Management mirroring/replication (internal redundancy) is used. SGA will be locked in memory.
0x100 Enable on-demand locking of memory pages by async driver when asyncdsk_open(2) is called. A low-overhead routine is then used to lock a page into memory during I/O operations.
On-demand locking is critically important when using Oracle's Automatic Memory Management feature (the use of
MEMORY_TARGET
in the
init.ora
file to control memory usage). RDBMS deployments utilizing dynamic nPar or dynamic vPar features should also configure on-demand locking.
More traditional RDBMS deployments can consider on-demand locking in light of its more obvious effects. Generally speaking, RDBMS startup will be quicker because the complete SGA is not locked into memory immediately. However, some instances will experience a slight run-time performance penalty with on-demand locking as memory pages are dynamically locked/unlocked for each I/O request.
0x104 This is a combination of 0x100 and 0x4. Both the features are enabled
显然解决办法:
rm /dev/async
/sbin/mknod /dev/async c 101 0x104
chmod 666 /dev/async
On-demand locking is critically important when using Oracle's Automatic Memory Management feature (the use of
MEMORY_TARGET
in the
init.ora
file to control memory usage). RDBMS deployments utilizing dynamic nPar or dynamic vPar features should also configure on-demand locking.
More traditional RDBMS deployments can consider on-demand locking in light of its more obvious effects. Generally speaking, RDBMS startup will be quicker because the complete SGA is not locked into memory immediately. However, some instances will experience a slight run-time performance penalty with on-demand locking as memory pages are dynamically locked/unlocked for each I/O request.
0x104 This is a combination of 0x100 and 0x4. Both the features are enabled
显然解决办法:
rm /dev/async
/sbin/mknod /dev/async c 101 0x104
chmod 666 /dev/async
异步io (
http://blog.csdn.net/renfengjun/article/details/7972065) 其他人的解答
两个节点都需要设置,不然检查过不去。
XXJ-02#[/]ll /dev/async
crw-rw-rw- 1 bin bin 101 0x000000 Aug 28 10:42 /dev/async
需要设置
XXJ-02#[/]rm /dev/async
XXJ-02#[/] /sbin/mknod /dev/async c 101 0x4
XXJ-02#[/]chmod 666 /dev/async
XXJ-02#[/]ll /dev/async
crw-rw-rw- 1 root sys 101 0x000004 Aug 28 14:14 /dev/async
如果这里没有发现设备,可以直接使用mknod命令创建
两个节点都需要设置,不然检查过不去。
XXJ-02#[/]ll /dev/async
crw-rw-rw- 1 bin bin 101 0x000000 Aug 28 10:42 /dev/async
需要设置
XXJ-02#[/]rm /dev/async
XXJ-02#[/] /sbin/mknod /dev/async c 101 0x4
XXJ-02#[/]chmod 666 /dev/async
XXJ-02#[/]ll /dev/async
crw-rw-rw- 1 root sys 101 0x000004 Aug 28 14:14 /dev/async
如果这里没有发现设备,可以直接使用mknod命令创建
./runcluvfy.sh stage -pre crsinst -n racdb1,racdb2 -fixup -verbose
Checking settings of device file "/dev/async"
Node Name Available Comment
------------ ------------------------ ------------------------
racdb2 yes passed
racdb1 yes passed
Result: Check for settings of device file "/dev/async" passed.
Checking settings of device file "/dev/async"
Node Name Available Comment
------------ ------------------------ ------------------------
racdb2 yes passed
racdb1 yes passed
Result: Check for settings of device file "/dev/async" passed.
3、Check: User equivalence for user "grid"
Node Name Status
------------------------------------ ------------------------
bydb2 passed
bydb1 failed
Result: PRVF-4007 : User equivalence check failed for user "grid"
将/home/grid/.ssh/known_hosts 清空,解决
参考故障:
linux中ssh登录Permanently added (RSA) to the list of known&nb
[root@www]# ssh admin@xxx.xxx.xxx.xx
2 The authenticity of host 'xxx.xxx.xxx.xxx' can't be established.
3 RSA key fingerprint is f4:d0:1a:9c:09:65:78:71:25:33:79:c2:d5:aa:0b:c1.
4 Are you sure you want to continue connecting (yes/no)? yes
5 Warning: Permanently added 'xxx.xxx.xxx.xxx' (RSA) to the list of known hosts.
6 Permission denied (publickey,gssapi-with-mic,password).
1)、可以把~/.ssh/known_hosts清除
2)、如果还是不行
修 改/etc/ssh/sshd-config文件,将其中的PermitRootLogin no修改为yes,PubkeyAuthentication yes修改为no,AuthorizedKeysFile .ssh/authorized_keys前面加上#屏蔽掉,PasswordAuthentication no修改为yes就可以了。
同时设置 UseDNS no,最后保存修改,重启sshd服务再连接这个问题就可以解决了。等同于第四步注释掉DNS
3)、如果还是有问题,那可以用下面的方式解决:
用命令 ssh -l username hostname
1)、这个是ssh安全认证是的一个RSA认证。此处必须选择yes才能连接。第一次yes后,他会询问你是否永久把这个RSA认证加入本地,选择yes后,以后不会再出现提醒。每次登陆只需要输入密码即可。
2)、也可以不用输入1中的yes,但是需要修改本机配置。
4)有能配置了DNS,没有配的话,没有下面两个文件。
在这里两个文件里注释掉相关信息
linux
/etc/ nsswitch.conf
/etc/resolv.conf
HP-UX 配置DNS服务器参数文件:
/etc/ nsswitch.conf
/etc/resolv.conf
AIX配置DNS服务器参数文件
/etc/netsvc.conf
/etc/resolv.conf ##如没有可以手动创建
修改 server上/etc/nsswitch.conf中hosts为hosts: files
linux中ssh登录Permanently added (RSA) to the list of known&nb
[root@www]# ssh admin@xxx.xxx.xxx.xx
2 The authenticity of host 'xxx.xxx.xxx.xxx' can't be established.
3 RSA key fingerprint is f4:d0:1a:9c:09:65:78:71:25:33:79:c2:d5:aa:0b:c1.
4 Are you sure you want to continue connecting (yes/no)? yes
5 Warning: Permanently added 'xxx.xxx.xxx.xxx' (RSA) to the list of known hosts.
6 Permission denied (publickey,gssapi-with-mic,password).
1)、可以把~/.ssh/known_hosts清除
2)、如果还是不行
修 改/etc/ssh/sshd-config文件,将其中的PermitRootLogin no修改为yes,PubkeyAuthentication yes修改为no,AuthorizedKeysFile .ssh/authorized_keys前面加上#屏蔽掉,PasswordAuthentication no修改为yes就可以了。
同时设置 UseDNS no,最后保存修改,重启sshd服务再连接这个问题就可以解决了。等同于第四步注释掉DNS
3)、如果还是有问题,那可以用下面的方式解决:
用命令 ssh -l username hostname
1)、这个是ssh安全认证是的一个RSA认证。此处必须选择yes才能连接。第一次yes后,他会询问你是否永久把这个RSA认证加入本地,选择yes后,以后不会再出现提醒。每次登陆只需要输入密码即可。
2)、也可以不用输入1中的yes,但是需要修改本机配置。
4)有能配置了DNS,没有配的话,没有下面两个文件。
在这里两个文件里注释掉相关信息
linux
/etc/ nsswitch.conf
/etc/resolv.conf
HP-UX 配置DNS服务器参数文件:
/etc/ nsswitch.conf
/etc/resolv.conf
AIX配置DNS服务器参数文件
/etc/netsvc.conf
/etc/resolv.conf ##如没有可以手动创建
修改 server上/etc/nsswitch.conf中hosts为hosts: files
其他参考:
http://mohamedelazab.blogspot.in/2011/01/cluster-verify-utility-fails-with-user.html
http://csayantan.wordpress.com/11gr2-rac-installation/way-to-avoiding-prv-4007-in-runcluvfy-sh/
http://mohamedelazab.blogspot.in/2011/01/cluster-verify-utility-fails-with-user.html
http://csayantan.wordpress.com/11gr2-rac-installation/way-to-avoiding-prv-4007-in-runcluvfy-sh/
4、配置SSH发现不成功,经检查发现可能是文件权限问题。
修改/home/oracle的权限为0755。
然后修改~/.ssh/的权限为0700
修改其他文件的权限如下:
$ ls -l ~/.ssh
total 64
-rw-r--r-- 1 oracle oinstall 788 Jun 21 11:44 authorized_keys
-rw------- 1 oracle oinstall 1675 Jun 21 11:40 id_rsa
-rw-r--r-- 1 oracle oinstall 394 Jun 21 11:40 id_rsa.pub
-rw-r--r-- 1 oracle oinstall 1326 Jun 21 11:39 known_hosts
然后测试成功。
5、如何处理11gR2 RAC下oc4j和gsd服务为OFFLINE状态?
http://blog.163.com/xiaohan_008/blog/static/126347420129994358263/
$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.CRSDATA.dg ora....up.type ONLINE ONLINE bydb1
ora.DATA01.dg ora....up.type ONLINE ONLINE bydb1
ora....CKUP.dg ora....up.type ONLINE ONLINE bydb1
ora....ER.lsnr ora....er.type ONLINE ONLINE bydb1
ora....N1.lsnr ora....er.type ONLINE ONLINE bydb1
ora.asm ora.asm.type ONLINE ONLINE bydb1
ora.bydb.db ora....se.type OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE bydb1
ora....B1.lsnr application ONLINE ONLINE bydb1
ora.bydb1.gsd application OFFLINE OFFLINE
ora.bydb1.ons application ONLINE ONLINE bydb1
ora.bydb1.vip ora....t1.type ONLINE ONLINE bydb1
ora....SM2.asm application ONLINE ONLINE bydb2
ora....B2.lsnr application OFFLINE OFFLINE
ora.bydb2.gsd application OFFLINE OFFLINE
ora.bydb2.ons application ONLINE ONLINE bydb2
ora.bydb2.vip ora....t1.type ONLINE ONLINE bydb2
ora.cvu ora.cvu.type ONLINE ONLINE bydb1
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE bydb1
ora.oc4j ora.oc4j.type OFFLINE OFFLINE
ora.ons ora.ons.type ONLINE ONLINE bydb1
ora.scan1.vip ora....ip.type ONLINE ONLINE bydb1
$ lsnrctl start
那么,是我们的RAC配置有问题吗?这两类服务没有ONLINE会不会影响RAC数据库呢?我们又该如何启动这些服务呢?
其实,我们的RAC配置是没有问题的,也不会影响 数据库正常运行。在默认情况下,其中的ora.gsd服务状态是OFFLINE状态,我们可不予理会,除非需要在11g Cluster上配置Oracle 9iR2的RAC。但凡以grid用户执行crs_stat -t命令,看到Target和State这两列的状态均为OFFLINE,我们均可忽略。但是,我们该如何使之启动呢?
1、 启动ora.oc4j服务:
$ srvctl start oc4j
OC4J could not be started
PRCR-1079 : Failed to start resource ora.oc4j
CRS-2501: Resource 'ora.oc4j' is disabled
$ srvctl enable oc4j -h
Enable OC4J instance for Oracle Clusterware management.
Usage: srvctl enable oc4j [-n <node_name>] [-v]
-n <node_name> Node name
-v Verbose output
-h Print usage
$ srvctl enable oc4j
$ srvctl start oc4j -v
OC4J has been started
2、 启动ora.gsd服务:
$ srvctl status nodeapps
VIP bydb1_vip is enabled
VIP bydb1_vip is running on node: bydb1
VIP bydb2_vip is enabled
VIP bydb2_vip is running on node: bydb2
Network is enabled
Network is running on node: bydb1
Network is running on node: bydb2
GSD is disabled
GSD is not running on node: bydb1
GSD is not running on node: bydb2
ONS is enabled
ONS daemon is running on node: bydb1
ONS daemon is running on node: bydb2
$ srvctl enable nodeapps -g
$ srvctl status nodeapps
VIP bydb1_vip is enabled
VIP bydb1_vip is running on node: bydb1
VIP bydb2_vip is enabled
VIP bydb2_vip is running on node: bydb2
Network is enabled
Network is running on node: bydb1
Network is running on node: bydb2
GSD is enabled
GSD is not running on node: bydb1
GSD is not running on node: bydb2
ONS is enabled
ONS daemon is running on node: bydb1
ONS daemon is running on node: bydb2
$ srvctl status nodeapps
VIP bydb1_vip is enabled
VIP bydb1_vip is running on node: bydb1
VIP bydb2_vip is enabled
VIP bydb2_vip is running on node: bydb2
Network is enabled
Network is running on node: bydb1
Network is running on node: bydb2
GSD is disabled
GSD is not running on node: bydb1
GSD is not running on node: bydb2
ONS is enabled
ONS daemon is running on node: bydb1
ONS daemon is running on node: bydb2
$ srvctl enable nodeapps -g
$ srvctl status nodeapps
VIP bydb1_vip is enabled
VIP bydb1_vip is running on node: bydb1
VIP bydb2_vip is enabled
VIP bydb2_vip is running on node: bydb2
Network is enabled
Network is running on node: bydb1
Network is running on node: bydb2
GSD is enabled
GSD is not running on node: bydb1
GSD is not running on node: bydb2
ONS is enabled
ONS daemon is running on node: bydb1
ONS daemon is running on node: bydb2
然后,启动GSD服务 --------------因为没有配置GNS所以不能启动
$ srvctl start nodeapps -g
PRCR-1079 : Failed to start resource ora.gsd
CRS-5016: Process "/oracle/ora11g/crs_home/bin/gsdctl" spawned by agent "/oracle/ora11g/crs_home/bin/oraagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/oracle/ora11g/crs_home/log/bydb1/agent/crsd/oraagent_grid/oraagent_grid.log"
CRS-5016: Process "/oracle/ora11g/crs_home/bin/gsdctl" spawned by agent "/oracle/ora11g/crs_home/bin/oraagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/oracle/ora11g/crs_home/log/bydb2/agent/crsd/oraagent_grid/oraagent_grid.log"
CRS-2674: Start of 'ora.gsd' on 'bydb1' failed
CRS-2674: Start of 'ora.gsd' on 'bydb2' failed
$ srvctl start nodeapps -g
PRCR-1079 : Failed to start resource ora.gsd
CRS-5016: Process "/oracle/ora11g/crs_home/bin/gsdctl" spawned by agent "/oracle/ora11g/crs_home/bin/oraagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/oracle/ora11g/crs_home/log/bydb1/agent/crsd/oraagent_grid/oraagent_grid.log"
CRS-5016: Process "/oracle/ora11g/crs_home/bin/gsdctl" spawned by agent "/oracle/ora11g/crs_home/bin/oraagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/oracle/ora11g/crs_home/log/bydb2/agent/crsd/oraagent_grid/oraagent_grid.log"
CRS-2674: Start of 'ora.gsd' on 'bydb1' failed
CRS-2674: Start of 'ora.gsd' on 'bydb2' failed
$ srvctl start nodeapps
PRCR-1079 : Failed to start resource ora.gsd
CRS-5016: Process "/oracle/ora11g/crs_home/bin/gsdctl" spawned by agent "/oracle/ora11g/crs_home/bin/oraagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/oracle/ora11g/crs_home/log/bydb2/agent/crsd/oraagent_grid/oraagent_grid.log"
CRS-5016: Process "/oracle/ora11g/crs_home/bin/gsdctl" spawned by agent "/oracle/ora11g/crs_home/bin/oraagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/oracle/ora11g/crs_home/log/bydb1/agent/crsd/oraagent_grid/oraagent_grid.log"
CRS-2674: Start of 'ora.gsd' on 'bydb2' failed
CRS-2674: Start of 'ora.gsd' on 'bydb1' failed
PRKO-2421 : Network resource is already started on node(s): bydb1,bydb2
PRKO-2420 : VIP is already started on node(s): bydb1
PRKO-2420 : VIP is already started on node(s): bydb2
PRKO-2422 : ONS is already started on node(s): bydb1,bydb2
PRCR-1079 : Failed to start resource ora.gsd
CRS-5016: Process "/oracle/ora11g/crs_home/bin/gsdctl" spawned by agent "/oracle/ora11g/crs_home/bin/oraagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/oracle/ora11g/crs_home/log/bydb2/agent/crsd/oraagent_grid/oraagent_grid.log"
CRS-5016: Process "/oracle/ora11g/crs_home/bin/gsdctl" spawned by agent "/oracle/ora11g/crs_home/bin/oraagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/oracle/ora11g/crs_home/log/bydb1/agent/crsd/oraagent_grid/oraagent_grid.log"
CRS-2674: Start of 'ora.gsd' on 'bydb2' failed
CRS-2674: Start of 'ora.gsd' on 'bydb1' failed
PRKO-2421 : Network resource is already started on node(s): bydb1,bydb2
PRKO-2420 : VIP is already started on node(s): bydb1
PRKO-2420 : VIP is already started on node(s): bydb2
PRKO-2422 : ONS is already started on node(s): bydb1,bydb2