当前位置:网站首页>Greenplum Database Fault Analysis - Why Does gpstart -a Return Failure After Version Upgrade?
Greenplum Database Fault Analysis - Why Does gpstart -a Return Failure After Version Upgrade?
2022-08-05 01:52:00 【Fat Uncle】
案例背景
On-site projects are carried outGreenplumWhen the database minor version is upgraded,The upgrade script reports an error,Indicates that the database failed to start.But we go from the springboard to the database node to usegpstartWhen starting the cluster in interactive mode,The cluster can be started,standby master是不可用的.What caused the usegpstart -a启动失败,使用gpstartIt will be successful to start?A small developer who joined the team for two years,Adhering to the principle that only through fault analysis can quickly cut into the learning database path,Take this job,Inevitably need to work overtime to deal with it.
分析过程
首先我们发现gpstart和gpstart -aExcept for the interaction,会尝试对standby master进行启动,Skip if it doesn't start.Our exclusion direction should also be this way,After replaying the scene first,使用gpstart -mjust pull upmaster节点,utilityMode loginmaster节点,执行select * from gp_segment_configuration where content = -1;查找master和standby master对应的记录.这里发现standby masterMarked as normal in the system tables,但是我们在standby master节点的gpseg-1The data files found in the directory are not very complete,比如就没有postgresql.conf.So the verdict is definitely yesgpinitstandby脚本运行出错,View the log as shown below:
gpinitstandby:xxx:gpadmin-[ERROR]:-Error initializing standby master: Standby master not configured
gpinitstandby:xxx:gpadmin-[ERROR]:-Request mode to remove warm master standby, but no standby located.
gpinitstandby:xxx:gpadmin-[ERROR]:-Error removing standby master: no standby configured
gpinitstandby:xxx:gpadmin-[INFO]:-Validating environment and parameters for standby initialization...
gpinitstandby:xxx:gpadmin-[INFO]:-------------------------------------------
gpinitstandby:xxx:gpadmin-[INFO]:Greenplum standby master initialization parameters
gpinitstandby:xxx:gpadmin-[INFO]:-------------------------------------------
gpinitstandby:xxx:gpadmin-[INFO]:-Greenplum master hostname = xxx
gpinitstandby:xxx:gpadmin-[INFO]:-Greenplum master data directory = /home/gpadmin/data/master/default/gpseg-1
gpinitstandby:xxx:gpadmin-[INFO]:-Greenplum master port = 5432
gpinitstandby:xxx:gpadmin-[INFO]:-Greenplum standby master hostname = xxx
gpinitstandby:xxx:gpadmin-[INFO]:-Greenplum standby master port = 5432
gpinitstandby:xxx:gpadmin-[INFO]:-Greenplum standby master data directory = /home/gpadmin/data/master/default/gpseg-1
gpinitstandby:xxx:gpadmin-[INFO]:-Greenplum update system catalog = On
gpinitstandby:xxx:gpadmin-[INFO]:-Syncing Greenplum Database extensions to standby
gpinitstandby:xxx:gpadmin-[INFO]:-The packages on xxx are consistent
gpinitstandby:xxx:gpadmin-[INFO]:-Adding standby master to catalog...
gpinitstandby:xxx:gpadmin-[INFO]:-Database catalog updated successfully.
gpinitstandby:xxx:gpadmin-[INFO]:-Updating pg_hba.conf file...
gpinitstandby:xxx:gpadmin-[INFO]:-pg_hba.conf files updated successfully.
gpinitstandby:xxx:gpadmin-[ERROR]:-Failed to copy data directory from master to standby.
gpinitstandby:xxx:gpadmin-[ERROR]:-Failed to create standby
gpinitstandby:xxx:gpadmin-[WARNING]-Trying to rollback changes that have been made...
gpinitstandby:xxx:gpadmin-[INFO]:-Rolling back catalog change...
gpinitstandby:xxx:gpadmin-[ERROR]:-Failed to remove standby from master catalog.
gpinitstandby:xxx:gpadmin-[INFO]:-Restoring pg_hba.conf file...
gpinitstandby:xxx:gpadmin-[INFO]:-Cleaning up pg_hba.conf backup files...
gpinitstandby:xxx:gpadmin-[INFO]:-Backup files of pg_hba.conf cleaned up successfully.
As can be seen from the above log before the upgradeHAComponents are being repairedstandby master,gpinitstandbyrun to frommasterThe data directory copies the data tostandby master时,The upgrade script is closedgreenplum集群,导致的失败.由于greenplumThe cluster is down,回滚gp_segment_configuration中的standby记录失败.因此使用gpstart -a启动时,The script thinksstandby master是正常的,Just try to start,Of course it will fail.
产生原因
在升级前HAComponents are being repairedstandby master,gpinitstandbyrun to frommasterThe data directory copies the data tostandby master时,The upgrade script is closedgreenplum集群,导致的失败.由于greenplumThe cluster is down,回滚gp_segment_configuration中的standby记录失败.
解决方案
Consider three options:
- gpstart -am启动master节点;执行
PGOPTIONS="-c gp_session_role=utility" psql -d postgres -c "select gp_remove_master_standby()";执行gpstop -ar - gpstart -am启动master节点;执行
PGOPTIONS="-c gp_session_role=utility" psql -d postgres -c "set allow_system_table_modes=true; update gp_segment_configuration set status = 'd' where content = -1 an role = 'm'; ";执行gpstop -ar - gpstart -aS.加上大写的SParameters are skipped directlystandby master启动
采用第3中方案,After the upgrade byHA来处理standby masterto fix startup issues.
边栏推荐
- Xunrui cms website cannot be displayed normally after relocation and server change
- Understand the recommendation system in one article: Recall 06: Two-tower model - model structure, training method, the recall model is a late fusion feature, and the sorting model is an early fusion
- hypervisor相关的知识点
- GC高德坐标和百度坐标转换
- 程序员失眠时的数羊列表 | 每日趣闻
- Are testing jobs so hard to find?I am 32 this year and I have been unemployed for 2 months. What should an older test engineer do next to support his family?
- 树形查找(二叉查找树)
- 【TA-霜狼_may-《百人计划》】图形4.3 实时阴影介绍
- 【Redis】Linux下Redis安装
- 原生js实现多选框全部选中和取消效果
猜你喜欢

测试工作这么难找吗?今年32,失业2个月,大龄测试工程师接下来该拿什么养家?

ExcelPatternTool: Excel table-database mutual import tool
![[Unity Entry Plan] Handling of Occlusion Problems in 2D Games & Pseudo Perspective](/img/de/944b31c68cc5b9ffa6a585530e7be9.png)
[Unity Entry Plan] Handling of Occlusion Problems in 2D Games & Pseudo Perspective

iNFTnews | 对体育行业和球迷来说,NFT可以带来什么?

.Net C# 控制台 使用 Win32 API 创建一个窗口

MySQL3

新来个技术总监,把DDD落地的那叫一个高级,服气

从一次数据库误操作开始了解MySQL日志【bin log、redo log、undo log】

英特尔 XDC 2022 精彩回顾:共建开放生态,释放“基建”潜能

数仓4.0(三)------数据仓库系统
随机推荐
意识形态的机制
GCC: paths to header and library files
多线程涉及的其它知识(死锁(等待唤醒机制),内存可见性问题以及定时器)
亚马逊云科技携手中科创达为行业客户构建AIoT平台
【七夕如何根据情侣倾听的音乐进行薅羊毛】背景音乐是否会影响情侣对酒的选择
Are testing jobs so hard to find?I am 32 this year and I have been unemployed for 2 months. What should an older test engineer do next to support his family?
开篇-开启全新的.NET现代应用开发体验
短域名绕过及xss相关知识
Log an error encountered when compiling google gn "I could not find a ".gn" file ..."
金仓数据库 KingbaseES V8 GIS数据迁移方案(3. 基于ArcGIS平台的数据迁移到KES)
Greenplum数据库故障分析——版本升级后gpstart -a为何返回失败
How DHCP works
How to create an rpm package
直播预告|30分钟快速入门!来看可信分布式AI链桨的架构设计
汇编语言之源程序
第十一章 开关级建模
深度学习原理学习小结 - Self-Attention/Transformer
[How to smash wool according to the music the couple listens to during the Qixi Festival] Does the background music affect the couple's choice of wine?
Use of pytorch: Convolutional Neural Network Module
【机器学习】21天挑战赛学习笔记(二)