gaussdb 【FAQ_004】【数据库启动失败_提示 “could not start server“】

问题现象
使用gs_ctl start命令启动GaussDB时,提示如下错误信息,关键信息为“could not start server”。

server starting.... stopped waiting
gs_ctl: could not start server
Examine the log output: /opt/gaussdb/data/pg_log/gs_ctl-current.log or the log directory configured by parameter "log_directory" in postgresql.conf

但是查询数据库进程时,发现数据库已经启动了。

info@suse11sp1x64:~/gaussdb/data/pg_log> ps -ef|grep gaussdb
info       738     1  0 19:30 pts/1    00:00:00 /home/info/gaussdb/program/bin/gaussdb
info       835   738  0 19:33 ?        00:00:00 gaussdb: logger process        
info       882   738  0 19:33 ?        00:00:00 gaussdb: checkpointer process  
info       883   738  0 19:33 ?        00:00:00 gaussdb: writer process        
info       884   738  0 19:33 ?        00:00:00 gaussdb: wal writer process    
info       885   738  0 19:33 ?        00:00:00 gaussdb: archiver process   last was 00000003.history
info       886   738  0 19:33 ?        00:00:00 gaussdb: stats collector process
info       887   738  0 19:33 ?        00:00:00 gaussdb: auditor process       
info       888   738  0 19:33 pts/1    00:00:00 gaussdb: job scheduler process 

可能原因
以下两种情况可能引发上面的错误:

情况一:在使用gs_ctl start指定-t参数时,此参数值比较小,命令如下:

gs_ctl start -t 1.1 说明

  • 此时数据库超时时间设为1.1秒,但是数据库在1.1秒内无法完成正常启动,并返回出错提示信息。但数据库超时之后会继续启动,并最终启动成功。
  • 如果-t参数值小于1秒,则数据库启动默认为不等待,立刻返回数据库正在启动的提示信息。

情况二:磁盘IO繁忙,数据库gaussmaster进程进入正常监听的时间超出指定时间(默认为60秒)。此时查看数据库进程发现只有gaussmaster进程:

info@suse11sp1x64:~/gaussdb> ps -ef|grep gaussdb
info       738     1  0 19:30 pts/1    00:00:00 /home/info/gaussdb/program/bin/gaussdb

经过一段时间之后,数据库进程全部拉起并启动成功:

info@suse11sp1x64:~/gaussdb> ps -ef|grep gaussdb
info       738     1  0 19:30 pts/1    00:00:00 /home/info/gaussdb/program/bin/gaussdb
info       835   738  0 19:33 ?        00:00:00 gaussdb: logger process        
info       882   738  0 19:33 ?        00:00:00 gaussdb: checkpointer process  
info       883   738  0 19:33 ?        00:00:00 gaussdb: writer process        
info       884   738  0 19:33 ?        00:00:00 gaussdb: wal writer process    
info       885   738  0 19:33 ?        00:00:00 gaussdb: archiver process   last was 00000003.history
info       886   738  0 19:33 ?        00:00:00 gaussdb: stats collector process
info       887   738  0 19:33 ?        00:00:00 gaussdb: auditor process       
info       888   738  0 19:33 pts/1    00:00:00 gaussdb: job scheduler process 

处理步骤
发生此现象的原因是GaussDB的启动超时机制,当发生以上问题时,建议您检查启动时间是否太小,或者退出不需要的程序,减少磁盘IO阻塞。

启动超时机制:在GaussDB启动时,如果超出指定时间(默认为60秒)未启动,则进行超时处理,提示用户启动失败(实质性延期后可能已经启动了)。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值