Troubleshooting Enabling Resource Groups
If you experience problems enabling resource groups in Greenplum Command Center, review the following list to ensure prerequisites are met and all of the dependencies are properly configured.
- Red Hat 6.x and 7.x and CentOS 6.x and 7.x are currently supported.
- You must be running Greenplum Database version 5.7.0 or later.
- Configure the Linux cgroups kernel feature on your hosts by following the instructions at “Prerequisite” in Using Resource Groups.
Make sure the
/etc/cgconfig.d/gpdb.conf
file contains the objects perm, cpu, and cpuacct. If the document is incorrect and thegp_resource_manager
configuration parameter is set to"group"
, Greenplum Database can hang at startup.group gpdb { perm { task { uid = gpadmin; gid = gpadmin; } admin { uid = gpadmin; gid = gpadmin; } } cpu { } cpuacct { } }
On Red Hat 7, make sure you run
cgconfigparser -L /etc/cgconfig.d
to parse changes to the/etc/cgconfig.d/gpdb.conf
file. This command must also be set up to run at boot time.Set the Greenplum Database
gp_resource_manager
server configuration parameter to"group"
and restart Greenplum Database.$ gpconfig -c gp_resource_manager -v "group" $ gpstop -ar
Verify by showing the value of the parameter:
$ gpconfig -s gp_resource_manager Values on all segments are consistent GUC : gp_resource_manager Master value: group Segment value: group
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 theshared_preload_libraries
parameter, add it with thegpconfig
command:$ gpconfig -c shared_preload_libraries -v 'metrics_collector'
Note that adding
metrics_collector
to theshared_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.host all gpmon <IP_of_host>/32 md5
Check whether the
gp_wlm
extension is installed. The extension is added when you click Enable Workloads in the Greenplum Command Center Admin> Workload Mgmt view.$ psql gpperfmon \dx gpperfmon=# \dx List of installed extensions Name | Version | Schema | Description -------------------+---------+------------+--------------------------------------- gp_wlm | 0.1 | gpmetrics | Greenplum Workload Manager Extension metrics_collector | 1.0 | gpmetrics | Greenplum Metrics Collector Extension plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language (3 rows)
Make sure the
gpmetrics.workload_config
table and functions are present in the gpperfmon database:gpperfmon=# \d gpmetrics.workload_config Table "gpmetrics.workload_config" Column | Type | Modifiers ----------+---------+----------- dist_col | integer | config | json | Distributed by: (dist_col) gpperfmon=# \df gpmetrics.* List of functions Schema | Name | Result data type | Argument data types | Type -----------+--------------------------------+------------------+----------------------+-------- gpmetrics | get_workload_config | json | | normal gpmetrics | metrics_collector_start_worker | void | | normal gpmetrics | set_workload_config | boolean | wlm_json_config json | normal (3 rows)
If the
gpmetrics.workload_config
table or the functions are not present, dropping and recreating the gp_wlm extension will create them. Note that any assignment rules saved in thegpmetrics.workload_config
table will have to be recreated in Command Center.$ psql gpperfmon gpperfmon=# DROP EXTENSION gp_wlm; DROP EXTENSION gpperfmon=# CREATE EXTENSION gp_wlm; CREATE EXTENSION