案例说明:

在KingbaseES V8R6单实例环境,配置外部备份服务器使用sys_backup.sh物理备份时,出现以下”WAL segment xxx was not archived before the 60000ms timeout“故障。操作步骤见:《KingbaseES V8R6 单实例sys_backup.sh外部备份案例》https://www.cnblogs.com/tiany1224/p/16334032.html

数据库版本信息:

test=# select version();
version
------------------------------------------------------------------------------------------------------------------
KingbaseES V008R006C005B0054 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46), 64-bit
(1 row)
  • 故障现象:

  • 故障分析:

1、查看数据库节点下sys_log日志

2022-05-30 23:18:57.147 CST [21529] LOG:  archive command failed with exit code 55
2022-05-30 23:18:57.147 CST [21529] DETAIL: The failed archive command was: export TZ=Asia/Shanghai;/opt/Kingbase/ES/V8R6_054/Server/bin/sys_rman --config /home/kingbase/kbbr1_repo/sys_rman.conf --stanza=kingbase archive-push sys_wal/00000001000000000000001C
2022-05-30 23:18:57.147 CST [21529] WARNING: archiving write-ahead log file "00000001000000000000001C" failed too many times, will try again later

2、提取日志归档信息手工执行归档

[kingbase@node1 data]$ /opt/Kingbase/ES/V8R6_054/Server/bin/sys_rman --config /home/kingbase/kbbr1_repo/sys_rman.conf --stanza=kingbase archive-push sys_wal/00000001000000000000001C

2022-05-30 23:23:32.207 P00   INFO: archive-push command begin 2.27: [sys_wal/00000001000000000000001C] --config=/home/kingbase/kbbr1_repo/sys_rman.conf --exec-id=31480-4e35a388 --kb1-path=/data/kingbase/v8r6_054/data --log-level-console=info --log-level-file=info --log-path=/opt/Kingbase/ES/V8R6_054/Server/log --log-subprocess --repo1-host=192.168.8.100 --repo1-host-config=/home/kingbase/kbbr1_repo/sys_rman.conf --repo1-host-user=kingbase --repo1-path=/home/kingbase/kbbr1_repo --stanza=kingbase
ERROR: [103]: unable to find a valid repository:
repo1: [UnknownError] remote-0 process on '192.168.8.100' terminated unexpectedly [127]: bash: /opt/Kingbase/ES/V8R6_054/KESRealPro/V008R006C005B0054/Server/bin/sys_rman: No such file or directory
2022-05-30 23:23:32.461 P00 INFO: archive-push command end: aborted with exception [103]

3、查看备份服务器路径信息

=从备份服务器查询到,原路径信息“/opt/Kingbase/ES/V8R6_054/Server",由于此版本的数据库软件安装存储路径使用了符号链接(如下图所示),导致在repo节点配置文件路径时,和数据库节点的存储路径不一致,在repo节点读取文件失败。=

数据节点文件存储路径:

  • 故障解决:

    1、在repo节点上重新创建存储目录
[kingbase@srv01 bin]$ mkdir -p /opt/Kingbase/ES/V8R6_054/KESRealPro/V008R006C005B0054/Server

[kingbase@srv01 V8R6_054]$ cd /opt/Kingbase/ES/V8R6_054/KESRealPro/V008R006C005B0054/Server/
[kingbase@srv01 Server]$ ls -lh
total 338M
drwxr-xr-x 2 kingbase kingbase 4.0K May 31 14:20 bin
-rw------- 1 kingbase kingbase 338M May 31 14:14 db.zip
drwxrwxr-x 5 kingbase kingbase 8.0K Apr 7 16:17 lib
drwx------ 2 kingbase kingbase 100 May 31 14:23 log
drwxrwxr-x 8 kingbase kingbase 4.0K Apr 7 16:17 share

2、编辑sys_backup.conf文件

3、重新执行初始化

4、 重新执行手工归档(归档成功)

[kingbase@node1 data]$ /opt/Kingbase/ES/V8R6_054/Server/bin/sys_rman --config /home/kingbase/kbbr1_repo/sys_rman.conf --stanza=kingbase archive-push sys_wal/00000001000000000000001C

2022-05-30 23:26:17.480 P00   INFO: archive-push command begin 2.27: [sys_wal/00000001000000000000001C] --config=/home/kingbase/kbbr1_repo/sys_rman.conf --exec-id=32254-8f3f05e4 --kb1-path=/data/kingbase/v8r6_054/data --log-level-console=info --log-level-file=info --log-path=/opt/Kingbase/ES/V8R6_054/Server/log --log-subprocess --repo1-host=192.168.8.100 --repo1-host-config=/home/kingbase/kbbr1_repo/sys_rman.conf --repo1-host-user=kingbase --repo1-path=/home/kingbase/kbbr1_repo --stanza=kingbase

WARN: WAL file '00000001000000000000001C' already exists in the repo1 archive with the same checksum
HINT: this is valid in some recovery scenarios but may also indicate a problem.
2022-05-30 23:26:17.924 P00 INFO: pushed WAL file '00000001000000000000001C' to the archive
2022-05-30 23:26:18.026 P00 INFO: archive-push command end: completed successfully (549ms)
  • 总结

    对于sys_backup.sh工具执行物理备份时,很多故障都体现在”归档超时“的问题,解决以上问题,可以使用以下思路:

        1、查看数据节点的sys_log日志,查看是否有归档失败对应的日志信息。
    2、如果有以上日志信息,提取日志信息,通过手工方式执行归档命令,查看执行失败的错误提示。
    3、按照错误提示,查看对应的配置文件,和归档相关的配置是否正确,如存储路径、目录权限、wal日志缺失等,解决归档失败问题。
    4、如在业务量高峰时备份,会产生I/O拥塞,导致归档失败,可以调高archive_timeout参数的阈值,建议不要在业务高峰执行备份操作。

KingbaseES V8R6单实例外部备份故障案例的更多相关文章

  1. KingbaseES V8R6单实例外部备份案例

    案例说明: 本案例采用sys_backup.sh执行物理备份,备份使用如下逻辑架构:数据库主机采用CentOS 7系统,repo采用kylin V10 Server. 单实例+外部备份服务器 备份逻辑 ...

  2. KingbaseES V8R6集群外部备份案例

    案例说明: 本案例采用sys_backup.sh执行物理备份,备份使用如下逻辑架构:集群采用CentOS 7系统,repo采用kylin V10 Server. 一主一备+外部备份 此场景为主备双机常 ...

  3. KingbaseES V8R6C5单实例sys_backup.sh备份案例

    ​ 案例说明: KingbaseES V8R6C5版本中使用了securecmdd工具,用于主机节点间的通讯,默认端口8890.备份工具sys_backup.sh默认使用了securecmdd工具,对 ...

  4. KingbaseES V8R6集群管理运维案例之---repmgr standby switchover故障

    案例说明: 在KingbaseES V8R6集群备库执行"repmgr standby switchover"时,切换失败,并且在执行过程中,伴随着"repmr stan ...

  5. KingbaseES V8R3 由于修改系统时间导致sys_rman备份故障案例

    ​ 案例说明: 此案例,为复现"current time may be rewound"错误.对于数据库环境,在使用前必须保证系统时间的正确性.如果数据库创建后,再将系统时间修改为 ...

  6. KingbaseES V8R6C5B041 sys_backup.sh单实例备份案例

    ​ 数据库版本: test=# select version(); version ---------------------------------------------------------- ...

  7. kingbaseES R3 集群备库转换为单实例库案例

    案例说明: 在生产环境需要将集群中架构转换为单实例环境,本案例以备库转换为单实例库为案例,介绍了两种方案,一种在数据库数据量小的环境下采用 sys_dumpall 导出导入方式建立单实例库:另外一种是 ...

  8. KingbaseES V8R6集群维护之--修改数据库服务端口案例

    ​ 案例说明: 对于KingbaseES数据库单实例环境,只需要修改kingbase.conf文件的'port'参数即可,但是对于KingbaseES V8R6集群中涉及到多个配置文件的修改,并且在应 ...

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

    [RAC]将单实例备份集恢复为rac数据库 一.1  BLOG文档结构图 一.2  前言部分 一.2.1  导读 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识, ...

随机推荐

  1. jieba分词原理解析:用户词典如何优先于系统词典

    目标 查看jieba分词组件源码,分析源码各个模块的功能,找到分词模块,实现能自定义分词字典,且优先级大于系统自带的字典等级,以医疗词语邻域词语为例. jieba分词地址:github地址:https ...

  2. easyexcel注解

    1.@ExcelProperty 必要的一个注解,注解中有三个参数value,index分别代表列明,列序号 1.value 通过标题文本对应2.index 通过文本行号对应 2.@ColumnWit ...

  3. 动态树 — Link_Cut_Tree

    [模板]动态树(Link Cut Tree) Link-cut-tree是一种维护动态森林的数据结构,在需要动态加边/删边的时候就需要LCT来维护. Link-cut-tree的核心是轻重链划分,每条 ...

  4. 强化学习-学习笔记4 | Actor-Critic

    Actor-Critic 是价值学习和策略学习的结合.Actor 是策略网络,用来控制agent运动,可以看做是运动员.Critic 是价值网络,用来给动作打分,像是裁判. 4. Actor-Crit ...

  5. 【人工智能】【Python】Matplotlib基础

    Maplotlib 本文档由萌狼蓝天写于2022年7月24日 目录 Maplotlib (一)Matplotlib三层结构 (二)画布创建.图像绘制.图像显示 (三)图像画布设置.图像保存 (四)自定 ...

  6. Nginx 的基本概念

    Nginx 简介 什么是 Nginx Nginx 是一个高性能的 HTTP 和 反向代理 web服务器 占用内存少,并发能力强,高性能,热部署 但不支持 Java,Java 得配合 tomcat 使用 ...

  7. 向docker镜像中传递变量的两种方式

    测试用到的python文件: #!/usr/bin/env python3 #conding: utf-8 from http.server import HTTPServer, BaseHTTPRe ...

  8. Python花式读取大文件(10g/50g/1t)遇到的性能问题(面试向)

    原文转载自「刘悦的技术博客」https://v3u.cn/a_id_97 最近无论是面试还是笔试,有一个高频问题始终阴魂不散,那就是给一个大文件,至少超过10g,在内存有限的情况下(低于2g),该以什 ...

  9. 海豚调度5月Meetup:6个月重构大数据平台,帮你避开调度升级改造/集群迁移踩过的坑

    当今许多企业都有着技术架构的DataOps程度不够.二次开发成本高.迁移成本高.集群部署混乱等情况,团队在技术选型之后发现并不适合自己的需求,但是迁移成本和难度又比较大,甚至前团队还留下了不少坑,企业 ...

  10. ApacheCon 首次亚洲大会 —— Incubator 专场介绍

    Apache 孵化器即为想要进入 Apache 软件基金会(ASF)的项目提供相关帮助和服务.它帮助进入的项目(称为"podling")采用 Apache 的治理风格,并引导使用 ...