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"
.$ gpconfig -c gp_resource_manager -v "group"
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 and workload manager extension shared libraries. Make sure these libraries are still present:$ gpconfig -s shared_preload_libraries Values on all segments are consistent GUC : shared_preload_libraries Master value: $libdir/metrics_collector,$libdir/gp_wlm Segment value: $libdir/metrics_collector,$libdir/gp_wlm
Check that the shared libraries exist at
$GPHOME/lib/postgresql/metrics_collector.so
and$GPHOME/lib/postgresql/gp_wlm.so
. If the libraries do not exist, make sure you have installed the Pivotal Greenplum Database distribution. These extensions are not available in the Greenplum Database Open Source version.If the shared library files exist in the
$GPHOME/lib/postgresql
directory, but not in theshared_preload_libraries
parameter, add them with thegpconfig
command:$ gpconfig -c shared_preload_libraries -v '\$libdir/metrics_collector,\$libdir/gp_wlm'
Note that adding the libraries 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.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 postgres \dx postgres=# \dx List of installed extensions Name | Version | Schema | Description --------+---------+--------+-------------------------------------- gp_wlm | 0.1 | gpcc | Greenplum Workload Manager Extension
Make sure the
gpcc.workload_config
table and functions are present in the postgres database:$ psql postgres postgres=# \d gpcc.* Table "gpcc.workload_config" Column | Type | Modifiers ----------+---------+----------- dist_col | integer | config | json | Distributed by: (dist_col) postgres=# \df gpcc.* List of functions Schema | Name | Result data type | Argument data types | Type --------+---------------------+------------------+----------------------+------- gpcc | get_workload_config | json | | normal gpcc | set_workload_config | boolean | wlm_json_config json | normal (2 rows)
If the
gpcc.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 thegpcc.workload_config
table will have to be recreated in Command Center.$ psql postgres postgres=# DROP EXTENSION gp_wlm; DROP EXTENSION postgres=# CREATE EXTENSION gp_wlm; CREATE EXTENSION