gpinitsystem 未知主机 mdw

gpinitsystem unknown host mdw

我确定主机文件中您的主机名前后没有多余的空格,使用ssh mdw可以连接到mdw/etc/hosts 是这样的:

 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

错误日志:

20161209:21:01:14:030310 gpinitsystem:mdw:gpadmin-[INFO]:-Checking configuration parameters, please wait...
20161209:21:01:14:030310 gpinitsystem:mdw:gpadmin-[INFO]:-Reading Greenplum configuration file /home/gpadmin/gpconfigs/gpinitsystem_config
20161209:21:01:14:030310 gpinitsystem:mdw:gpadmin-[INFO]:-Locale has not been set in /home/gpadmin/gpconfigs/gpinitsystem_config, will set to default value
20161209:21:01:14:030310 gpinitsystem:mdw:gpadmin-[INFO]:-Locale set to en_US.utf8
20161209:21:01:15:030310 gpinitsystem:mdw:gpadmin-[INFO]:-MASTER_MAX_CONNECT not set, will set to default value 250
20161209:21:01:15:030310 gpinitsystem:mdw:gpadmin-[INFO]:-Checking configuration parameters, Completed
20161209:21:01:15:030310 gpinitsystem:mdw:gpadmin-[INFO]:-Commencing multi-home checks, please wait...
.20161209:21:01:17:gpinitsystem:mdw:gpadmin-[FATAL]:-Unknown host mdw Script Exiting!

请。

你的greenplum中有多少台主机。您的 /etc/hosts 不包含任何关于 mdwsdw 的信息。

假设您的 greenplum 中有两个名为 mdwsdw1 的主机,两个 /etc/hosts 文件都应如下所示:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

172.31.25.24 mdw
172.31.16.170 sdw1

用你自己的替换ip和主机名。在再次尝试 gpinitsystem 之前,请确保您已成功执行 gpssh-exkeys

更新:

我使用 Skype 帮助他解决了这个问题。答案是他的 gpadmin 帐户没有调用 ping 实用程序的权限,导致 gpinitsystem 调用 ping 以确保 DBMS 中的任何主机都存在。