Project

General

Profile

Bug #18399

Failed to initialize puppet class cache, will use lazy initialization instead

Added by Sven Vogel almost 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Puppet
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Hi,

after Upgrade from Foreman 1.13 (Katello 3.3) i get the following error in smartproxy log. i get the error when i take a restart the server and complete process are running. if i restart later foreman-proxy the error is gone.

Failed to initialize puppet class cache, will use lazy initialization instead

I, [2017-02-06T01:03:03.540493 ] INFO -- : Successfully initialized 'dhcp_isc'
I, [2017-02-06T01:03:03.540645 ] INFO -- : Successfully initialized 'dhcp'
I, [2017-02-06T01:03:03.540760 ] INFO -- : Successfully initialized 'puppetca'
I, [2017-02-06T01:03:03.540935 ] INFO -- : Started puppet class cache initialization
I, [2017-02-06T01:03:03.542029 ] INFO -- : Successfully initialized 'puppet_proxy_puppet_api'
I, [2017-02-06T01:03:03.542153 ] INFO -- : Successfully initialized 'puppet'
D, [2017-02-06T01:03:03.542277 ] DEBUG -- : Log buffer API initialized, available capacity: 2000/1000
I, [2017-02-06T01:03:03.542356 ] INFO -- : Successfully initialized 'logs'
E, [2017-02-06T01:03:03.642049 ] ERROR -- : Failed to initialize puppet class cache, will use lazy initialization instead
I, [2017-02-06T01:03:03.677632 ] INFO -- : WEBrick 1.3.1
I, [2017-02-06T01:03:03.677860 ] INFO -- : ruby 2.0.0 (2015-12-16) [x86_64-linux]
D, [2017-02-06T01:03:03.678172 ] DEBUG -- : TCPServer.new(0.0.0.0, 9090)
D, [2017-02-06T01:03:03.678343 ] DEBUG -- : TCPServer.new(::, 9090)
W, [2017-02-06T01:03:03.678500 ] WARN -- : TCPServer Error: Address already in use - bind(2)

any information how i get that error removed?

thanks

Sven

Associated revisions

Revision a823c703 (diff)
Added by Dmitri Dolguikh over 3 years ago

Fixes #18399 - use warning instead when cache init fails

With a clearer message. Currently, when such an issue
occurs, users aren't clear about what they need to do
to correct the error.

History

#1 Updated by Justin Sherrill almost 4 years ago

  • Project changed from Katello to Foreman
  • Category deleted (Upgrades)

Moving this to foreman as I do not believe this is related to katello

#2 Updated by Sven Vogel almost 4 years ago

Justin Sherrill wrote:

Moving this to foreman as I do not believe this is related to katello

where is it now?

#3 Updated by Dominic Cleal almost 4 years ago

  • Project changed from Foreman to Smart Proxy
  • Category set to Puppet

Do Puppet class imports work? The underlying error may be logged or shown when importing explicitly.

Please note the version of the smart proxy that you're using, not what you upgraded from.

#4 Updated by Atasian van Endern almost 4 years ago

  • Priority changed from Normal to High

Dominic Cleal wrote:

Do Puppet class imports work? The underlying error may be logged or shown when importing explicitly.

Please note the version of the smart proxy that you're using, not what you upgraded from.

Good Evening together,

its seems this is a bug in general not only after a upgrade. I have exactly the same Error on my fresh installed Servers using the foreman-installer.

1x CentOS 7.3.1611 with Foreman 1.14.1
2x Ubuntu 16.04.02 with Foreman 1.14.1

The class import does not work.

#5 Updated by Atasian van Endern almost 4 years ago

Sorry my mistake. The class import works well. Just this Error appears on startup.

#6 Updated by Dmitri Dolguikh almost 4 years ago

This error means that proxy couldn't initialize its internal class cache on startup and will attempt it again later. Has puppet server finished starting when smart-proxy is launched? If not, this could cause the error message you are seeing.

#7 Updated by Atasian van Endern almost 4 years ago

Dmitri Dolguikh wrote:

This error means that proxy couldn't initialize its internal class cache on startup and will attempt it again later. Has puppet server finished starting when smart-proxy is launched? If not, this could cause the error message you are seeing.

I dont know how to check that exacly. Foreman-Proxy and Puppet starts at the same time and but from the logs foreman_proxy is initialized before puppet.

14.2.2017, 16:59:59 INFO Successfully initialized 'foreman_proxy'
14.2.2017, 16:59:59 INFO Successfully initialized 'tftp'
14.2.2017, 16:59:59 INFO Successfully initialized 'puppetca'
14.2.2017, 16:59:59 INFO Started puppet class cache initialization
14.2.2017, 16:59:59 INFO Successfully initialized 'puppet_proxy_puppet_api'
14.2.2017, 16:59:59 INFO Successfully initialized 'puppet'
14.2.2017, 16:59:59 INFO Successfully initialized 'logs'
14.2.2017, 16:59:59 ERROR Failed to initialize puppet class cache, will use lazy initialization instead

This is what you meen or?

#8 Updated by Dominic Cleal almost 4 years ago

  • Priority changed from High to Normal

#9 Updated by Sven Vogel almost 4 years ago

Yes this error only appears on startup. i wrote this above already. after restart from proxy the error is gone.

any fixes?

#10 Updated by Dmitri Dolguikh almost 4 years ago

It's a transient error, which is meant to catch issues with cache initialization on proxy startup. If you are getting classes back, then proxy is working ok, then this error can be ignored.

#11 Updated by The Foreman Bot almost 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dmitri Dolguikh
  • Pull request https://github.com/theforeman/smart-proxy/pull/512 added

#12 Updated by Dmitri Dolguikh over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#13 Updated by Dominic Cleal over 3 years ago

  • Legacy Backlogs Release (now unused) set to 209

#14 Updated by Ivan Necas over 3 years ago

  • Target version set to 1.12.0

Also available in: Atom PDF