HAWQ停止群集失败

  • 本文关键字:失败 群集 HAWQ hawq
  • 更新时间 :
  • 英文 :


i从源代码安装了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>

关于此错误的任何内容都是有帮助的。谢谢!

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

解决方案是:

pip install pygresql==4.2.2

在停止群集之前,如果不是'-m即时'停止,HAWQ将连接到数据库以检查运行连接。

从您的日志中,由于Python模块问题,与主节点的连接失败了。似乎PygreSQL模块未正确安装。请尝试重新安装它。

相关内容

  • 没有找到相关文章

最新更新