java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • If the {{jruby-puppet.max-active-instances}} setting in puppetserver.conf is set to a value less than or equal to zero, Puppet Server fails to start with a confusing error message in the log file: In Puppet Server 2.2.1: {noformat} 2016-03-23 16:40:25,345 ERROR [main] [p.t.internal] Error during service init!!! java.lang.IllegalArgumentException: null at java.util.concurrent.LinkedBlockingDeque.<init>(LinkedBlockingDeque.java:181) ~[na:1.8.0_71] at com.puppetlabs.puppetserver.pool.JRubyPool.<init>(JRubyPool.java:26) ~[puppet-server-release.jar:na] at puppetlabs.services.jruby.jruby_puppet_internal$instantiate_free_pool.invoke(jruby_puppet_internal.clj:60) ~[na:na] at puppetlabs.services.jruby.jruby_puppet_internal$eval24401$create_pool_from_config__24402$fn__24406.invoke(jruby_puppet_internal.clj:166) ~[na:na] at puppetlabs.services.jruby.jruby_puppet_internal$eval24401$create_pool_from_config__24402.invoke(jruby_puppet_internal.clj:162) ~[na:na] at puppetlabs.services.jruby.jruby_puppet_core$eval25234$create_pool_context__25235$fn__25236.invoke(jruby_puppet_core.clj:223) ~[na:na] at puppetlabs.services.jruby.jruby_puppet_core$eval25234$create_pool_context__25235.invoke(jruby_puppet_core.clj:212) ~[na:na] at puppetlabs.services.jruby.jruby_puppet_service$reify__25604$service_fnk__4363__auto___positional$reify__25615.init(jruby_puppet_service.clj:39) ~[na:na] {noformat} In Puppet Server 2.3.0, it's even more confusing to identify the problem because Puppet Server hangs - with the webserver never coming to ready - during initialization. I believe that's because with the changes we made to the JRubyPool class, we're no longer throwing an exception for a value less than 1: https://github.com/puppetlabs/puppet-server/blob/puppet-server-2.3.1/src/java/com/puppetlabs/puppetserver/pool/JRubyPool.java#L97 -- It would seem to be better to throw a failure with a more meaningful error message which ties back to the max-active-instances config setting - maybe somewhere around where the jruby-puppet service sources its config: https://github.com/puppetlabs/puppet-server/blob/puppet-server-2.3.1/src/clj/puppetlabs/services/jruby/jruby_puppet_core.clj#L194 Just as a fail-safe / defensive programming, throwing an exception from the JRubyPool class constructor for a size less than 1 seems worthwhile.
    via by Jeremy Barlow,
    • java.lang.IllegalArgumentException: null at java.util.concurrent.LinkedBlockingDeque.<init>(LinkedBlockingDeque.java:181)[na:1.8.0_71] at com.puppetlabs.puppetserver.pool.JRubyPool.<init>(JRubyPool.java:26)[puppet-server-release.jar:na] at puppetlabs.services.jruby.jruby_puppet_internal$instantiate_free_pool.invoke(jruby_puppet_internal.clj:60)[na:na] at puppetlabs.services.jruby.jruby_puppet_internal$eval24401$create_pool_from_config__24402$fn__24406.invoke(jruby_puppet_internal.clj:166)[na:na] at puppetlabs.services.jruby.jruby_puppet_internal$eval24401$create_pool_from_config__24402.invoke(jruby_puppet_internal.clj:162)[na:na] at puppetlabs.services.jruby.jruby_puppet_core$eval25234$create_pool_context__25235$fn__25236.invoke(jruby_puppet_core.clj:223)[na:na] at puppetlabs.services.jruby.jruby_puppet_core$eval25234$create_pool_context__25235.invoke(jruby_puppet_core.clj:212)[na:na] at puppetlabs.services.jruby.jruby_puppet_service$reify__25604$service_fnk__4363__auto___positional$reify__25615.init(jruby_puppet_service.clj:39)[na:na]
    No Bugmate found.