Troubleshooting the databases

Use these strategies to troubleshoot issues with the databases that support the console.

Common issues include:

The PostgreSQL database takes up too much space

The PostgreSQL autovacuum=on setting prevents the database from growing too large and unwieldy. Routine vacuuming is enabled by default.

Verify that autovacuum is set to on.

PostgreSQL buffer memory causes installation to fail

When installing PE on machines with large amounts of RAM, the PostgreSQL database might try to use more shared buffer memory than is available.

If this issue is present, the pgstartup.log (located at /var/log/pe-postgresql/pgstartup.log) contains the following error:
FATAL: could not create shared memory segment: No space left on device
DETAIL: Failed system call was shmget(key=5432001, size=34427584512,03600).
  1. On the primary server, set the shmmax kernel setting to approximately 50% of the total RAM.
  2. To get the value for the shmall kernel setting, divide the value of the shmmax setting by the page size. To confirm the page size, run: getconf PAGE_SIZE
  3. Set the new kernel settings by running:
    sysctl -w kernel.shmmax=<your shmmax calculation>
    sysctl -w kernel.shmall=<your shmall calculation>

The PuppetDB default port conflicts with another service

By default, PuppetDB communicates over port 8081. In some cases, this might conflict with other services, such as McAfee ePolicy Orchestrator.

Install PuppetDB in text mode with the non-default port specified on the puppet_enterprise::puppetdb_port parameter in the pe.conf file.
What to do next
After installation, make sure the puppetdb_port value is correct on the PE Infrastructure node group.

puppet resource generates Ruby errors after connecting puppet apply to PuppetDB

If puppet apply is configured incorrectly, then puppet resource ceases to function and returns a Ruby run error.

An example of an incorrect puppet apply configuration would be putting the storeconfigs_backend = puppetdb and storeconfigs = true parameters in both the main and primary server sections of the puppet.conf file.
You need to modify the routes.yaml file (located at /etc/puppetlabs/puppet/routes.yaml) so that it correctly connects puppet apply without impacting other functions.