hawq state 报错: the database is down, but Ambari shows all hawq services as being

本文解决了一个关于Pivotal HDB (HAWQ) 2.x版本的问题,该问题表现为Ambari显示服务正常运行,而HAWQ状态检查却失败。通过对pg_hba.conf配置文件的调整及服务重启,最终解决了这一矛盾状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

此问题官方有给出解决方案:https://discuss.pivotal.io/hc/en-us/articles/221826748-Pivotal-HDB-state-indicates-the-database-is-down-but-Ambari-shows-all-Pivotal-HDB-services-as-being-up


Environment

ProductVersion
Pivotal HDB (HAWQ)2.x

Symptom

Pivotal HDB shows as "up" in Ambari: 

However, the following issues are seen:

  • HAWQ state fails with the following:
[gpadmin@hdm1 ~]$ hawq state
Failed to connect to database, this script can only be run when the database is up.
[gpadmin@hdm1 ~]$
  • Stopping HAWQ via command line or Ambari fails with the following: 
20160630:05:45:42:039364 hawq_stop:hdm1:gpadmin-[ERROR]:-Failed to connect to the running database, please check master status

Error Message:

The HAWQ master log will show errors similar to this:

[gpadmin@hdm1 pg_log]$ grep -i /data/hawq/master/pg_log/hba hawq-2016-06-30_044655.csv
2016-06-30 05:44:03.818472 PDT,"gpadmin","template1",p38928,th1711609984,"172.28.21.118","51844",2016-06-30 05:44:03 PDT,0,,,seg-10000,,,,,"FATAL","28000","no pg_hba.conf entry for host ""172.28.21.118"", user ""gpadmin"", database ""template1"", SSL off",,,,,,,0,,"auth.c",603,
2016-06-30 05:45:42.491576 PDT,"gpadmin","template1",p39401,th1711609984,"172.28.21.118","51874",2016-06-30 05:45:42 PDT,0,,,seg-10000,,,,,"FATAL","28000","no pg_hba.conf entry for host ""172.28.21.118"", user ""gpadmin"", database ""template1"", SSL off",,,,,,,0,,"auth.c",603,
[gpadmin@hdm1 pg_log]$

Cause

pg_hba.conf is set up incorrectly, so gpadmin does not have access to template1 from the HAWQ master host.


Resolution

Review the pg_hba.conf and the Pivotal HDB Allowing connections to HAWQ documentation to allow gpadmin access to database "template1" from the HAWQ master.

个人解决方法:

1、查看 /data/hawq/master/pg_hba.conf 文件被人修改过,添加了有两条重复记录,注释掉以后,重启mater成功。

2、通过ambari重启所有服务,部分segment 执行stop命令失败,手动执行:

hawq stop segment -M immediate

        成功,执行:

        hawq start segment 成功。






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值