Bug #18399

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

Added by Sven Vogel 5 months ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Dmitri Dolguikh
Category:Puppet
Target version:Foreman - Team Ivan Iteration 11
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/smart-proxy/pull/512
Story points-
Velocity based estimate-
Release1.15.0Release relationshipAuto

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

Bildschirmfoto 2017-02-06 um 01.13.33.png (149 KB) Preview Sven Vogel, 02/05/2017 07:14 PM

Bildschirmfoto%202017-02-06%20um%2001.13.33

Associated revisions

Revision a823c703
Added by Dmitri Dolguikh 4 months 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 5 months 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 5 months 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 5 months 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 4 months 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 4 months ago

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

#6 Updated by Dmitri Dolguikh 4 months 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 4 months 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 4 months ago

  • Priority changed from High to Normal

#9 Updated by Sven Vogel 4 months 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 4 months 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 4 months ago

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

#12 Updated by Dmitri Dolguikh 4 months ago

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

#13 Updated by Dominic Cleal 4 months ago

  • Release set to 1.15.0

#14 Updated by Ivan Necas 3 months ago

  • Target version set to Team Ivan Iteration 11

Also available in: Atom PDF