Forum: JRuby tomcat occassionally failing to start jruby runtimes

5969144beac5c774f674b841f7c15202?d=identicon&s=25 Michael Alletto (Guest)
on 2014-01-22 20:30
(Received via mailing list)
We have some java jar files that we are using for a saml implementation
within jruby 1.7.10 under tomcat 7.  To suppress logging we have a
logback.xml file in webapp classes directory.  When the logback.xml file
is
in place sometimes when starting tomcat when jruby runtimes are starting
up
we get:

 [JRuby-Rack-App-Init-1] INFO  jruby.rack - An exception happened during
JRuby-Rack startup

load error: kryptcore -- java.lang.NoClassDefFoundError:
org/jruby/ext/krypt/KryptCoreService

--- System

jruby 1.7.10 (1.9.3p392) 2014-01-09 c4ecd6b on Java HotSpot(TM) 64-Bit
Server VM 1.7.0_25-b15 [linux-amd64]

Time: 2014-01-22 19:20:44 +0000

Server: Apache Tomcat/7.0.42

jruby.home:
file:/usr/local/apache-tomcat/webapps/ROOT/WEB-INF/lib/gems-gems-jruby-jars-1.7.10-lib-jruby-stdlib-complete-1.7.10.jar!/META-INF/jruby.home


--- Context Init Parameters:

jruby.max.runtimes = 8

jruby.min.runtimes = 8

jruby.rack.error.app.path =

jruby.rack.logging = log4j

jruby.runtime.acquire.timeout = 10

public.root = /

rails.env = production


--- Backtrace

LoadError: load error: kryptcore -- java.lang.NoClassDefFoundError:
org/jruby/ext/krypt/KryptCoreService

  require at org/jruby/RubyKernel.java:1083

   (root) at
jar:file:/usr/local/apache-tomcat/webapps/ROOT/WEB-INF/lib/gems-gems-jruby-jars-1.7.10-lib-jruby-stdlib-complete-1.7.10.jar!/META-INF/jruby.home/lib/ruby/shared/krypt-core.rb:37

  require at org/jruby/RubyKernel.java:1083

   (root) at
jar:file:/usr/local/apache-tomcat/webapps/ROOT/WEB-INF/lib/gems-gems-jruby-jars-1.7.10-lib-jruby-stdlib-complete-1.7.10.jar!/META-INF/jruby.home/lib/ruby/shared/krypt.rb:1

  require at org/jruby/RubyKernel.java:1083

   (root) at
jar:file:/usr/local/apache-tomcat/webapps/ROOT/WEB-INF/lib/gems-gems-jruby-jars-1.7.10-lib-jruby-stdlib-complete-1.7.10.jar!/META-INF/jruby.home/lib/ruby/shared/krypt.rb:43

  require at org/jruby/RubyKernel.java:1083

   (root) at
jar:file:/usr/local/apache-tomcat/webapps/ROOT/WEB-INF/lib/gems-gems-jruby-jars-1.7.10-lib-jruby-stdlib-complete-1.7.10.jar!/META-INF/jruby.home/lib/ruby/shared/krypt/ossl.rb:1

     load at org/jruby/RubyKernel.java:1099

   (root) at
jar:file:/usr/local/apache-tomcat/webapps/ROOT/WEB-INF/lib/gems-gems-jruby-jars-1.7.10-lib-jruby-stdlib-complete-1.7.10.jar!/META-INF/jruby.home/lib/ruby/shared/krypt/ossl.rb:33

  require at org/jruby/RubyKernel.java:1083

   (root) at
/usr/local/tomcat/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.9.4/lib/jopenssl19/openssl.rb:1

  require at org/jruby/RubyKernel.java:1083

   (root) at
/usr/local/tomcat/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.9.4/lib/jopenssl19/openssl.rb:23

  require at org/jruby/RubyKernel.java:1083

   (root) at
/usr/local/tomcat/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.9.4/lib/jopenssl/load.rb:1

  require at org/jruby/RubyKernel.java:1083

   (root) at
/usr/local/tomcat/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.9.4/lib/jopenssl/load.rb:18

     each at org/jruby/RubyArray.java:1613

   (root) at
/usr/local/tomcat/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.9.4/lib/openssl.rb:1

     each at org/jruby/RubyArray.java:1613

   (root) at
/usr/local/tomcat/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.9.4/lib/openssl.rb:1

   (root) at
jar:file:/usr/local/apache-tomcat/webapps/ROOT/WEB-INF/lib/gems-gems-jruby-jars-1.7.10-lib-jruby-stdlib-complete-1.7.10.jar!/META-INF/jruby.home/lib/ruby/1.9/net/https.rb:1

   (root) at
jar:file:/usr/local/apache-tomcat/webapps/ROOT/WEB-INF/lib/gems-gems-jruby-jars-1.7.10-lib-jruby-stdlib-complete-1.7.10.jar!/META-INF/jruby.home/lib/ruby/1.9/net/https.rb:22

  require at org/jruby/RubyKernel.java:1083

   (root) at
/usr/local/tomcat/webapps/ROOT/WEB-INF/gems/gems/wrest-1.5.0/lib/wrest.rb:1

  require at org/jruby/RubyKernel.java:1083

   (root) at
/usr/local/tomcat/webapps/ROOT/WEB-INF/gems/gems/wrest-1.5.0/lib/wrest.rb:10

   (root) at
/usr/local/tomcat/webapps/ROOT/WEB-INF/gems/gems/bundler-1.5.1/lib/bundler/runtime.rb:1

  require at
/usr/local/tomcat/webapps/ROOT/WEB-INF/gems/gems/bundler-1.5.1/lib/bundler/runtime.rb:76


We saw this before with jruby 1.7.8 while on our production servers.
 Servers would randomly drop out.  I thought it was because we were
using
the krypt-core gem so I've removed that and it actually seemed to be ok,
but now we are seeing the above again and I can't seem to trace down
why.
 I was wondering if it is a low memory issue but I have plenty of free
memory so thats not it.  I can restart tomcat and it'll be fine.  If I
shut
it down and start it again it may or may not come up.  We did not have
any
of these problem with 1.7.3.  It is almost as if krypt-core that comes
with
jruby is sometimes not loading.  Any ideas?
6a22563bd5790a15adc54c8ca772eb22?d=identicon&s=25 Ben Browning (Guest)
on 2014-01-22 20:41
(Received via mailing list)
You haven't explicitly enabled invokedynamic, have you? This sounds very
close to the NoClassDefFoundErrors generated by enabling invokedynamic
on too old of a JVM version.

Ben
5969144beac5c774f674b841f7c15202?d=identicon&s=25 Michael Alletto (Guest)
on 2014-01-22 21:17
(Received via mailing list)
We have but this is the version of java:

java version "1.7.0_25"

Java(TM) SE Runtime Environment (build 1.7.0_25-b15)

Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
5969144beac5c774f674b841f7c15202?d=identicon&s=25 Michael Alletto (Guest)
on 2014-01-22 21:20
(Received via mailing list)
Actually let me correct this.  I thought we had, but looks like someone
removed it.  I'm putting it back.
5969144beac5c774f674b841f7c15202?d=identicon&s=25 Michael Alletto (Guest)
on 2014-01-22 22:30
(Received via mailing list)
With and without invokedynamic i still get the above error on and off.
I
cannot seem to consistently cause it to fail though.  I'm at a loss as
to
what to look at for more information.  It really sounds like
https://github.com/jruby/jruby/issues/1119 because it also throws the
uninitialized
constant Krypt::ASN1::BOOLEAN error
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.