在Centos7.1上构建孵化器-hawq之后,我尝试初始化它。但是下面的错误发生了:
@Configuration
当我输入命令时,下面显示:
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
有什么建议吗?谢谢!
答案 0 :(得分:1)
如果" postgres -V"有效,这意味着postgres二进制文件很好。
在你做" hawq init cluster"之前,请确保:
1)greenplum_path.sh中的$ GPHOME被正确设置为hawq二进制文件的目录,即你的情况下的/ usr / hawq
2)来源$ GPHOME / greenplum_path.sh
3)检查initdb和postgres二进制文件是否在$ GPHOME / bin
中答案 1 :(得分:1)
根据您上面粘贴的错误,有两个可能的原因:
(1)调用的二进制postgres
不是/usr/hawq/bin/postgres
,您可以使用which postgres
来检查路径。
(2)postgres的依赖lib可能是错误的。您可以使用ldd
用于linux或otool
用于mac来打印所有相关的lib路径,并检查它们。
此外,如果init hawq出现任何错误,请检查登录~/hawqAdminLogs/
,您可能会发现具体的错误消息。
希望它能帮助您找出根本原因。
答案 2 :(得分:1)
最近我在初始化群集时遇到了同样的错误
Postgres -V
显示正确的版本,which postgres
显示/usr/local/hawq/bin/postgres
,路径已设置,仍然面临错误。
最后通过将LD_LIBRARY_PATH
设置为/usr/local/hawq/lib/
并通过.bashrc
文件获取来解决。
答案 3 :(得分:0)
看起来您可能已在不同目录中安装了hawq二进制文件。请检查以下
1.确保您拥有所有正确的PATH设置
答案 4 :(得分:0)