无法在 Centos 7 集群的 Greenplum 开源数据库上设置 Greenplum 命令中心 Web 应用程序的实例

Posted

技术标签:

【中文标题】无法在 Centos 7 集群的 Greenplum 开源数据库上设置 Greenplum 命令中心 Web 应用程序的实例【英文标题】:Cannot Setup Instance of Greenplum Command Center Web Application on Greenplum Open Source Database with Centos 7 Cluster 【发布时间】:2016-03-14 20:41:39 【问题描述】:

我在 3 节点 Centos 7 集群上运行了 Greenplum 开源数据库。数据库正在运行,我能够连接并运行查询。 Greenplum Command Center 2.0 的安装工作。当我尝试使用

为 Web 设备部件配置实例时
gpcmdr --setup

我收到以下错误:

Creating instance schema in GPDB.  Please wait ...
Failed to setup Command Center instance [myCustomInstance]: 
Exception encountered while fetching GPDB version info Connection error for query select version();: 
FATAL:  Ident authentication failed for user "gpmon"

这是我用于测试目的的 pg_hba.conf 文件。即使使用 host all all ::1/128 trust

,这仍然会产生上述错误
# IPv6 local connections:
local    all         gpadmin         ident
host     all         gpadmin         127.0.0.1/28    trust
host     all         gpadmin         172.17.0.1/32       trust
host     all         gpadmin         192.168.65.90/32       trust
host     all         gpadmin         192.168.122.1/32       trust
host     all         gpadmin         ::1/128       trust
host     all         gpadmin         fe80::210:18ff:fe94:3768/128       trust
host     all         gpadmin         fe80::42:11ff:fea9:f1df/128       trust
host     all         gpadmin         fe80::b84c:8bff:fe4a:5ce2/128       trust
host     all         gpadmin         fe80::419:d7ff:fe90:6c48/128       trust
host     all         gpadmin         fe80::c0ff:81ff:feae:c1ec/128       trust
local    replication gpadmin         ident
host     replication gpadmin         samenet       trust
local    gpperfmon         gpmon         md5
host     all         gpmon         0.0.0.0/0    md5
host all gpmon ::1/128 md5    
host all all ::1/128 trust

在最后一行之前的 host all gpmon ::1/128 md5 中添加。重新启动数据库并重新运行 gpcmdr --setup。以下是日志文件

gpperfmon/日志

2016-03-14 20:37:19|:-LOG: sounds like you have just upgraded your database, creating newer tables
2016-03-14 20:37:19|:-WARNING: [gpmondb.c:55] failed to execut query 'BEGIN;  CREATE TABLE public.log_alert_history (LIKE gp_toolkit.__gp_log_master_ext) DISTRIBUTED BY (logtime) PARTITION BY range (logtime)(START (date '2010-01-01') END (date '2010-02-01') EVERY (interval '1 month')); COMMIT;': ERROR:  relation "gp_toolkit.__gp_log_master_ext" does not exist
2016-03-14 20:37:19|:-WARNING: [gpmondb.c:1695] gpdb error ERROR:  current transaction is aborted, commands ignored until end of transaction block
query: SELECT encoding FROM pg_catalog.pg_database d WHERE d.datname = 'gpperfmon'
2016-03-14 20:37:19|:-WARNING: [gpmondb.c:1769] gpdb failed to get server encoding.

pg_logs/gpdb-2016-03-14_203718.csv

2016-03-14 20:39:15.586557 EDT,"gpmon","gpperfmon",p11521,th-217848000,"[local]",,2016-03-14 20:39:15 EDT,89956,con25,cmd1,seg-1,,dx64,x89956,sx1,"LOG","00000","statement: SELECT sess_id, current_query FROM pg_stat_activity;",,,,,,"SELECT sess_id, current_query FROM pg_stat_activity;",0,,"postgres.c",1553,
2016-03-14 20:39:19.595436 EDT,"gpmon","gpperfmon",p11574,th-217848000,"[local]",,2016-03-14 20:39:19 EDT,89958,con26,cmd1,seg-1,,dx65,x89958,sx1,"LOG","00000","statement: insert into system_history select * from _system_tail;",,,,,,"insert into system_history select * from _system_tail;",0,,"postgres.c",1553,
2016-03-14 20:39:19.628287 EDT,"gpmon","gpperfmon",p11580,th-217848000,"[local]",,2016-03-14 20:39:19 EDT,89958,con26,cmd2,seg-1,slice1,dx65,x89958,sx1,"LOG","00000","statement: insert into system_history select * from _system_tail;",,,,,,"insert into system_history select * from _system_tail;",0,,"postgres.c",1096,
2016-03-14 20:39:19.681179 EDT,"gpmon","gpperfmon",p11588,th-217848000,"[local]",,2016-03-14 20:39:19 EDT,89961,con28,cmd1,seg-1,,dx66,x89961,sx1,"LOG","00000","statement: insert into queries_history select * from _queries_tail;",,,,,,"insert into queries_history select * from _queries_tail;",0,,"postgres.c",1553,
2016-03-14 20:39:19.713717 EDT,"gpmon","gpperfmon",p11594,th-217848000,"[local]",,2016-03-14 20:39:19 EDT,89961,con28,cmd2,seg-1,slice1,dx66,x89961,sx1,"LOG","00000","statement: insert into queries_history select * from _queries_tail;",,,,,,"insert into queries_history select * from _queries_tail;",0,,"postgres.c",1096,

【问题讨论】:

尝试在最后一行前添加host all gpmon ::1/128 md5 还要检查 GPDB 数据库日志中的错误消息并更新添加它的问题 【参考方案1】:

好像gp_toolkit.__gp_log_master_ext 不存在。该表是在 gpdb 生成其架构时创建的。请你试试 "\d gp_toolkit.__gp_log_master_ext"在gpdb中看看表是否规范化了?

【讨论】:

以上是关于无法在 Centos 7 集群的 Greenplum 开源数据库上设置 Greenplum 命令中心 Web 应用程序的实例的主要内容,如果未能解决你的问题,请参考以下文章

CentOS 7 corosync高可用集群的实现

CentOS7 集群搭建

CentOS7.6无法开机。

CentOS 7上设置RabbitMQ集群

CentOS 7 安装 Zookeeper + Kafka 集群

CentOS 7.3 部署LVS 集群