User Tools

Site Tools


puppet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
puppet [2018/04/18 15:43]
k2patel
puppet [2018/08/07 10:55] (current)
k2patel [External Links]
Line 280: Line 280:
  
 create_resources('​apache::​vhost',​ $myApacheVhost) create_resources('​apache::​vhost',​ $myApacheVhost)
 +</​code>​
 +
 +==== Troubleshooting ====
 +===  duplicate resource was found while collecting exported resources ===
 +8-O
 +<code bash | error >
 +Info: Loading facts
 +Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: A duplicate resource was found while collecting exported resources, with the type and title Apache::​Balancermember[visualizer] on node testserver.k2patel.in
 +Warning: Not using cache on failed catalog
 +Error: Could not retrieve catalog; skipping run
 +</​code>​
 +
 +
 +Many suggestions from the puppet forums to run query shown below, didn't helped.
 +
 +<code bash | depend on your puppet version select one which works>
 +sudo -u postgres psql puppetdb -c '​delete from catalogs where certname in (select certname from certnames where certname like '​%testserver.k2patel.in%'​);'​
 +
 +sudo -u postgres psql puppetdb -c '​delete from catalogs where id in (select id from certnames where certname like '​%testserver.k2patel.in%'​);'​
 +</​code>​
 +
 +Only thing worked for me to drop database and recreate.
 +
 +<code bash>
 +systemctl stop puppetdb
 +su - postgres
 +dropdb puppetdb
 +createdb -E UTF8 -O puppetdb puppetdb
 +psql puppetdb -c '​create extension pg_trgm';​
 </​code>​ </​code>​
  
puppet.txt ยท Last modified: 2018/08/07 10:55 by k2patel