当前位置:网站首页>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.
边栏推荐
猜你喜欢

习题:选择结构(一)

Creative code confession

Transfer Learning - Distant Domain Transfer Learning
![[Word] #() error occurs after Word formula is exported to PDF](/img/6a/168ded19d22826b6af974907f480fb.png)
[Word] #() error occurs after Word formula is exported to PDF

MySQL3

HOG特征学习笔记

The use of pytorch: temperature prediction using neural networks

ExcelPatternTool: Excel表格-数据库互导工具

Day Fourteen & Postman

开篇-开启全新的.NET现代应用开发体验
随机推荐
深度学习:使用nanodet训练自己制作的数据集并测试模型,通俗易懂,适合小白
Greenplum数据库故障分析——版本升级后gpstart -a为何返回失败
EBS uses virtual columns and hint hints to optimize sql case
没有对象的程序员如何过七夕
A new technical director, who calls DDD a senior, is convinced
意识形态的机制
VOC格式数据集转COCO格式数据集
Oracle encapsulates restful interfaces into views
Use of pytorch: Convolutional Neural Network Module
How to create an rpm package
SAP ERP和ORACLE ERP的区别是哪些?
linux(centOs7)部署mysql(8.0.20)数据库
Jin Jiu Yin Shi Interview and Job-hopping Season; Are You Ready?
Object.defineProperty实时监听数据变化并更新页面
如何看待自己的羞愧感
如何基于OpenVINO POT工具简单实现对模型的量化压缩
第十四天&postman
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
oracle将restful接口封装到视图中
Method Overriding and Object Class