【RAC】ORA-15055: unable to connect to ASM instanceORA-12547: TNS:lost contact

rac 安装完成,关闭之后重启数据库遇到如下错误:

oracle@rac1:/tmp>sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 2 13:17:14 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup

ORA-01078: failure in processing system parameters

ORA-01565: error in identifying file '+DATA1/rac/spfilerac.ora'

ORA-17503: ksfdopn:2 Failed to open file +DATA1/rac/spfilerac.ora

ORA-12547: TNS:lost contact

检查alert日志文件,有如下记录:

TNS-12547: TNS:lost contact

    ns secondary err code: 12560

    nt main err code: 517    

TNS-00517: Lost contact

    nt secondary err code: 32

    nt OS err code: 0

ERROR: Failed to connect with connect string: (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/opt/rac/11.2.0/grid/bin/oracle)(ARGV0=oracle+ASM1_asmb_rac1)(ENVS='ORACLE_HOME=/opt/rac/11.2.0/grid,ORACLE_SID=+ASM1')(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(enable=setuser))

Errors in file /opt/rac/oracle/diag/rdbms/rac/rac1/trace/rac1_asmb_21386.trc:

ORA-15055: unable to connect to ASM instance

ORA-12547: TNS:lost contact

Fatal NI connect error 12547, connecting to:

 (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/opt/rac/11.2.0/grid/bin/oracle)(ARGV0=oracle+ASM1_asmb_rac1)(ENVS='ORACLE_HOME=/opt/rac/11.2.0/grid,ORACLE_SID=+ASM1')(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(enable=setuser)(CONNECT_DATA=(CID=(PROGRAM=oracle@rac1)(HOST=rac1)(USER=oracle))))

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.1.0 - Production

        Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production

  Time: 02-SEP-2011 13:31:15

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12547

TNS-12547: TNS:lost contact

    ns secondary err code: 12560

    nt main err code: 517

    

TNS-00517: Lost contact

    nt secondary err code: 32

    nt OS err code: 0

ERROR: Failed to connect with connect string: (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/opt/rac/11.2.0/grid/bin/oracle)(ARGV0=oracle+ASM1_asmb_rac1)(ENVS='ORACLE_HOME=/opt/rac/11.2.0/grid,ORACLE_SID=+ASM1')(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(enable=setuser))

Fri Sep 02 13:31:18 2011

Starting background process ASMB

Fri Sep 02 13:31:18 2011

ASMB started with pid=26, OS id=21450 

此时检查asm 实例,asm磁盘组是online的:

grid@rac1:/home/grid>crsctl stat res -t

NAME                TARGET STATE    SERVER       STATE_DETAILS    Local Resources  

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

ora.DATA1.dg       ONLINE ONLINE    rac1                    ========>DG are online

ora.DATA2.dg       ONLINE ONLINE    rac1                   

ora.LISTENER.lsnr  ONLINE ONLINE    rac1                   

ora.asm            ONLINE ONLINE    rac1          Started       

ora.ons            OFFLINE OFFLINE  rac1                   

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

NAME              TARGET STATE    SERVER       STATE_DETAILS Cluster Resources

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

ora.cssd1         ONLINE ONLINE    rac1                   

ora.diskmon1      ONLINE ONLINE    rac1                   

ora.evmd1         ONLINE ONLINE    rac1                   

ora.jrdwyf.db1    OFFLINE OFFLINE                Instance Shutdown

做如下检查:问题出现在ORACLE_HOME/bin/oracle,GI_HOME/bin/oracle 文件的权限设置上:

grid@rac1:/opt/11.2.0/grid/bin>ls -al oracle

-rwxr-x--x 1 grid oinstall 200678464 Feb 28 14:54 racle =============>incorrect

oracle@rac1:/opt/oracle/11.2.0/jrdwyf/bin>ls -al oracle

-rwxr-x--x 1 oracle asmadmin 228886191 Feb 28 15:41 racle=============>incorrect

测试登录asm实例!

grid@rac1:/home/grid>sqlplus "/ as sysasm"

SQL*Plus: Release 11.2.0.2.0 Production on Fri Mar 11 13:45:35 2011

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Automatic Storage Management option

SQL> 

正确的应该是:

$ls -l $GI_HOME/bin/oracle:

Correct permission should be:

-rwsr-s--x 1 grid oinstall 152400480   Sep   2 15:49 oracle

$ls -l $ORACLE_HOME/bin/oracle:

Correct permission should be:

-r-sr-sr-x  1 oracle asmadmin 173389085 Sep  2 15:51 oracle

因此在每个节点上修改$ORACLE_HOME/bin/oracle,$GI_HOME/bin/oracle权限即可:

#cd /opt/11.2.0/grid/bin

#chmod 6751 oracle

#ls -l oracle

Correct permission should be:

-rwsr-s--x 1 grid oinstall 152400480 09-02 16:12 oracle

#cd /opt/oracle/11.2.0/db/bin

#chmod 6555 oracle

#ls -l oracle

Correct permission should be:

-r-sr-sr-x 1 oracle asmadmin 173389085 09-02 16:16 oracle

修改之后,可以startup DB;

附上官方的解释:

   The issue is caused by incorrect permissions of GI_HOME/bin/oracle and ORACLE_HOME/bin/oracle, which lead to connections failed from an RDBMS instance (RDBMS) to the ASM instance.

   For this customer, the ASM instance works fine and the DG have been mounted, the permissions of GI_HOME/bin/oracle and ORACLE_HOME/bin/oracle are incorrect.

   If the permissions are incorrect, this will lead to connections failed from an RDBMS instance (RDBMS) to the ASM instance.$ORACLE_HOME/bin/oracle is the main Oracle RDBMS kernel binary, and implements the functions of all background daemons: PMON, SMON, DBWR, LGWR, CKPT, etc.

   Connection functionality implies attach to SGA shared memory, which needs to be initialized at instance startup; this happens with routines inside bin/oracle and (at a very high level) user privileges of who starts up the instance need to match with user privileges of who wants to connect to the instance.

   Database open implies opening files; this also happens in code inside bin/oracle. Again, privileges of who starts up the instance and attempts to open the database need to match the privileges of files where the data actually resides.ASM is implemented as an Oracle instance - starting out of the bin/oracle in GI_HOME; so you'll also have connections from an ORACLE_HOME instance (RDBMS) and a GI_HOME instance (ASM) for I/O path translations.

时间: 2024-10-31 16:00:38

【RAC】ORA-15055: unable to connect to ASM instanceORA-12547: TNS:lost contact的相关文章

【RAC】Creating a filesystem physical standby from ASM (RAC ) primary之一

环境: 版本  11.2.0.1  1   primary :      name: rac      ip: 10.250.7.226     scan ip:10.250.7.200     使用ASM存储数据  2  standby :     name : yangdb     ip :10.250.7.241    使用filesystem 存储数据 在11gr2 版本中,oracle 提供了duplicate from active database 的功能,也就是可以不用备份源数据

【RAC】Creating a filesystem physical standby from ASM (RAC ) primary 之二

oracle@rac3:/opt/oracle/11.2.0/yangdb/dbs>rman target sys/yang402@rac  auxiliary / Starting Duplicate Db at 08-SEP-11 released channel: c1 released channel: s1 released channel: s2 RMAN-00571: =========================================================

【RAC】Creating a filesystem physical standby from ASM (RAC ) primary之三

Starting backup at 11-SEP-11 RMAN-03009: failure of backup command on c1 channel at 09/11/2011 17:48:09 ORA-19505: failed to identify file "/opt/rac/oracle/11.2.0/db/dbs/orapwrac1" ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: N

ORA-15055 Unable to Connect to ASM When Starting an Instance

尝试启动一个spfile 文件在asm 中的数据库时会遇到如下错误: ORA-01078: failure in processing system parameters ORA-01565: error in identifying file '+DATA_ASM/gisqe1/spfilegisqe1.ora' ORA-17503: ksfdopn:2 Failed to open file +DATA_ASM/gisqe1/spfilegisqe1.ora ORA-15055: unabl

【RAC】将RAC备份集恢复为单实例数据库

[RAC]将RAC备份集恢复为单实例数据库 1.1  BLOG文档结构图   1.2  前言部分   1.2.1  导读 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① rac数据库的备份集是如何恢复到单实例的数据库 ② ASM文件系统到OS文件系统的转换 ③ 一般的备份恢复过程       本文如有错误或不完善的地方请大家多多指正,ITPUB留言或QQ皆可,您的批评指正是我写作的最大动力. 1.2.2  实验环境介绍   源库:1

【RAC】参数CLUSTER_INTERCONNECTS

[RAC]参数CLUSTER_INTERCONNECTS CLUSTER_INTERCONNECTS参数定义一个私有网络,这个参数将影响GCS和GES服务网络接口的选择. 该参数主要用于以下目的: 1.覆盖默认的内联网络 2.单一的网络带宽不能满足RAC数据库的带宽要求,增加带宽. CLUSTER_INTERCONNECTS将信息存储在集群注册表中,明确覆盖以下内容: 1.存储在OCR中通过oifcfg命令查看的网络分类. 2.Oracle选择的默认内部连接. 该参数默认值是空,可以包含一到多个

【RAC】RAC中的负载均衡和故障切换--TAF配置

[RAC]RAC中的负载均衡和故障切换--TAF配置 涉及到的内容包括:   Oracle RAC 客户端连接负载均衡(Load Balance)      实现负载均衡(Load Balance)是Oracle RAC最重要的特性之一,主要是把负载平均分配到集群中的各个节点,以提高系统的整体吞吐能力.通常情况下有两种方式来实现负载均衡,一个是基于客户端连接的负载均衡,一个是基于服务器端监听器(Listener)收集到的信息来将新的连接请求分配到连接数较少实例上的实现方式.本文主要讨论的是基于客

【RAC】RAC相关基础知识

  [RAC]RAC相关基础知识 1.CRS简介    从Oracle 10G开始,oracle引进一套完整的集群管理解决方案--Cluster-Ready Services,它包括集群连通性.消息和锁.负载管理等框架.从而使得RAC可以脱离第三方集群件,当然,CRS与第三方集群件可以共同使用. (1).CRS进程 CRS主要由三部分组成,三部分都作为守护进程出现 <1>CRSD:资源可用性维护的主要引擎.它用来执行高可用性恢复及管理操作,诸如维护OCR及管理应用资源,它保存着集群的信息状态和

【RAC】rac环境下的数据库备份与还原

[RAC]rac环境下的数据库备份与还原 一.1  BLOG文档结构图       一.2  前言部分   一.2.1  导读 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① rac环境下的数据库备份与还原 ② rman恢复数据库的一般步骤 ③ rac环境的简单操作   注意:本篇BLOG中代码部分需要特别关注的地方我都用黄色背景和红色字体来表示,比如下边的例子中,thread 1的最大归档日志号为33,thread 2的最大归档日