java.lang.IllegalArgumentException: null

JIRA | Jeremy Barlow | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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.

    JIRA | 1 year ago | Jeremy Barlow
    java.lang.IllegalArgumentException: null

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      null

      at java.util.concurrent.LinkedBlockingDeque.<init>()
    2. Java RT
      LinkedBlockingDeque.<init>
      1. java.util.concurrent.LinkedBlockingDeque.<init>(LinkedBlockingDeque.java:181)[na:1.8.0_71]
      1 frame
    3. com.puppetlabs.puppetserver
      JRubyPool.<init>
      1. com.puppetlabs.puppetserver.pool.JRubyPool.<init>(JRubyPool.java:26)[puppet-server-release.jar:na]
      1 frame
    4. puppetlabs.services.jruby
      jruby_puppet_service$reify__25604$service_fnk__4363__auto___positional$reify__25615.init
      1. puppetlabs.services.jruby.jruby_puppet_internal$instantiate_free_pool.invoke(jruby_puppet_internal.clj:60)[na:na]
      2. puppetlabs.services.jruby.jruby_puppet_internal$eval24401$create_pool_from_config__24402$fn__24406.invoke(jruby_puppet_internal.clj:166)[na:na]
      3. puppetlabs.services.jruby.jruby_puppet_internal$eval24401$create_pool_from_config__24402.invoke(jruby_puppet_internal.clj:162)[na:na]
      4. puppetlabs.services.jruby.jruby_puppet_core$eval25234$create_pool_context__25235$fn__25236.invoke(jruby_puppet_core.clj:223)[na:na]
      5. puppetlabs.services.jruby.jruby_puppet_core$eval25234$create_pool_context__25235.invoke(jruby_puppet_core.clj:212)[na:na]
      6. puppetlabs.services.jruby.jruby_puppet_service$reify__25604$service_fnk__4363__auto___positional$reify__25615.init(jruby_puppet_service.clj:39)[na:na]
      6 frames