In the console I see the error: An error occurred loading this page: There was an error connecting to PuppetDB: Connection refused
.
Error messages and logs
If you do not see these errors in /var/log/messages
, you do not have the issue described in this article, please open a support ticket.
puppetdb: # java.lang.OutOfMemoryError: Java heap space
puppetdb: # -XX:OnOutOfMemoryError="kill -9 %p"
puppetdb: # Executing /bin/sh -c "kill -9 8353"...
pe-puppetdb.service: main process exited, code=killed, status=9/KILL
Unit pe-puppetdb.service entered failed state.
systemd: pe-puppetdb.service failed.
pe-puppetdb.service holdoff time over, scheduling restart.
Starting pe-puppetdb Service…
Version and installation information
PE version: 2015.2 to 2019.5
Solution
You are getting an error in the console because PuppetDB is out of memory. To resolve the error, allocate more Java heap to PuppetDB so that the pe-puppetdb
service has enough memory. Complete the following steps on the PuppetDB node (the master in a monolithic installation).
Note: We've linked to the latest version of PE documentation, please navigate to the right version for your deployment.
-
Disable the Puppet agent so that it does not revert your changes while you are fixing the issue:
puppet resource service puppet ensure=stopped
-
Normally you would make this change in the console. However, since the console is down, you will need to make the change in a configuration file. Edit the configuration file
/etc/sysconfig/pe-puppetdb
to increase the-Xmx
and-Xms
settings. Assuming system memory is available, double the value of both settings to try to stabilize PuppetDB.For example, change:
JAVA_ARGS="-Xmx256m -Xms256m ...<OTHER_ARGS>"
To:
JAVA_ARGS="-Xmx512m -Xms512m ...<OTHER_ARGS>"
-
Restart the
pe-puppetdb
service:puppet resource service pe-puppetdb ensure=stopped puppet resource service pe-puppetdb ensure=running
-
Once the
pe-puppetdb
service is up and stable, make the change permanent. Follow our documentation to increase the Java heap size for PE Java services using the same values you used in the configuration file. -
Restart the agent service:
puppet resource service puppet ensure=running
How can we improve this article?
2 comments
Okay Erik Hansen
Let me try and back to you
Hi Ahilan, it looks like you're working with someone from our team already, please let them know if you have any issues with or questions about this article.
Please sign in to leave a comment.
Related articles