I am sure that there are no extra spaces before or after your hostname(S) in the host file, and using ssh mdw
can connect to mdw
.
The /etc/hosts
is like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
The error log:
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!
please.
Advertisement
Answer
How many hosts there are in your greenplum. Your /etc/hosts
doesn’t contain any information about mdw
and sdw
.
Assume you have two hosts named mdw
and sdw1
in your greenplum, both of the /etc/hosts
files should be like this:
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
Replace the ip and host name with your own. Before try gpinitsystem
again, you’d make sure you have performed gpssh-exkeys
succesfully.
UPDATE:
I helped him with this issue using Skype. The answer is that his gpadmin
account had no privilege to call ping
utility, cause gpinitsystem
calls ping
to ensure any host in the DBMS exists.