首页 > 其他分享 >observer 和fsfo的关系

observer 和fsfo的关系

时间:2024-10-12 23:33:34浏览次数:11  
标签:关系 ago Last Target observer seconds Ping Primary fsfo

结论1:主库和master ob 挂掉,不会fofo!
DGMGRL> SHOW OBSERVERS
ObserverConfigFile=observer.ora
observer configuration file parsing succeeded
Submitted command "SHOW OBSERVER" using connect identifier "orcl" 
Connected to "orcl"
Configuration - dg_config

  Primary:            orcl
  Active Target:      orcl2dg

Observer "grp_a" - Master

  Host Name:                    prdb19
  Last Ping to Primary:         0 seconds ago
  Last Ping to Target:          3 seconds ago

Observer "grp_b" - Backup

  Host Name:                    prdg19
  Last Ping to Primary:         2 seconds ago
  Last Ping to Target:          2 seconds ago

.
Submitted command "SHOW OBSERVER" using connect identifier "orcl2dg" 
Connected to "orcl2dg"

Configuration - dg_config

  Primary:            orcl
  Active Target:      orcl2dg

Observer "grp_a" - Master

  Host Name:                    prdb19
  Last Ping to Primary:         2 seconds ago
  Last Ping to Target:          2 seconds ago

Observer "grp_b" - Backup

  Host Name:                    prdg19
  Last Ping to Primary:         1 second ago
  Last Ping to Target:          1 second ago

.
Submitted command "SHOW OBSERVER" using connect identifier "orcl0dg" 
Connected to "orcl0dg"

Configuration - dg_config

  Primary:            orcl
  Active Target:      orcl2dg

Observer "grp_a" - Master

  Host Name:                    prdb19
  Last Ping to Primary:         2 seconds ago
  Last Ping to Target:          2 seconds ago

Observer "grp_b" - Backup

  Host Name:                    prdg19
  Last Ping to Primary:         1 second ago
  Last Ping to Target:          2 seconds ago




DGMGRL> SHOW CONFIGURATION  lag verbose

Configuration - dg_config

  Protection Mode: MaxPerformance
  Members:
  orcl    - Primary database
    orcl2dg - (*) Physical standby database 
              Transport Lag:      0 seconds (computed 0 seconds ago)
              Apply Lag:          0 seconds (computed 0 seconds ago)
    orcl0dg - Physical standby database 
              Transport Lag:      0 seconds (computed 0 seconds ago)
              Apply Lag:          0 seconds (computed 0 seconds ago)

  (*) Fast-Start Failover target

  Properties:
    FastStartFailoverThreshold      = '30'
    OperationTimeout                = '30'
    TraceLevel                      = 'USER'
    FastStartFailoverLagLimit       = '30'
    CommunicationTimeout            = '180'
    ObserverReconnect               = '0'
    FastStartFailoverAutoReinstate  = 'TRUE'
    FastStartFailoverPmyShutdown    = 'TRUE'
    BystandersFollowRoleChange      = 'ALL'
    ObserverOverride                = 'FALSE'
    ExternalDestination1            = ''
    ExternalDestination2            = ''
    PrimaryLostWriteAction          = 'CONTINUE'
    ConfigurationWideServiceName    = 'orcl_CFG'

Fast-Start Failover: Enabled in Potential Data Loss Mode
  Lag Limit:          30 seconds
  Threshold:          30 seconds
  Active Target:      orcl2dg
  Potential Targets:  "orcl2dg"
    orcl2dg    valid
  Observers:      (*) grp_a
                      grp_b
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: (none)
  Observer Override:  FALSE

Configuration Status:
SUCCESS

DGMGRL> 




--broker 数据无正常返回:
[root@prdg19 ~]# su - oracle
Last login: Sat Oct 12 22:10:17 CST 2024 on pts/2
[oracle@prdg19 rdbms]$ dgmgrl sys/Szcmb123_
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Sat Oct 12 22:14:53 2024
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected to "orcl2dg"
Connected as SYSDBA.
DGMGRL> SHOW CONFIGURATION  lag verbose



--Fast-Start Failover is not possible  因为没有master observer【结论,没有设置参数,不会切换】
Unable to connect to database using prdb19/orcl
[W000 2024-10-12T22:16:31.128+08:00] Primary database cannot be reached.
[W000 2024-10-12T22:16:31.128+08:00] Fast-Start Failover threshold has not exceeded. Retry for the next 1 second
[W000 2024-10-12T22:16:31.128+08:00] Try to connect to the primary.
[W000 2024-10-12T22:16:34.131+08:00] Primary database cannot be reached.
[W000 2024-10-12T22:16:34.131+08:00] Fast-Start Failover threshold has expired.
[W000 2024-10-12T22:16:34.131+08:00] Try to connect to the standby.
[W000 2024-10-12T22:16:34.131+08:00] Making a last connection attempt to primary database before proceeding with Fast-Start Failover.
[W000 2024-10-12T22:16:34.131+08:00] Check if the standby is ready for failover.
ORA-12543: TNS:destination host unreachable

Unable to connect to database using prdb19/orcl
[W000 2024-10-12T22:16:34.143+08:00] Fast-Start Failover is not possible because this observer is not the master.
[W000 2024-10-12T22:16:35.144+08:00] Try to connect to the primary.
ORA-12543: TNS:destination host unreachable

Unable to connect to database using prdb19/orcl
ORA-12543: TNS:destination host unreachable

Unable to connect to database using prdb19/orcl
[W000 2024-10-12T22:16:37.149+08:00] Primary database cannot be reached.
[W000 2024-10-12T22:16:37.149+08:00] Try to connect to the primary.
ORA-12543: TNS:destination host unreachable

Unable to connect to database using prdb19/orcl


--主库主机重启后,不会启动

DGMGRL>  SHOW CONFIGURATION  lag verbose

Configuration - dg_config

  Protection Mode: MaxPerformance
  Members:
  orcl    - Primary database
    Error: ORA-16810: multiple errors or warnings detected for the member
    orcl2dg - (*) Physical standby database 
      Error: ORA-16825: multiple errors or warnings, including fast-start failover-related errors or warnings, detected for the database
              Transport Lag:      8 minutes 43 seconds (computed 2 seconds ago)
              Apply Lag:          8 minutes 43 seconds (computed 2 seconds ago)

    orcl0dg - Physical standby database 
      Warning: ORA-16857: member disconnected from redo source for longer than specified threshold
              Transport Lag:      8 minutes 43 seconds (computed 2 seconds ago)
              Apply Lag:          8 minutes 43 seconds (computed 2 seconds ago)



--连接主库后,才能看到observer 的failover, 没有发现fsfo
DGMGRL>  show observer
Configuration - dg_config
  Primary:            orcl
  Active Target:      orcl2dg
Observer "grp_b" - Master
  Host Name:                    prdg19
  Last Ping to Primary:         0 seconds ago
  Last Ping to Target:          1 second ago
Observer "grp_a" - Backup
  Host Name:                    prdb19
  Last Ping to Primary:         (unknown)
  Last Ping to Target:          (unknown)





--解决方案[不可行]:
没有设置参数!测试结果同上,但是发现,主库启动后,ob failover,而且发生fsfo,风险较大!
EDIT CONFIGURATION SET PROPERTY ObserverReconnect=5;
EDIT CONFIGURATION SET PROPERTY ObserverOverride=TRUE;

DGMGRL>  SHOW CONFIGURATION  lag verbose

Configuration - dg_config

  Protection Mode: MaxPerformance
  Members:
  orcl    - Primary database
    orcl2dg - (*) Physical standby database 
              Transport Lag:      0 seconds (computed 1 second ago)
              Apply Lag:          0 seconds (computed 1 second ago)
    orcl0dg - Physical standby database 
              Transport Lag:      0 seconds (computed 1 second ago)
              Apply Lag:          0 seconds (computed 1 second ago)

  (*) Fast-Start Failover target

  Properties:
    FastStartFailoverThreshold      = '30'
    OperationTimeout                = '30'
    TraceLevel                      = 'USER'
    FastStartFailoverLagLimit       = '30'
    CommunicationTimeout            = '180'
    ObserverReconnect               = '5'
    FastStartFailoverAutoReinstate  = 'TRUE'
    FastStartFailoverPmyShutdown    = 'TRUE'
    BystandersFollowRoleChange      = 'ALL'
    ObserverOverride                = 'TRUE'
    ExternalDestination1            = ''
    ExternalDestination2            = ''
    PrimaryLostWriteAction          = 'CONTINUE'
    ConfigurationWideServiceName    = 'orcl_CFG'

Fast-Start Failover: Enabled in Potential Data Loss Mode
  Lag Limit:          30 seconds
  Threshold:          30 seconds
  Active Target:      orcl2dg
  Potential Targets:  "orcl2dg"
    orcl2dg    valid
  Observers:      (*) grp_a
                      grp_b
                      prdg19
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: 5 seconds
  Observer Override:  TRUE

Configuration Status:
SUCCESS

DGMGRL> 



DGMGRL> show observer

Configuration - dg_config

  Primary:            orcl
  Active Target:      orcl2dg

Observer "grp_a" - Master

  Host Name:                    prdb19
  Last Ping to Primary:         3 seconds ago
  Last Ping to Target:          3 seconds ago

Observer "grp_b" - Backup

  Host Name:                    prdg19
  Last Ping to Primary:         2 seconds ago
  Last Ping to Target:          4 seconds ago

Observer "prdg19" - Backup

  Host Name:                    prdg19
  Last Ping to Primary:         2 seconds ago
  Last Ping to Target:          3 seconds ago

DGMGRL> 



--同样的报错
Unable to connect to database using prdb19/orcl
[W000 2024-10-12T22:51:57.905+08:00] Fast-Start Failover is not possible because this observer is not the master.
[W000 2024-10-12T22:51:58.906+08:00] Try to connect to the primary.
ORA-12543: TNS:destination host unreachable

Unable to connect to database using prdb19/orcl
ORA-12543: TNS:destination host unreachable

Unable to connect to database using prdb19/orcl
[W000 2024-10-12T22:52:00.917+08:00] Primary database cannot be reached.
[W000 2024-10-12T22:52:00.917+08:00] Try to connect to the primary.
ORA-12543: TNS:destination host unreachable

Unable to connect to database using prdb19/orcl




--下面程序没有成功
set serveroutput on

declare
status integer;

begin
status := dbms_dg.initiate_fs_failover('Failover Requested');

dbms_output.put_line('Fast-Start Failover is disabled: Expected status = ORA-16646');
dbms_output.put_line('                  Actual Status = ORA-' || status);

end;
/
exit;


--主库启动后,ob立即failover  fsfo理解启动!【问题和隐患】设置参数后的隐患
DGMGRL> show observer
Configuration - dg_config
  Primary:            orcl
  Active Target:      orcl2dg
Observer "prdg19" - Master
  Host Name:                    prdg19
  Last Ping to Primary:         1 second ago
  Last Ping to Target:          3 seconds ago
Observer "grp_a" - Backup
  Host Name:                    prdb19
  Last Ping to Primary:         (unknown)
  Last Ping to Target:          (unknown)
Observer "grp_b" - Backup

  Host Name:                    prdg19
  Last Ping to Primary:         2 seconds ago
  Last Ping to Target:          2 seconds ago
  
  
  
  



--obsever 顺序*****************************
show observer
DGMGRL>  show observer

Configuration - dg_config

  Primary:            orcl
  Active Target:      orcl2dg

Observer "grp_a" - Master

  Host Name:                    prdb19
  Last Ping to Primary:         17 seconds ago
  Last Ping to Target:          17 seconds ago

Observer "grp_b" - Backup

  Host Name:                    prdg19
  Last Ping to Primary:         1 second ago
  Last Ping to Target:          1 second ago

Observer "prdg19" - Backup

  Host Name:                    prdg19
  Last Ping to Primary:         0 seconds ago
  Last Ping to Target:          3 seconds ago
  
  
  
--顺序要求的时候,参考:PreferredObserverHosts


DGMGRL> show observer
Configuration - dg_config
  Primary:            orcl
  Active Target:      orcl2dg
Observer "grp_b" - Master
  Host Name:                    prdg19
  Last Ping to Primary:         1 second ago
  Last Ping to Target:          2 seconds ago
Observer "grp_a" - Backup
  Host Name:                    prdb19
  Last Ping to Primary:         2 seconds ago
  Last Ping to Target:          0 seconds ago
Observer "grp_c" - Backup
  Host Name:                    prdg19
  Last Ping to Primary:         1 second ago
  Last Ping to Target:          0 seconds ago
DGMGRL> 



DGMGRL> edit database orcl set property PreferredObserverHosts='prdg19';
Property "preferredobserverhosts" updated
DGMGRL> edit database orcl2dg  set property PreferredObserverHosts='prdg19';
Property "preferredobserverhosts" updated
DGMGRL> 


--如何hang进程!
[oracle@prdg19 cluster1]$ ps -ef|grep dgmgrl
oracle    3640 17113  0 23:19 pts/5    00:00:01 dgmgrl
oracle    8071  1527  0 23:24 pts/6    00:00:00 grep --color=auto dgmgrl
oracle   27715  9627  0 22:31 pts/2    00:00:09 dgmgrl
[oracle@prdg19 cluster1]$ kill -SIGSTOP   3640
[oracle@prdg19 cluster1]$ kill -conn   3640
-bash: kill: conn: invalid signal specification
[oracle@prdg19 cluster1]$ kill -cont   3640
[oracle@prdg19 cluster1]$ kill -9 27715


DGMGRL>  show observer
Configuration - dg_config
  Primary:            orcl
  Active Target:      orcl2dg
Observer "grp_c" - Master
  Host Name:                    prdg19
  Last Ping to Primary:         0 seconds ago
  Last Ping to Target:          2 seconds ago
Observer "grp_a" - Backup
  Host Name:                    prdb19
  Last Ping to Primary:         1 second ago
  Last Ping to Target:          3 seconds ago
Observer "grp_b" - Backup
  Host Name:                    prdg19
  Last Ping to Primary:         65 seconds ago
  Last Ping to Target:          34 seconds ago
DGMGRL> 

 

标签:关系,ago,Last,Target,observer,seconds,Ping,Primary,fsfo
From: https://www.cnblogs.com/notonlydba/p/18461695

相关文章

  • POLIR-Society-Organization-Psychology-Relationship关系-Dating Stages阶段: Questi
    https://www.verywellmind.com/questions-to-ask-your-partner-dating-stages-5270161Relationships>StrengtheningRelationships>RelationshipQuestionstoAskYourPartnertoTakeYourConnectionNextLevelRelationshipQuestionstoAskYourPartner......
  • 创建的对象与class 对象的区别,两者之间的关系
    什么是class对象Class对象保存每个类型运行时的类型信息,如类名、属性、方法、父类信息等等。在JVM中,一个类只对应一个Class对象可以将java中的class对象看成一个模具,我们new出来的对象,则是通过模具按压出来的具体模型,模型里面的各种颜色各不相同(对象内的成员)class对象的特......
  • k8s和docker关系
    Docker首先诞生于2013年,它引入了现代容器化技术的概念,使得开发者能够将应用程序及其依赖项一起打包,以便在不同环境中实现一致性和可移植性。Docker的出现极大地简化了应用程序的部署和管理过程。随着Docker的普及,容器化应用程序的数量不断增加,人们开始需要一个有效的方法来管......
  • 【Linux探索学习】第四弹——Linux权限管理详解:理解用户、组和权限之间的关系
    前言:在前面我们已经学习了Linux的基础指令,相信大家对Linux已经有了一定的认识,今天我们来学习Linux权限的相关知识点,Linux权限是Linux初学者必须要掌握的内容目录一、Linux下用户类型二、权限基本概念三、权限的表示四、文件访问权限的相关设置方法1.chmod指令2.ch......
  • Java中的专有名词——JVM、JRE、JDK到底是什么关系
            相信刚开始学习Java的同学一定见过“JVM、JDK、JRE”这三个专有名词,那他们到底代表的是什么,三者之间又有何种关系呢?        下面我们先来介绍一下三者:1.JVM    JVM:Java虚拟机(JavaVirtualMachine,JVM)是运行Java字节码的虚拟机。JVM有......
  • nodejs 和 npm 版本对应关系
    一、nodejs和npm的版本是有适配的首先看下官网列明的大概匹配关系:官网链接地址:https://nodejs.org/zh-cn/about/previous-releases可以查看下本地的版本,根据上表中的对应关系,看是否差别太大。如果差别太大需要更新到对应版本,不然会出现各种报错问题,导致npm命令执行失败。......
  • 【Qt】QStandardItem和QStandardItemModle以及QModelIndex的关系
    在Qt框架中,QStandardItem、QStandardItemModel和QModelIndex是用来处理表格和数据视图的关键类。以下是它们之间的关系和用途:QStandardItemQStandardItem是QStandardItemModel中用来表示单个项的类。它可以包含数据(如文本、图标、复选框状态等)和子项(用于树结构)。QSt......
  • ROS通信方式之Topic话题与Message消息的关系与C++实现
    ros由于其分布式模块化的设计理念,会将一个完整任务分解成多个节点去实现,这些节点之间的协作通过topic话题和message消息.相关概念有节点(Nodes):节点是一个可执行文件,它可以通过ROS来与其他节点进行通信。消息(Messages):订阅或发布话题时所使用的ROS数据类型。话题(Topics):节点可以将......
  • 实体-关系图(Entity-Relationship Diagram)【er图步骤】【数据库设计步骤】
    1.第一步:根据宠物商店业务逻辑建立petstoreE-R图2.第二步:将petstoreE-R图转换为关系模式3.第三步:将petstore数据库规范化第一范式:保证每一列的原子性,每个属性只能包含单一值,不能是重复的或多值的(ok)第二范式:每一个非主键字段都是依赖于主键字段的(违者,如商品分类拆出来......
  • 解决ERROR ResizeObserver loop completed with undelivered notifications.
    https://www.cnblogs.com/luo9tian/p/18116299该报错虽然不影响项目运行,但是影响开发效率,总是弹出报错的黑框很烦人该报错原因:newResizeObserver包裹的方法,在布局发生变化时,不支持每帧都调用解决方法:用window.requestAnimationFrame包裹回调函数在App.vue/main.js中加......