java.lang.OutOfMemoryError: Java heap space

JIRA | Olof Hellqvist | 2 years ago
  1. 0

    Hi. The puppetserver crashes with a java.lang.OutOfMemoryError: Java heap space Exception when it calls an external program. Code $password = generate('/usr/bin/python2.7', "${settings::confdir}/opt/bin/bacula-genkey", "${settings::confdir}/opt/etc/baculaclient/${::fqdn}.key") Stacktrace: 2015-04-17 13:32:57,604 INFO [puppet-server] access[^/puppet/v3/catalog/([^/]+)$] allowing $1 access 2015-04-17 13:32:57,605 INFO [puppet-server] access[^/puppet/v3/node/([^/]+)$] allowing 'method' find 2015-04-17 13:32:57,605 INFO [puppet-server] access[^/puppet/v3/node/([^/]+)$] allowing $1 access 2015-04-17 13:32:57,606 INFO [puppet-server] access[^/puppet/v3/report/([^/]+)$] allowing 'method' save 2015-04-17 13:32:57,606 INFO [puppet-server] access[^/puppet/v3/report/([^/]+)$] allowing $1 access 2015-04-17 13:32:57,606 INFO [puppet-server] access[/puppet/v3/file] allowing * access 2015-04-17 13:32:57,606 INFO [puppet-server] access[/puppet/v3/status] allowing 'method' find 2015-04-17 13:32:57,607 INFO [puppet-server] access[/puppet/v3/status] allowing * access 2015-04-17 13:32:57,607 INFO [puppet-server] access[/puppet-ca/v1/certificate_revocation_list/ca] allowing 'method' find 2015-04-17 13:32:57,607 INFO [puppet-server] access[/puppet-ca/v1/certificate_revocation_list/ca] allowing * access 2015-04-17 13:32:57,607 INFO [puppet-server] access[/puppet-ca/v1/certificate/ca] adding authentication any 2015-04-17 13:32:57,607 INFO [puppet-server] access[/puppet-ca/v1/certificate/ca] allowing 'method' find 2015-04-17 13:32:57,608 INFO [puppet-server] access[/puppet-ca/v1/certificate/ca] allowing * access 2015-04-17 13:32:57,608 INFO [puppet-server] access[/puppet-ca/v1/certificate/] adding authentication any 2015-04-17 13:32:57,608 INFO [puppet-server] access[/puppet-ca/v1/certificate/] allowing 'method' find 2015-04-17 13:32:57,608 INFO [puppet-server] access[/puppet-ca/v1/certificate/] allowing * access 2015-04-17 13:32:57,609 INFO [puppet-server] access[/puppet-ca/v1/certificate_request] adding authentication any 2015-04-17 13:32:57,609 INFO [puppet-server] access[/puppet-ca/v1/certificate_request] allowing 'method' find 2015-04-17 13:32:57,609 INFO [puppet-server] access[/puppet-ca/v1/certificate_request] allowing 'method' save 2015-04-17 13:32:57,609 INFO [puppet-server] access[/puppet-ca/v1/certificate_request] allowing * access 2015-04-17 13:32:57,610 INFO [puppet-server] access[/] adding authentication any 2015-04-17 13:32:58,865 INFO [puppet-server] Puppet Caching node for puppet.puppet.local 2015-04-17 13:35:29,970 WARN [o.e.j.u.t.QueuedThreadPool] java.lang.OutOfMemoryError: Java heap space at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57) ~[na:1.7.0_75] at java.nio.ByteBuffer.allocate(ByteBuffer.java:331) ~[na:1.7.0_75] at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:792) ~[na:1.7.0_75] at java.nio.charset.Charset.encode(Charset.java:842) ~[na:1.7.0_75] at java.nio.charset.Charset.encode(Charset.java:865) ~[na:1.7.0_75] at org.jruby.RubyEncoding.encode(RubyEncoding.java:236) ~[puppet-server-release.jar:na] at org.jruby.RubyString.encodeBytelist(RubyString.java:7684) ~[puppet-server-release.jar:na] at org.jruby.RubyString.<init>(RubyString.java:414) ~[puppet-server-release.jar:na] at org.jruby.RubyString.newString(RubyString.java:508) ~[puppet-server-release.jar:na] at org.jruby.Ruby.newString(Ruby.java:3378) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1020) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:999) ~[puppet-server-release.jar:na] at org.jruby.RubyKernel.inspect(RubyKernel.java:2107) ~[puppet-server-release.jar:na] at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen) ~[puppet-server-release.jar:na] at org.jruby.runtime.Helpers.invokedynamic(Helpers.java:2798) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1052) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1020) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:999) ~[puppet-server-release.jar:na] at org.jruby.RubyKernel.inspect(RubyKernel.java:2107) ~[puppet-server-release.jar:na] at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen) ~[puppet-server-release.jar:na] at org.jruby.runtime.Helpers.invokedynamic(Helpers.java:2798) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1052) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1020) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:999) ~[puppet-server-release.jar:na] at org.jruby.RubyKernel.inspect(RubyKernel.java:2107) ~[puppet-server-release.jar:na] at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen) ~[puppet-server-release.jar:na] at org.jruby.runtime.Helpers.invokedynamic(Helpers.java:2798) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1052) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1020) ~[puppet-server-release.jar:na] at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:999) ~[puppet-server-release.jar:na] at org.jruby.RubyKernel.inspect(RubyKernel.java:2107) ~[puppet-server-release.jar:na] at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen) ~[puppet-server-release.jar:na] ^[[B^C2015-04-17 13:37:49,637 INFO [p.t.internal] Shutting down due to JVM shutdown hook. 2015-04-17 13:37:49,638 INFO [p.t.internal] Beginning shutdown sequence 2015-04-17 13:37:49,640 INFO [p.t.s.w.jetty9-service] Shutting down web server(s). 2015-04-17 13:37:49,641 INFO [p.t.s.w.jetty9-core] Shutting down web server. 2015-04-17 13:37:49,644 INFO [o.e.j.s.ServerConnector] Stopped ServerConnector@791bdd14{SSL-HTTP/1.1}{0.0.0.0:8140} 2015-04-17 13:37:49,644 INFO [o.e.j.s.h.ContextHandler] Stopped o.e.j.s.h.ContextHandler@769fe49f{/puppet-admin-api,null,UNAVAILABLE} 2015-04-17 13:37:49,644 INFO [o.e.j.s.h.ContextHandler] Stopped o.e.j.s.h.ContextHandler@5e35a03e{/,null,UNAVAILABLE} 2015-04-17 13:37:49,645 INFO [o.e.j.s.h.ContextHandler] Stopped o.e.j.s.h.ContextHandler@a642e32{/puppet,null,UNAVAILABLE} 2015-04-17 13:37:49,645 INFO [o.e.j.s.h.ContextHandler] Stopped o.e.j.s.h.ContextHandler@f268f64{/puppet-ca,null,UNAVAILABLE} 2015-04-17 13:37:49,649 INFO [p.t.s.w.jetty9-core] Web server shutdown 2015-04-17 13:37:49,651 INFO [p.t.internal] Finished shutdown sequence Call from shell: root@puppet:/home/vagrant# sudo -u puppet python /etc/puppetlabs/puppet/opt/bin/bacula-genkey /etc/puppetlabs/puppet/opt/etc/baculaclient/puppet.puppet.local.key H150L2364C0IL8KMFXNTUIGM2KPJ6MEXTroot@puppet:/home/vagrant# Memory allocation: root@puppet:/home/vagrant# cat /etc/default/puppetserver ########################################### # Init settings for puppetserver ########################################### # Location of your Java binary (version 7 or higher) JAVA_BIN="/usr/bin/java" # Modify this if you'd like to change the memory allocation, enable JMX, etc JAVA_ARGS="-Xms7g -Xmx7g -XX:MaxPermSize=4g"

    JIRA | 2 years ago | Olof Hellqvist
    java.lang.OutOfMemoryError: Java heap space
  2. 0

    OutOfMemory Exception : java heap space

    Google Groups | 6 months ago | deepak singh
    java.lang.OutOfMemoryError: Java heap space* *java.lang.OutOfMemoryError: Java heap space*
  3. 0

    OutOfMemory Exception : java heap space

    Google Groups | 6 months ago | deepak singh
    java.lang.OutOfMemoryError: Java heap space* *java.lang.OutOfMemoryError: Java heap space*
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [exoplatform] [explatform] Memory requirements

    ow2.org | 1 year ago
    java.lang.OutOfMemoryError: Java heap space>java.lang.OutOfMemoryError: Java heap space
  6. 0

    OutOfMemory Exception : java heap space

    Google Groups | 6 months ago | deepak singh
    java.lang.OutOfMemoryError: Java heap space* *java.lang.OutOfMemoryError: Java heap space*

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.OutOfMemoryError

      Java heap space

      at java.nio.HeapByteBuffer.<init>()
    2. Java RT
      Charset.encode
      1. java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)[na:1.7.0_75]
      2. java.nio.ByteBuffer.allocate(ByteBuffer.java:331)[na:1.7.0_75]
      3. java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:792)[na:1.7.0_75]
      4. java.nio.charset.Charset.encode(Charset.java:842)[na:1.7.0_75]
      5. java.nio.charset.Charset.encode(Charset.java:865)[na:1.7.0_75]
      5 frames
    3. JRuby Main Maven Artifact
      RubyKernel$INVOKER$s$0$0$inspect.call
      1. org.jruby.RubyEncoding.encode(RubyEncoding.java:236)[puppet-server-release.jar:na]
      2. org.jruby.RubyString.encodeBytelist(RubyString.java:7684)[puppet-server-release.jar:na]
      3. org.jruby.RubyString.<init>(RubyString.java:414)[puppet-server-release.jar:na]
      4. org.jruby.RubyString.newString(RubyString.java:508)[puppet-server-release.jar:na]
      5. org.jruby.Ruby.newString(Ruby.java:3378)[puppet-server-release.jar:na]
      6. org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1020)[puppet-server-release.jar:na]
      7. org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:999)[puppet-server-release.jar:na]
      8. org.jruby.RubyKernel.inspect(RubyKernel.java:2107)[puppet-server-release.jar:na]
      9. org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)[puppet-server-release.jar:na]
      10. org.jruby.runtime.Helpers.invokedynamic(Helpers.java:2798)[puppet-server-release.jar:na]
      11. org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1052)[puppet-server-release.jar:na]
      12. org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1020)[puppet-server-release.jar:na]
      13. org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:999)[puppet-server-release.jar:na]
      14. org.jruby.RubyKernel.inspect(RubyKernel.java:2107)[puppet-server-release.jar:na]
      15. org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)[puppet-server-release.jar:na]
      16. org.jruby.runtime.Helpers.invokedynamic(Helpers.java:2798)[puppet-server-release.jar:na]
      17. org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1052)[puppet-server-release.jar:na]
      18. org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1020)[puppet-server-release.jar:na]
      19. org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:999)[puppet-server-release.jar:na]
      20. org.jruby.RubyKernel.inspect(RubyKernel.java:2107)[puppet-server-release.jar:na]
      21. org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)[puppet-server-release.jar:na]
      22. org.jruby.runtime.Helpers.invokedynamic(Helpers.java:2798)[puppet-server-release.jar:na]
      23. org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1052)[puppet-server-release.jar:na]
      24. org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1020)[puppet-server-release.jar:na]
      25. org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:999)[puppet-server-release.jar:na]
      26. org.jruby.RubyKernel.inspect(RubyKernel.java:2107)[puppet-server-release.jar:na]
      27. org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)[puppet-server-release.jar:na]
      27 frames