Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS-SDK Signer Information Does Not Match #108

Closed
dfinninger opened this issue Oct 19, 2016 · 3 comments
Closed

AWS-SDK Signer Information Does Not Match #108

dfinninger opened this issue Oct 19, 2016 · 3 comments

Comments

@dfinninger
Copy link

dfinninger commented Oct 19, 2016

Hello, I am trying to use the AWS SDK v2 for Ruby.

When preforming a require 'aws-sdk' I get the following stacktrace:

uri:classloader:/jruby/kernel/kernel.rb:28: warning: unsupported exec option: close_others
LoadError: load error: jopenssl/load -- java.lang.SecurityException: class "org.bouncycastle.asn1.ASN1Primitive"'s signer information does not match signer information of other classes in the same package
            require at org/jruby/RubyKernel.java:940
              <top> at /Users/dfinninger/.rvm/rubies/jruby-9.0.0.0/lib/ruby/stdlib/openssl.rb:1
            require at org/jruby/RubyKernel.java:940
              <top> at /Users/dfinninger/.rvm/rubies/jruby-9.0.0.0/lib/ruby/stdlib/net/https.rb:1
            require at org/jruby/RubyKernel.java:940
              <top> at /Users/dfinninger/.rvm/rubies/jruby-9.0.0.0/lib/ruby/stdlib/net/https.rb:22
     <class:(root)> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/net_http/connection_pool.rb:1
    <module:(root)> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/net_http/connection_pool.rb:2
    <module:(root)> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/plugins/net_http.rb:1
   <module:NetHttp> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/plugins/net_http.rb:18
              <top> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/plugins/net_http.rb:16
     <class:Client> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/plugins/net_http.rb:3
  <module:Seahorse> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/plugins/net_http.rb:2
    <module:(root)> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/plugins/net_http.rb:1
              <top> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/base.rb:1
      <module:Base> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/base.rb:10
              <top> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/base.rb:5
  block in Seahorse at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/base.rb:4
               call at org/jruby/RubyProc.java:308
    block in (root) at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/seahorse/client/base.rb:3
               each at org/jruby/RubyArray.java:1560
             (root) at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/aws-sdk-core/client.rb:1
              <top> at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/aws-sdk-core/client.rb:3
             (root) at /Users/dfinninger/.rvm/gems/jruby-9.0.0.0@paddock/gems/aws-sdk-core-2.2.1/lib/aws-sdk-core/client.rb:1
              <top> at bin/paddock:6

I also tried running in the newest version of the JRuby docker container:

bundler: failed to load command: bin/paddock (bin/paddock)
LoadError: load error: jopenssl/load -- java.lang.SecurityException: class "org.bouncycastle.crypto.params.ECNamedDomainParameters"'s signer information does not match signer information of other classes in the same package
  org/jruby/RubyKernel.java:956:in `require'
  /opt/jruby/lib/ruby/stdlib/openssl.rb:1:in `<main>'
  org/jruby/RubyKernel.java:956:in `require'
  /opt/jruby/lib/ruby/stdlib/net/https.rb:1:in `<main>'
  org/jruby/RubyKernel.java:956:in `require'
  /opt/jruby/lib/ruby/stdlib/net/https.rb:23:in `<main>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/net_http/connection_pool.rb:1:in `<class:(root)>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/net_http/connection_pool.rb:2:in `<module:(root)>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/plugins/net_http.rb:1:in `<module:(root)>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/plugins/net_http.rb:18:in `<module:NetHttp>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/plugins/net_http.rb:16:in `<main>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/plugins/net_http.rb:3:in `<class:Client>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/plugins/net_http.rb:2:in `<module:Seahorse>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/plugins/net_http.rb:1:in `<module:(root)>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/base.rb:1:in `<main>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/base.rb:10:in `<module:Base>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/base.rb:5:in `<main>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/base.rb:4:in `block in Seahorse'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/seahorse/client/base.rb:3:in `block in (root)'
  org/jruby/RubyArray.java:1734:in `each'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/aws-sdk-core/client.rb:1:in `(root)'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/aws-sdk-core/client.rb:3:in `<main>'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/aws-sdk-core/client.rb:1:in `(root)'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/aws-sdk-core.rb:1:in `<main>'
  org/jruby/RubyKernel.java:974:in `load'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/aws-sdk-core.rb:460:in `Aws'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/aws-sdk-core.rb:450:in `add_service'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/aws-sdk-core.rb:449:in `add_service'
  /usr/local/bundle/gems/aws-sdk-core-2.6.11/lib/aws-sdk-core/sqs.rb:5:in `(root)'
  /var/code/paddock/lib/paddock/downloader.rb:1:in `(root)'
  /var/code/paddock/lib/paddock/downloader.rb:8:in `initialize'
  bin/paddock:6:in `(root)'

JRuby version in container:

jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 OpenJDK 64-Bit Server VM 25.102-b14 on 1.8.0_102-8u102-b14.1-1~bpo8+1-b14 +jit [linux-x86_64]

If you need any more information, please let me know.

@mkristian
Copy link
Member

mkristian commented Oct 19, 2016 via email

@dfinninger
Copy link
Author

Thanks for the quick response!

That would make sense for my local development environment, however I wonder why that would be an issue in the JRuby Docker container.

I am using this image: FROM jruby:9.1.5-jdk (also tried the jre image, with the same results).

I'll root around a bit on my machine some more.

@dfinninger
Copy link
Author

So this is very interesting. Thank you for all of your help.

It seems to be a loading issue, as you mentioned. Specifically between the rika gem and the aws-sdk gem.

I had the following structure:

# ...
require 'aws-sdk'
require 'rika'

# ... code that uses aws sdk
# ... code that uses Rika

Swapping things around to:

# ...
require 'aws-sdk'
# ... code that uses aws sdk

require 'rika'
# ... code that uses Rika

made the error go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants