Managed to reproduce the problem by limiting the number of threads to 200 on Ubuntu 18.04
echo 200 > /proc/sys/kernel/threads-max root@raw-drawl:~# facter Traceback (most recent call last): 14: from /opt/puppetlabs/puppet/bin/facter:10:in `<main>' 13: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli_launcher.rb:23:in `start' 12: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start' 11: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch' 10: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command' 9: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run' 8: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli.rb:114:in `query' 7: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter.rb:390:in `to_user_output' 6: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact_manager.rb:25:in `resolve_facts' 5: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:15:in `resolve_facts' 4: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:62:in `start_threads' 3: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:62:in `map' 2: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:63:in `block in start_threads' 1: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:63:in `new' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:63:in `initialize': can't create Thread: Resource On Tuesday, December 8, 2020 at 2:15:46 PM UTC+2 [email protected] wrote: > Hi Helmut, > > Facter 4 resolves each fact on a separate thread, this can lead to a high > number of threads being created. Can you please provide the output of `cat > /proc/sys/kernel/threads-max` on the system where you see this issue? Does > this happen at every run or sporadically? > > Please try to run facter from the cli and let me know if you have any > issues. > > > > You can disable parallel fact resolution with facter.conf ( > https://puppet.com/docs/facter/3.11/configuring_facter.html) by adding > > > global : { > > sequential : true > > } > > > > Best regards, > > Bogdan Irimie > > > > > > On Tue, Dec 8, 2020 at 10:54 AM Helmut Schneider <[email protected]> wrote: > >> Hi, >> >> after update of puppet-agent on Ubuntu I get the following error: >> >> Debug: Facter: Query is operatingsystem >> Debug: Facter: Checking query tokens operatingsystem >> Debug: Facter: List of resolvable facts: >> [#<Facter::SearchedFact:0x000055f89f7fb640 @name="operatingsystem", >> @fact_class=Facts::Linux::Os::Name, @filter_tokens=[], >> @user_query="operatingsystem", @type=:legacy, @file=nil>] >> Debug: Facter: Resolving fact in parallel >> Debug: Facter: Loading external facts >> Debug: Facter: User query is: [] >> Debug: Facter: Resolving fact in parallel >> Error: Could not retrieve local facts: can't create Thread: Resource >> temporarily unavailable >> Error: Failed to apply catalog: Could not retrieve local facts: can't >> create Thread: Resource temporarily unavailable >> Debug: Resolving service 'report' using Puppet::HTTP::Resolver::Settings >> >> helmut@h2873756:~$ lsb_release -a >> No LSB modules are available. >> Distributor ID: Ubuntu >> Description: Ubuntu 18.04.5 LTS >> Release: 18.04 >> Codename: bionic >> helmut@h2873756:~$ puppet -V >> 7.0.0 >> helmut@h2873756:~$ >> >> Any ideas? >> >> Thank you! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/rqneve%24slb%241%40ciao.gmane.io >> . >> > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8ced7a94-eae5-4701-b6a5-e832d6d32533n%40googlegroups.com.
