GPCC安装以及踩坑经历

gpcc安装以及踩坑经历

官方下载地址文档

https://network.pivotal.io/products/pivotal-gpdb#/releases/29190
安装开始之前 
chown gpadmin:gpadmin /usr/local
安装完成之后
chown root:root /usr/local

添加访问权限

vim /opt/greenplum/data/master/gpseg-1/pg_hba.conf

local      gpperfmon     gpmon                 md5
host       all           gpmon  127.0.0.1/28   md5
host       all           gpmon  ::1/128        md5
host       all           gpmon  samenet        md5

编辑环境变量

vim ~/.bashrc

source /usr/local/greenplum-cc-web-6.0.0/gpcc_path.sh 
srouce /usr/local/greenplum-db/greenplum_path.sh
export MASTER_DATA_DIRECTORY=/opt/greenplum/data/master/gpseg-1

gpscp -f /home/gpadmin/conf/seg_hosts ~/.bashrc =:~/

修改密码

alter role gpmon with password 'xxx';

启动gpcc
gpcc start -W
gpcc stop -W

本文最大的锅,最大的坑来了

安装完成之后会报以下错误!你可以完全忽略错误的解决过程直接跳到最后!

Metrics_collector还没有添加到共享预加载库(shared_preload_libraries)中。请添加它以启用指标收集。详见文档。
error alert message,
必须打开GUC gp_enable_query_metrics来启用指标收集。详见文档。

第一个问题解决

gpconfig -l
gpconfig -c gp_enable_query_metrics -v on  成功

第二个问题百思不得其解!
网上查询的版本均为6.0以下版本

查看状态
gpconfig -s shared_preload_libraries
 
gpconfig -c shared_preload_libraries -v '\$libdir/metrics_collector,\$libdir/gp_wlm' 

然后greenplum系统直接崩溃掉,全部注释掉才能重新启动greenplum

然后翻看官方文档

https://gpcc.docs.pivotal.io/610/topics/troubleshooting-wlm.html

pg_config |grep LIBDIR 这个也可以看目录,但是完全不是一码事!

Command Center requires the Apache Portable Runtime Utility library. The library is no longer included in the Greenplum Database lib directory, but it is installed as a dependency if you install the Greenplum Database distribution with yum or apt. Run the command yum install apr-util or apt install libapr1 if you need to install the apr-util library.

人家压根就不需要装这玩意!!!!

最后翻文档

https://gpcc.docs.pivotal.io/610/topics/troubleshooting-wlm.html

After installing a Pivotal Greenplum Database distribution, the shared_preload_libraries configuration parameter contains the metrics collector shared library. Make sure this library is still present:

$ gpconfig -s shared_preload_libraries
Values on all segments are consistent
GUC          : shared_preload_libraries
Master  value: metrics_collector
Segment value: metrics_collector
Check that the shared library exists at $GPHOME/lib/postgresql/metrics_collector.so. If the library does not exist, make sure you have installed the Pivotal Greenplum Database distribution. This extension is not available in the Greenplum Database Open Source version.

If the shared library file exists in the $GPHOME/lib/postgresql directory, but not in the shared_preload_libraries parameter, add it with the gpconfig command:

$ gpconfig -c shared_preload_libraries -v 'metrics_collector'
Note that adding metrics_collector to the shared_preload_libraries parameter does not enable the metrics_collector or gp_wlm extensions, but is a prerequisite for enabling them.

The gpmon user must be able to connect to databases from the Command Center host. Make sure to add a host entry like the following in the $MASTER_DATA_DIRECTORY/pg_hba.conf file.

看到了没有!有两个版本!一个是Pivotal Greenplum Database distribution,一个是Greenplum Database Open Source version!

在Greenplum Database Open Source version 这个版本中$GPHOME/lib/postgresql/metrics_collector.so这个文件压根就没有!!!!
因此想要体验更多的功能,必须下载Pivotal Greenplum Database distribution!

下载地址为:

https://network.pivotal.io/products/pivotal-gpdb#/releases/495851/file_groups/2253

这就是这次的坑!!!装完Pivotal Greenplum Database distribution这个版本之后再安装GPCC,啥错误都不见了!!!!

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值