Ask Your Question
0

Warning: Not using cache on failed catalog. Why?

asked 2014-05-10 16:33:11 -0500

sguiggly gravatar image

I want to use Puppet on an unreliable network, and I have been testing what would happen if the Master is down/uncontactable. The Agent does this:

Error: Could not retrieve catalog from remote server: Connection refused - connect(2)
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: Connection refused - connect(2)

How do I get puppet to automatically use the cached catalog when it is unable to contact the master, or the master is unable to generate a new catalog? I don't want to have to manually log on to the server and run agent --usecachedcatalog every time.

http://stackoverflow.com/questions/23577490/why-does-puppet-agent-refuse-to-use-cached-catalog-when-connection-to-master-fai

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-05-11 10:31:15 -0500

Stefan gravatar image

updated 2014-05-11 19:46:46 -0500

The default of use_cached_catalog is false as you've already noticed yourself (see docs) but you can add use_cached_catalog = true in your agent configuration (default: /etc/puppet/puppet.conf) to overwrite this default.

The agent will then use the cached catalog by default. Note that you can still overwrite this setting when running puppet from the commandline ( with--use_cached_catalog and --no-use_cached_catalog)

Update:

Thanks for pointing out I made a mistake. It looks you are right and --use_cached_catalog will always use the cached version even if a new catalog would compile. So setting this option is not what you want.

The only reason I currently see - but I may be wrong here, too - is that usecacheonfailure is false (while true is the default), probably set indirectly with --ignorecache or --test? Can you please verify (with puppet agent --configprint usecacheonfailure)

edit flag offensive delete link more

Comments

> The agent will then use the cached catalog by default. Where did I say I wanted to use the cached catalogue by default? Did you even read the question?

sguiggly gravatar imagesguiggly ( 2014-05-11 17:01:49 -0500 )edit

have you read the update yet? I have not tried to reproduce the issue so far, so I'd be interested if it really ignores the cached catalog even tough `usecacheonfailure` is set.

Stefan gravatar imageStefan ( 2014-05-13 15:32:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-05-10 16:33:11 -0500

Seen: 4,968 times

Last updated: May 11 '14