安装greenplum-cc-web工具出现-error on command: PGPORT=5432 gpconfig -c gp_enable_gpperfmon -v on

安装greenplum-cc-web工具执行gpperfmon_install命令

[gpadmin@localhost ~]$ gpperfmon_install --enable --password gpmon --port 5432
20180730:18:15:14:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-createdb gpperfmon >& /dev/null
20180730:18:15:15:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-PGPORT=5432 psql -f /usr/local/greenplum-db/./lib/gpperfmon/gpperfmon.sql gpperfmon >& /dev/null
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-PGPORT=5432 psql template1 -c "DROP ROLE IF EXISTS gpmon"  >& /dev/null
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-PGPORT=5432 psql template1 -c "CREATE ROLE gpmon WITH SUPERUSER CREATEDB LOGIN ENCRYPTED PASSWORD 'gpmon'"  >& /dev/null
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-echo "local    gpperfmon         gpmon         md5" >> /data/gpdata/master/gpseg-1/pg_hba.conf
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-echo "host     all         gpmon         127.0.0.1/28    md5" >> /data/gpdata/master/gpseg-1/pg_hba.conf
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-echo "host     all         gpmon         ::1/128    md5" >> /data/gpdata/master/gpseg-1/pg_hba.conf
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-touch /home/gpadmin/.pgpass >& /dev/null
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-mv -f /home/gpadmin/.pgpass /home/gpadmin/.pgpass.1532945714 >& /dev/null
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-echo "*:5432:gpperfmon:gpmon:gpmon" >> /home/gpadmin/.pgpass
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-cat /home/gpadmin/.pgpass.1532945714 >> /home/gpadmin/.pgpass
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-chmod 0600 /home/gpadmin/.pgpass >& /dev/null
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[INFO]:-PGPORT=5432 gpconfig -c gp_enable_gpperfmon -v on >& /dev/null
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[ERROR]:-error on command: PGPORT=5432 gpconfig -c gp_enable_gpperfmon -v on
20180730:18:15:16:029823 gpperfmon_install:localhost:gpadmin-[ERROR]:-gpperfmon not successfully installed

出现错误-error on command: PGPORT=5432 gpconfig -c gp_enable_gpperfmon -v on,解决方法:

网上搜不到解决方案,尝试单独直接执行命令gpconfig -c gp_enable_gpperfmon -v on,出现如下错误:
[gpadmin@localhost ~]$ gpconfig -c gp_enable_gpperfmon -v on
20180730:18:16:16:029940 gpconfig:localhost:gpadmin-[ERROR]:-FATAL:  database "testdb" does not exist
20180730:18:16:16:029940 gpconfig:localhost:gpadmin-[ERROR]:-Failed to connect to database, exiting without action. This script can only be run when the database is up.
Failed to connect to database, exiting without action. This script can only be run when the database is up.

恍然大悟,总算有点眉头

这是因为环境变量里面设置了export PGDATABASE=testdb,而gpdb中不存在这个库,导致连接不上数据库,从而导致gpconfig -c gp_enable_gpperfmon -v on命令执行错误,解决方案:

1、修改环境变量为:export PGDATABASE=postgres
2、删除gpdb中由于执行gpperfmon_install建立的库
3、重新执行gpperfmon_install --enable --password gpmon --port 5432
成功,重启gpdb,执行ps -ef | grep gpmmon,数据采集代理启动成功

这里记录一下,备忘

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值