The gpccws web server binary and web application files are installed in the bin directory of your Greenplum Command Center installation.

Starting and Stopping the Web Server

Starting the Command Center Web Server runs the gpccws web server, starts the metrics collection agents on the segment servers, and starts a listener on the Command Center rpc port.

You can run the gpcc command as the gpadmin user on the master host (recommended) or on the standby host. Starting Command Center on the standby host is not recommended because it can cause heavy network traffic between the Command Center agent on the master host and the backend on the standby host.

To ensure the gpcc command is on your path, source the gpcc_path.sh file in the Command Center installation directory or add it to the startup script for your command shell. See Setting the Greenplum Command Center Environment for instructions. The MASTER_DATA_DIRECTORY environment variable must be set to the location of the Greenplum Database master data directory.

Note: The gpcc command uses the gpmon role to connect to Greenplum Database. It looks for the gpmon password in the PGPASSWORD environment variable or in the .pgpass file in the gpadmin user's home directory. You can instead append the -W flag to the gpcc commands below to have gpcc prompt you to enter the password.

To start Greenplum Command Center

Log on to the master host or the standby host.

To log on to the standby from the master host:

$ ssh <standby-host>

Source the Command Center environmental script.

$ source /usr/local/greenplum-cc-<version>/gpcc_path.sh

Start the Command Center web server and the metrics collection agents.

$ gpcc start
Starting the gpcc agents and webserver…
2019/05/07 01:51:03 Agent successfully started on 5/5 hosts
2019/05/07 01:51:03 View Greenplum Command Center at http://mdw:28090

To stop Greenplum Command Center

$ gpcc stop
2019/05/07 01:51:55 GPCC webserver and metrics collection agents have been stopped. Use gpcc start to start them again

To check the Greenplum Command Center status

$ gpcc status
2019/05/07 01:50:13 GPCC webserver: running
2019/05/07 01:50:14 GPCC agents: 5/5 agents running

See the gpcc reference page for full syntax for the gpcc command.

Configuring the Command Center Web Server

The web server configuration file is stored in $GPCC_HOME/conf/app.conf. The parameters in this configuration file are set when you install Greenplum Command Center. The installer copies the Command Center installation directory, including this configuration file, to every Greenplum Database host.

See the Web Server Parameters section of Configuration File Reference for a description of the parameters in this file.

You can see a summary of the current configuration using the gpcc --settings command.

$ gpcc --settings
Install path:              /usr/local
Display Name:              gpcc
GPCC port:                 28080
Kerberos:                  enabled
Kerberos webserver name:   mdw
Kerberos gpdb name:        gpadmin
Kerberos mode:             gpmon_only
Kerberos path:             /home/gpadmin/gpcc-kerberos.keytab
SSL:                       disabled

If you modify the file on one host you should copy it to every other host. Be sure to restart the web server after you change the configuration. Rather than modifying the configuration directly, you can just stop Command Center and re-run the gpccinstall-<version> installation command. This ensures the configuration is consistent on all hosts.

You can use the gpcc krbenable command to add Kerberos authentication to the Command Center configuration. See Enabling Authentication with Kerberos for details about setting up Kerberos on the Command Center host. The gpcc krbenable command prompts for the Kerberos principal names and artifacts and updates the configuration.

The gpcc krbdisable command removes Kerberos parameters from the Command Center configuration.

Restarting Command Center After Master Failure

The Greenplum Database standby master is a warm standby—if the primary master fails, the administrator must activate the standby master by running the gpactivatestandby management utility.

After Greenplum Database has restarted on the standby master, you can start Command Center on the standby master.

Follow these steps to activate Greenplum Command Center on the standby master host.

  1. On the standby master, edit the app.conf file in the $GPCC_HOME directory.

    • Change the master_host and master_port parameters to the standby master host name and port number.
    • Change the httpport and httpsport parameters to the Command Center web server port number.
  2. Edit the pg_hba.conf file on the standby master to allow the gpmon user to access all databases and then run gpstop -u on the standby host to reload the configuration files.

  3. Copy the $HOME/gpmetrics directory from the old master host to the standby master host.

  4. Copy the ~gpadmin/.pgpass file from the master to the standby master and make sure the port number is correct in the entry for the gpmon user.

  5. Restart Command Center on the standby master.

    $ source <command-center-install-dir>/gpcc_path.sh
    $ gpcc start
    

If you perform the initial four steps ahead of time and keep the standby master configuration files up to date when configurations change on the primary master, you can just restart Command Center on the standby master host after Greenplum Database has restarted on the standby master.

Viewing and Maintaining Web Server Log Files

Web server access and error log messages are written to $GPCC_HOME/logs/gpccws.log.

If you experience errors viewing the Greenplum Command Center Console, refer to this file for more information.

To prevent the web server log from growing to excessive size, you can set up log file rotation using logrotate or cronolog.

check-circle-line exclamation-circle-line close-line
Scroll to top icon