Project

General

Profile

Actions

Bug #27726

open

Error while retrieving puppet classes for 'xxx' environment

Added by Antonin Dvorak over 4 years ago. Updated over 2 years ago.

Status:
Need more information
Priority:
Normal
Assignee:
-
Category:
Puppet
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Hello guys,
currently Im solving issue with foreman-proxy.

We did update of foreman from v1.16 to v1.22. Also Ive updated foreman-proxy from 1.14 to 1.22.

Integration of puppetca smart proxy seems to be partialy ok (certificates can be listed, revoked, etc.). However init of foreman-proxy on this host seems to have some issues, and also import of classes (or anything environment/class related) doesn't seem to be working.

Versions:

puppet-agent 5.3.2-1xenial
ruby 2.3.1p112
foreman-proxy 1.22.0-1

Related puppet modules:

theforeman-foreman 12.2.0
theforeman-foreman_proxy 12.0.1
theforeman-puppet 12.0.1

Tried different versions of ruby, puppet-agent. Also tried setting

environment-class-cache-enabled: true

but still got the exact same result, as seen in proxy.log.

Thanks for help in advance.


Files

proxy.log proxy.log 1.33 KB Antonin Dvorak, 08/28/2019 01:41 PM
puppetserver_auth.conf puppetserver_auth.conf 8.17 KB /etc/puppetlabs/puppetserver/conf.d/auth.conf Antonin Dvorak, 08/28/2019 01:58 PM
puppetserver_puppetserver.conf puppetserver_puppetserver.conf 4.67 KB /etc/puppetlabs/puppetserver/conf.d/puppetserver.conf Antonin Dvorak, 08/28/2019 01:58 PM
Selection_150.png View Selection_150.png 22.7 KB Antonin Dvorak, 08/28/2019 02:01 PM
Actions #1

Updated by Ewoud Kohl van Wijngaarden over 4 years ago

  • Category set to Puppet

Which puppetserver version are you running?

I also wonder if you could increase the log level since I'm hoping that gives an actual stack trace. The error is unexpected, but doesn't really give a hint to where this might be happening. If not, you may need to modify the code. puppet_api.rb has a line for get "/environments/:environment/classes" do<code>. You may need to remove the generic <code>rescue Exception</code> block to get a stack trace.

Actions #2

Updated by Antonin Dvorak over 4 years ago

Thanks for reply!

puppetserver: 5.1.3
puppet: 5.3.2

Enabled debug mode and removed "rescue Exception" block:

2019-08-30T12:18:54 5ddabc3b [I] Started GET /environments/production/classes 
2019-08-30T12:18:54 5ddabc3b [D] verifying remote client <router_ip> against trusted_hosts ["<foreman_host>"]
2019-08-30T12:18:54  [E] Error while retrieving puppet classes for 'production' environment
2019-08-30T12:18:54 5ddabc3b [W] Error processing request '5ddabc3b-83af-4de5-8a39-94adfa53872c
NoMethodError: undefined method `new' for 3600:Fixnum
Did you mean?  next
/usr/share/foreman-proxy/modules/puppet_proxy_puppet_api/v3_environment_classes_api_classes_retriever.rb:76:in `block in async_get_classes'
/usr/lib/ruby/vendor_ruby/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
/usr/lib/ruby/vendor_ruby/concurrent/synchronization/mri_lockable_object.rb:38:in `block in synchronize'
/usr/lib/ruby/vendor_ruby/concurrent/synchronization/mri_lockable_object.rb:38:in `synchronize'
/usr/lib/ruby/vendor_ruby/concurrent/synchronization/mri_lockable_object.rb:38:in `synchronize'
/usr/lib/ruby/vendor_ruby/concurrent/executor/safe_task_executor.rb:19:in `execute'
/usr/lib/ruby/vendor_ruby/concurrent/promise.rb:526:in `block in realize'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:333:in `run_task'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:322:in `block (3 levels) in create_worker'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:305:in `loop'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:305:in `block (2 levels) in create_worker'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:304:in `catch'
/usr/lib/ruby/vendor_ruby/concurrent/executor/ruby_thread_pool_executor.rb:304:in `block in create_worker'
/usr/lib/ruby/vendor_ruby/logging/diagnostic_context.rb:448:in `block in create_with_logging_context'
2019-08-30T12:18:54 5ddabc3b [I] Finished GET /environments/production/classes with 500 (10.07 ms)
2019-08-30T12:18:54 5ddabc3b [D] close: <router_ip>:<port>

edit:
tried update of puppet/puppetserver, but still the same thing

puppet-agent                      5.5.16
puppetserver                      5.3.9

Actions #3

Updated by Ewoud Kohl van Wijngaarden over 2 years ago

  • Status changed from New to Need more information

I completely missed this, but do you happen to have an environment named 3600. I understand if you no longer have this information.

Actions

Also available in: Atom PDF