HAWQ停止集群失败

时间:2016-12-17 12:20:03

标签: hawq

我从源代码安装了HAWQ。初始化并启动HAWQ群集后,我尝试使用"hawq stop cluster"停止它。然而,它失败了。

错误显示:

[hadoop@Master ~]$ hawq stop cluster 
20161217:19:59:31:004594 hawq_stop:Master:hadoop-[INFO]:-Prepare to do 'hawq stop'
20161217:19:59:31:004594 hawq_stop:Master:hadoop-[INFO]:-You can check log in /home/hadoop/hawqAdminLogs/hawq_stop_20161217.log
20161217:19:59:31:004594 hawq_stop:Master:hadoop-[INFO]:-Stop hawq with args: ['stop', 'cluster']

Continue with HAWQ service stop Yy|Nn (default=N):

20161217:19:59:38:004594 hawq_stop:Master:hadoop-[INFO]:-No standby host configured
20161217:19:59:38:004594 hawq_stop:Master:hadoop-[INFO]:-Stop hawq cluster
Traceback (most recent call last):
  File "/home/hadoop/hawq/bin/hawq_ctl", line 1276, in <module>
    stop_hawq(opts, hawq_dict)
  File "/home/hadoop/hawq/bin/hawq_ctl", line 1043, in stop_hawq
    instance.run()
  File "/home/hadoop/hawq/bin/hawq_ctl", line 891, in run
    check_return_code(self._stopAll())
  File "/home/hadoop/hawq/bin/hawq_ctl", line 816, in _stopAll
    master_result = self._stop_master()
  File "/home/hadoop/hawq/bin/hawq_ctl", line 760, in _stop_master
    self._stop_master_checks()
  File "/home/hadoop/hawq/bin/hawq_ctl", line 712, in _stop_master_checks
    self.conn = dbconn.connect(self.dburl, utility=True)
  File "/home/hadoop/hawq/lib/python/gppylib/db/dbconn.py", line 211, in connect
    cnx  = pgdb._connect_(cstr, dbhost, dbport, dbopt, dbtty, dbuser, dbpasswd)
AttributeError: 'module' object has no attribute '_connect_'

目前,我使用了另一种方法来停止群集,即使用pg_ctl分别停止主要和细分。

pg_ctl stop -D <master_data_dir>/<segment_data_dir>

有关此错误的任何信息都很有帮助。谢谢!

2 个答案:

答案 0 :(得分:1)

因为直接使用命令“pip install pygresql”,它将安装最新版本(5.0.3) pygresql。在上述错误中,pgdb._connect_()旧版本(4.2.2)例程,在5.0.3中是pgdb._connect()

解决方案是:

pip install pygresql==4.2.2

答案 1 :(得分:0)

在停止群集之前,如果它没有立即&#39; -M立即&#39;停止,hawq将连接到数据库以检查运行连接。

由于python模块问题,从您的日志中,与主节点的连接失败。好像pygresql模块安装不正确。请尝试重新安装。