FAIRYFAR-INTERNAL
 
  FAIRYFAR-INTERNAL  |  SITEMAP  |  ABOUT-ME  |  HOME  
Greenplum参数配置不当导致服务无法启动

1. 问题

因为一次参数配置不当,导致GPDB服务无法启动。

snippet.bash
[gpadmin@test-4 ~]$ gpconfig -c shared_buffers -v '128kB'
[gpadmin@test-4 ~]$ gpstop -r -a
20200506:08:53:56:3458821 gpstart:test-4:gpadmin-[CRITICAL]:-Failed to start Master instance in admin mode
20200506:08:53:56:3458821 gpstart:test-4:gpadmin-[CRITICAL]:-Error occurred: non-zero rc: 1
 Command was: 'env GPSESSID=0000000000 GPERA=None $GPHOME/bin/pg_ctl -D /opt/gp/gpmaster/gpseg-1 -l /opt/gp/gpmaster/gpseg-1/pg_log/startup.log -w -t 600 -o " -p 7456 -c gp_role=utility " start'
rc=1, stdout='waiting for server to start.... stopped waiting
', stderr='pg_ctl: could not start server
Examine the log output.
'
', stderr=''

然后发现gpconfig也无法在设置参数了:

snippet.bash
[gpadmin@test-4 ~]$ gpconfig -c shared_buffers -v '128MB'
20200506:08:54:37:3461042 gpconfig:test-4:gpadmin-[ERROR]:-could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 7456?
could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 7456?

难道只能手动修改postgresql.conf配置文件了吗?可是这套环境有192个segment,分布在多个物理节点。不用脚本是不可能了?

2. 解决方法

方法1

这个就不说了,写个脚本修改所有segment的postgresql.conf配置文件。不再赘述。

方法2

我们注意到,gpconfig报错,报的是master错误,是不是只要master服务能起来就行了呢?试试。

修改master的postgresql.conf配置文件,shared_buffers配置回合理值。

启动master服务,启动成功:

snippet.bash
[gpadmin@test-4 ~]$ gpstart -a -m

再执行gpconfig,也成功了:

snippet.bash
[gpadmin@test-4 ~]$ gpconfig -r shared_buffers
20200506:08:58:20:3473304 gpconfig:test-4:gpadmin-[INFO]:-completed successfully with parameters '-r shared_buffers'

重启GPDB所有服务,问题解决。



打赏作者以资鼓励:
移动端扫码阅读: