jopenssl/version not loading #52

Closed
cmw opened this Issue Aug 19, 2011 · 5 comments

Comments

Projects
None yet
2 participants
@cmw

cmw commented Aug 19, 2011

When loading my rails app from a compiled war, this error occurs (several times) during loading the app:

INFO: An exception happened during JRuby-Rack startup
load error: jopenssl -- java.lang.RuntimeException: (LoadError) no such file to load -- jopenssl/version

In a rails console (java -cp org.jruby.Main -S rails console production) on the server the file loads correctly.

The full error output can be found here: https://gist.github.com/1157043

Any hints greatly appreciated.
Chris

@nicksieger

This comment has been minimized.

Show comment
Hide comment
@nicksieger

nicksieger Aug 23, 2011

Member

Can you set the system property -Djruby.debug.loadService=true in your container/JVM and regenerate the error? I'd be interested to see why it isn't loading. Is Tomcat fully unpacking the war file when it's deployed?

Note: also filed at jruby/jruby-ossl#10

Member

nicksieger commented Aug 23, 2011

Can you set the system property -Djruby.debug.loadService=true in your container/JVM and regenerate the error? I'd be interested to see why it isn't loading. Is Tomcat fully unpacking the war file when it's deployed?

Note: also filed at jruby/jruby-ossl#10

@cmw

This comment has been minimized.

Show comment
Hide comment
@cmw

cmw Aug 24, 2011

The war file is unpacked fully, judging from file counts. I also randomly checked for files and nothing seems missing.

I put that setting in and found this line:

LoadService: trying resourceFromLoadPath: '/var/lib/tomcat6/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.7.4/lib/jopenssl/version.rb' false false

and verified that that file is in place:

-rw-r--r-- 1 tomcat6 tomcat6 65 2011-08-22 18:30 /var/lib/tomcat6/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.7.4/lib/jopenssl/version.rb

All sorts of other files are found successfully.

Do you have any further idea from this?

PS: I'd have posted the whole log output about loadService, but it's like 60 MB now. I have grep'd for 'jopenssl/version' and that still is 1.2 MB, but I could send you that by mail if you liked.

I've found that gems are not compiled. Could that be a problem? (Since that loader looked for jopenssl/version.class, too)

cmw commented Aug 24, 2011

The war file is unpacked fully, judging from file counts. I also randomly checked for files and nothing seems missing.

I put that setting in and found this line:

LoadService: trying resourceFromLoadPath: '/var/lib/tomcat6/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.7.4/lib/jopenssl/version.rb' false false

and verified that that file is in place:

-rw-r--r-- 1 tomcat6 tomcat6 65 2011-08-22 18:30 /var/lib/tomcat6/webapps/ROOT/WEB-INF/gems/gems/jruby-openssl-0.7.4/lib/jopenssl/version.rb

All sorts of other files are found successfully.

Do you have any further idea from this?

PS: I'd have posted the whole log output about loadService, but it's like 60 MB now. I have grep'd for 'jopenssl/version' and that still is 1.2 MB, but I could send you that by mail if you liked.

I've found that gems are not compiled. Could that be a problem? (Since that loader looked for jopenssl/version.class, too)

@nicksieger

This comment has been minimized.

Show comment
Hide comment
@nicksieger

nicksieger Aug 24, 2011

Member

Not compiled shouldn't be a problem. I'm curious why it couldn't find the the file, that's very odd and worries me. The actual code is here, so for an unknown reason the Java filesystem checks are failing.

Member

nicksieger commented Aug 24, 2011

Not compiled shouldn't be a problem. I'm curious why it couldn't find the the file, that's very odd and worries me. The actual code is here, so for an unknown reason the Java filesystem checks are failing.

@nicksieger

This comment has been minimized.

Show comment
Hide comment
@nicksieger

nicksieger Sep 16, 2011

Member

Working with @cmw on this, we found that the Tomcat security manager was getting in the way. Closing.

Member

nicksieger commented Sep 16, 2011

Working with @cmw on this, we found that the Tomcat security manager was getting in the way. Closing.

@nicksieger nicksieger closed this Sep 16, 2011

@nicksieger

This comment has been minimized.

Show comment
Hide comment
@nicksieger

nicksieger Jun 22, 2012

Member

For those people wondering how the issue was resolved, the main thing is to follow the instructions in this post. It's written for TC 5.5 but it should apply to newer versions as well.

http://www.hiden.org/sysadmin/tomcat-5-5-and-ubuntu/

If you're skittish about turning off the security manager, then you might try dropping this in the policy.d directory for tomcat (don't recall where it is on the filesystem).

https://gist.github.com/de15ab3adf27a2698fb5#file_10jruby.policy

Member

nicksieger commented Jun 22, 2012

For those people wondering how the issue was resolved, the main thing is to follow the instructions in this post. It's written for TC 5.5 but it should apply to newer versions as well.

http://www.hiden.org/sysadmin/tomcat-5-5-and-ubuntu/

If you're skittish about turning off the security manager, then you might try dropping this in the policy.d directory for tomcat (don't recall where it is on the filesystem).

https://gist.github.com/de15ab3adf27a2698fb5#file_10jruby.policy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment