原 GreenPlum初始化时一直卡住“Completed restart of Greenplum instance in production mode”,psql postgres 命令也一直卡住,警告Failed to connect to template1
Tags: 原创故障处理GreenPlum数据库初始化Failed to connect to template1Timeout expired connecting to template1
问题
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | [gpadmin@master ~]$ gpinitsystem -c gpconfigs/gpinitsystem_config -h gpconfigs/gpinitsystem_hostfile 20210302:09:48:54:017684 gpinitsystem:master:gpadmin-[INFO]:-Checking configuration parameters, please wait... 20210302:09:48:54:017684 gpinitsystem:master:gpadmin-[INFO]:-Reading Greenplum configuration file gpconfigs/gpinitsystem_config 20210302:09:48:54:017684 gpinitsystem:master:gpadmin-[INFO]:-Locale has not been set in gpconfigs/gpinitsystem_config, will set to default value 20210302:09:48:55:017684 gpinitsystem:master:gpadmin-[INFO]:-Locale set to en_US.utf8 。。。。。。。。。。。。。。。 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:-Process results... 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:----------------------------------------------------- 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:- Successful segment starts = 3 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:- Failed segment starts = 0 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:- Skipped segment starts (segments are marked down in configuration) = 0 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:----------------------------------------------------- 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:-Successfully started 3 of 3 segment instances 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:----------------------------------------------------- 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:-Starting Master instance master directory /home/gpadmin/data/master/gpseg-1 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:-Command pg_ctl reports Master master instance active 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:-Connecting to dbname='template1' connect_timeout=15 20210302:10:02:23:020392 gpstart:master:gpadmin-[WARNING]:-Timeout expired connecting to template1, attempt 1/4 20210302:10:02:38:020392 gpstart:master:gpadmin-[WARNING]:-Timeout expired connecting to template1, attempt 2/4 20210302:10:02:53:020392 gpstart:master:gpadmin-[WARNING]:-Timeout expired connecting to template1, attempt 3/4 20210302:10:03:08:020392 gpstart:master:gpadmin-[WARNING]:-Timeout expired connecting to template1, attempt 4/4 20210302:10:03:08:020392 gpstart:master:gpadmin-[WARNING]:-Failed to connect to template1 20210302:10:03:08:020392 gpstart:master:gpadmin-[INFO]:-No standby master configured. skipping... 20210302:10:03:08:020392 gpstart:master:gpadmin-[INFO]:-Check status of database with gpstate utility 20210302:10:03:09:017684 gpinitsystem:master:gpadmin-[INFO]:-Completed restart of Greenplum instance in production mode |
主要报错:
1 2 3 4 5 6 | 20210302:10:02:08:020392 gpstart:master:gpadmin-[INFO]:-Connecting to dbname='template1' connect_timeout=15 20210302:10:02:23:020392 gpstart:master:gpadmin-[WARNING]:-Timeout expired connecting to template1, attempt 1/4 20210302:10:02:38:020392 gpstart:master:gpadmin-[WARNING]:-Timeout expired connecting to template1, attempt 2/4 20210302:10:02:53:020392 gpstart:master:gpadmin-[WARNING]:-Timeout expired connecting to template1, attempt 3/4 20210302:10:03:08:020392 gpstart:master:gpadmin-[WARNING]:-Timeout expired connecting to template1, attempt 4/4 20210302:10:03:08:020392 gpstart:master:gpadmin-[WARNING]:-Failed to connect to template1 |
原因1
集群中有某个segment节点的防火墙没有关闭,直接关闭该节点的防火墙后原程序会继续执行的。
在某些情况下,防火墙会自动启动,所以会导致我们的GreenPlum安装失败,所以,可以做如下操作:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config setenforce 0 systemctl unmask firewalld.service systemctl start firewalld.service firewall-cmd --add-port=0-65535/tcp --permanent firewall-cmd --add-port=0-65535/udp --permanent firewall-cmd --reload firewall-cmd --list-ports systemctl stop firewalld.service systemctl disable firewalld.service systemctl mask firewalld.service systemctl status firewalld.service |