在Centos7.1上构建孵化器-hawq之后,我尝试初始化它。但会出现以下错误:
20160516:18:10:43:002036 hawqinit.sh:host-172-16-0-105:hawqadmin-[INFO]:-Loading hawq_toolkit...
ALTER ROLE
20160516:18:10:44:001766 hawq_init:host-172-16-0-105:hawqadmin-[INFO]:-20160516:18:10:43:002036 hawqinit.sh:host-172-16-0-105:hawqadmin-[INFO]:-Loading hawq_toolkit...
20160516:18:10:44:001766 hawq_init:host-172-16-0-105:hawqadmin-[INFO]:-Master init successfully
20160516:18:10:44:001766 hawq_init:host-172-16-0-105:hawqadmin-[INFO]:-Init segments in list: ['hawq-master']
20160516:18:10:44:001766 hawq_init:host-172-16-0-105:hawqadmin-[DEBUG]:-Start to init segment on node 'hawq-master'
20160516:18:10:44:001766 hawq_init:host-172-16-0-105:hawqadmin-[INFO]:-Total segment number is: 1
fgets failure: Success
The program "postgres" is needed by initdb but was either not found in the same directory as "/usr/hawq/bin/initdb" or failed unexpectedly.
Check your installation; "postgres -V" may have more information.
20160516:18:10:45:002318 hawqinit.sh:host-172-16-0-105:hawqadmin-[ERROR]:-Postgres initdb failed
20160516:18:10:45:002318 hawqinit.sh:host-172-16-0-105:hawqadmin-[ERROR]:-Segment init failed on host-172-16-0-105
20160516:18:10:45:001766 hawq_init:host-172-16-0-105:hawqadmin-[INFO]:-20160516:18:10:45:002318 hawqinit.sh:host-172-16-0-105:hawqadmin-[ERROR]:-Postgres initdb failed
20160516:18:10:45:002318 hawqinit.sh:host-172-16-0-105:hawqadmin-[ERROR]:-Segment init failed on host-172-16-0-105
20160516:18:10:45:001766 hawq_init:host-172-16-0-105:hawqadmin-[ERROR]:-HAWQ init failed on hawq-master
20160516:18:10:46:001766 hawq_init:host-172-16-0-105:hawqadmin-[INFO]:-0 of 1 segments init successfully
20160516:18:10:46:001766 hawq_init:host-172-16-0-105:hawqadmin-[ERROR]:-Segments init failed, exit当我键入该命令时,将显示以下内容:
[hawqadmin@host-172-16-0-105 hawqAdminLogs]$ postgres -V
postgres (HAWQ) 8.2.15有什么建议吗?谢谢!
发布于 2016-07-04 14:55:18
如果"postgres -V“有效,这意味着postgres二进制文件是好的。
在hawq初始化集群之前,请确保:
1) greenplum_path.sh中的$GPHOME正确设置为hawq二进制文件的目录,即本例中为/usr/hawq
2)来源:$GPHOME/greenplum_path.sh
3)检查initdb和postgres二进制文件是否在$GPHOME/bin中
发布于 2016-07-04 17:10:37
从你上面粘贴的错误中,有两个可能的原因:
(1)调用的二进制postgres不是/usr/hawq/bin/postgres,可以使用which postgres检查路径。
(2) postgres的依赖库可能是错误的。您可以使用ldd for linux或otool for mac来打印所有依赖的lib路径,并检查它们。
此外,如果在初始化hawq时出现错误,请查看~/hawqAdminLogs/中的日志,您可以找到具体的错误信息。
希望它能帮助你找出根本原因。
发布于 2017-03-27 15:35:45
最近,我在初始化集群时遇到了同样的错误。
Postgres -V显示了正确的版本,which postgres显示了/usr/local/hawq/bin/postgres,而且路径已经设置,仍然面临上面的错误。
最后通过将LD_LIBRARY_PATH设置为/usr/local/hawq/lib/并通过.bashrc文件获取它来解析。
https://stackoverflow.com/questions/37253057
复制相似问题