Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Could not load OpenSSL. with jruby 9.2.0.0-SNAPSHOT #6228

Closed
yahonda opened this issue Dec 26, 2017 · 14 comments
Closed

Could not load OpenSSL. with jruby 9.2.0.0-SNAPSHOT #6228

yahonda opened this issue Dec 26, 2017 · 14 comments

Comments

@yahonda
Copy link

yahonda commented Dec 26, 2017

This issue has been created at rsim/oracle-enhanced#1614

  • What did you do?
    Execute CI using Travis CI using jruby-head

  • What did you expect to happen?
    It should run CI.

  • What happened instead?
    It gets Could not load OpenSSL.

Fetching https://github.com/rails/arel.git
Fetching https://github.com/rsim/ruby-plsql.git
Fetching https://github.com/colszowka/simplecov.git
The dependency ruby-oci8 (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for java but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
The dependency byebug (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for java but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
Fetching https://github.com/kubo/ruby-oci8.git
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using
RVM are available at rvm.io/packages/openssl.
The command "bundle install" failed and exited with 17 during .

Here is the entire output

  • Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?

I tried replacing https with http as it may be related with SSL by this commit.

Then it gets this error.

NameError: uninitialized constant Bundler::RubygemsIntegration::YamlLibrarySyntaxError
Did you mean?  Bundler::YamlSyntaxError

Here is the entire output.

@yahonda
Copy link
Author

yahonda commented Dec 26, 2017

The last successful build https://travis-ci.org/rsim/oracle-enhanced/builds/320343001 at 2017-12-22 18:55:45
The first failed build https://travis-ci.org/rsim/oracle-enhanced/builds/320733240 at 2017-12-23 18:52:58

Between these two builds no commits made to the rsim/oracle-enhanced repository. There is a daily build scheduled.

@segiddins
Copy link
Member

Can you please share the output of bundle env? Thank you

@yahonda
Copy link
Author

yahonda commented Dec 27, 2017

Here is the output of bundle env

Environment

Bundler       1.16.1
  Platforms   ruby, universal-java-1.8
Ruby          2.4.1p0 (2017-12-26 revision 58053) [java]
  Full Path   /home/travis/.rvm/rubies/jruby-head/bin/jruby
  Config Dir  /home/travis/.rvm/rubies/jruby-head/etc
RubyGems      2.7.4
  Gem Home    /home/travis/.rvm/gems/jruby-head
  Gem Path    /home/travis/.rvm/gems/jruby-head:/home/travis/.rvm/gems/jruby-head@global
  User Path   /home/travis/.gem/jruby/2.4.0
  Bin Dir     /home/travis/.rvm/gems/jruby-head/bin
Tools         
  Git         2.15.1
  RVM         1.29.3 (latest)
  rbenv       rbenv 1.1.1-25-g6aa70b6
  chruby      not installed
Gem.ruby      /home/travis/.rvm/rubies/jruby-head/bin/jruby
bundle #!     /usr/bin/env jruby_executable_hooks

Bundler Build Metadata

Built At          2017-12-21
Git SHA           0034ef341
Released Version  true

Bundler settings

gemfile
  Set via BUNDLE_GEMFILE: "/home/travis/build/yahonda/oracle-enhanced/Gemfile"

Gemfile

Gemfile

# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
group :development do
  gem "rspec"
  gem "rdoc"
  gem "rake"
  gem "activerecord",   github: "rails/rails", branch: "master"
  gem "arel",   github: "rails/arel", branch: "master"
  gem "ruby-plsql", github: "rsim/ruby-plsql", branch: "master"
  platforms :ruby do
    gem "ruby-oci8",    github: "kubo/ruby-oci8"
    gem "byebug"
  end
  platforms :jruby do
    gem "pry"
    gem "pry-nav"
  end
end
group :test do
  gem "simplecov",  github: "colszowka/simplecov", branch: "master", require: false
end

Gemfile.lock

<No /home/travis/build/yahonda/oracle-enhanced/Gemfile.lock found>

@yahonda
Copy link
Author

yahonda commented Dec 27, 2017

Entire output of the failed build https://travis-ci.org/yahonda/oracle-enhanced/jobs/322171825

@hsbt
Copy link
Member

hsbt commented Dec 27, 2017

@yahonda Can you reproduce with your local env?

@yahonda
Copy link
Author

yahonda commented Dec 27, 2017

@hsbt So far I have not reproduced this in my local environment. Let me try again.

@yahonda
Copy link
Author

yahonda commented Dec 27, 2017

It reproduces locally using Vagrant.

Install software

  • Vagrant 2.0.1
  • VirtualBox Version 5.2.4
  • Oracle Database 11g Express Edition for Linux x64. The file name is oracle-xe-11.2.0-1.0.x86_64.rpm.zip.

http://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html

Steps to reproduce:

  • At Vagrant host
host $ git clone -b runs_oracle https://github.com/yahonda/rails-dev-box.git
host $ cp oracle-xe-11.2.0-1.0.x86_64.rpm.zip rails-dev-box/puppet/modules/oracle/files/.
host $ cd rails-dev-box
host $ vagrant up
host $ vagrant ssh

vagrant up would take 10 minutes to complete.

  • At Vagrant guest (rails-dev-box)
$ sudo apt-get install python-software-properties -y
$ sudo apt-add-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer -y
$ sudo apt-get install oracle-java8-set-default -y
$ export JRUBY_OPTS='--debug --dev -J-Xmx2048M'
$ export JAVA_HOME=/usr/lib/jvm/java-8-oracle

$ rvm install jruby-head
$ rvm --default use jruby-head
$ gem update --system
$ gem install bundler

$ git clone https://github.com/rsim/oracle-enhanced.git
$ cd oracle-enhanced/
$ bundle env
$ bundle install

@yahonda
Copy link
Author

yahonda commented Dec 27, 2017

Actual result:

vagrant@rails-dev-box:~/oracle-enhanced$ bundle install
Fetching https://github.com/rails/rails.git
Fetching https://github.com/rails/arel.git
Fetching https://github.com/rsim/ruby-plsql.git
Fetching https://github.com/colszowka/simplecov.git
The dependency ruby-oci8 (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for java but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
The dependency byebug (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for java but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
Fetching https://github.com/kubo/ruby-oci8.git
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using
RVM are available at rvm.io/packages/openssl.
vagrant@rails-dev-box:~/oracle-enhanced$

Here is the entire output at Vagrant guest

@yahonda
Copy link
Author

yahonda commented Dec 27, 2017

Added DEBUG_RESOLVER=true bundle install --verbose output below. Not sure if it would help.

vagrant@rails-dev-box:~/oracle-enhanced$ DEBUG_RESOLVER=true bundle install --verbose
Starting resolution (2017-12-27 19:04:45 UTC)
User-requested dependencies: [#<Gem::Resolver::DependencyRequest:0x5db45159 @dependency=<Gem::Dependency type=:runtime name="did_you_mean" requirements="= 1.0.1">, @requester=nil>, #<Gem::Resolver::DependencyRequest:0x6107227e @dependency=<Gem::Dependency type=:runtime name="executable-hooks" requirements="= 1.3.2">, @requester=nil>, #<Gem::Resolver::DependencyRequest:0x7c417213 @dependency=<Gem::Dependency type=:runtime name="bundler-unload" requirements="= 1.0.2">, @requester=nil>, #<Gem::Resolver::DependencyRequest:0x15761df8 @dependency=<Gem::Dependency type=:runtime name="rubygems-bundler" requirements="= 1.4.4">, @requester=nil>, #<Gem::Resolver::DependencyRequest:0x6ab7a896 @dependency=<Gem::Dependency type=:runtime name="bundler" requirements="= 1.16.1">, @requester=nil>]
Resolving dependencies...Creating possibility state for did_you_mean (= 1.0.1) (1 remaining)
 Attempting to activate did_you_mean-1.0.1
 Activated did_you_mean at did_you_mean-1.0.1
 Requiring nested dependencies ()
 Creating possibility state for executable-hooks (= 1.3.2) (1 remaining)
  Attempting to activate executable-hooks-1.3.2
  Activated executable-hooks at executable-hooks-1.3.2
  Requiring nested dependencies ()
  Creating possibility state for bundler-unload (= 1.0.2) (1 remaining)
   Attempting to activate bundler-unload-1.0.2
   Activated bundler-unload at bundler-unload-1.0.2
   Requiring nested dependencies ()
   Creating possibility state for rubygems-bundler (= 1.4.4) (1 remaining)
    Attempting to activate rubygems-bundler-1.4.4
    Activated rubygems-bundler at rubygems-bundler-1.4.4
    Requiring nested dependencies (executable-hooks (>= 1.3.2), bundler-unload (>= 1.0.2))
    Creating possibility state for executable-hooks (>= 1.3.2) (1 remaining)
     Attempting to activate executable-hooks-1.3.2
     Found existing spec (executable-hooks-1.3.2)
     Creating possibility state for bundler-unload (>= 1.0.2) (1 remaining)
      Attempting to activate bundler-unload-1.0.2
      Found existing spec (bundler-unload-1.0.2)
      Creating possibility state for bundler (= 1.16.1) (1 remaining)
       Attempting to activate bundler-1.16.1
       Activated bundler at bundler-1.16.1
       Requiring nested dependencies ()

Finished resolution (7 steps) (Took 0.063195 seconds) (2017-12-27 19:04:45 UTC)
Unactivated:
Activated: did_you_mean, executable-hooks, bundler-unload, rubygems-bundler, bundler
Running `bundle install --verbose` with bundler 1.16.1
Fetching https://github.com/rails/rails.git
Fetching https://github.com/rails/arel.git
Fetching https://github.com/rsim/ruby-plsql.git
Fetching https://github.com/colszowka/simplecov.git
Found changes from the lockfile, re-resolving dependencies because the list of sources changed, the dependencies in your gemfile changed, you added a new platform to your gemfile
The dependency ruby-oci8 (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for java but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
The dependency byebug (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for java but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
Fetching https://github.com/kubo/ruby-oci8.git
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using
RVM are available at rvm.io/packages/openssl.
vagrant@rails-dev-box:~/oracle-enhanced$

@yahonda
Copy link
Author

yahonda commented Dec 27, 2017

Using rubygems 2.6.4 changes some bahavior. It does not show Could not load OpenSSL. but failed to install ffi.

Installing ffi 1.9.18 (java)
Gem::InstallError: invalid gem: package metadata is missing in
/home/vagrant/.rvm/gems/jruby-head/cache/ffi-1.9.18-java.gem
An error occurred while installing ffi (1.9.18), and Bundler cannot
continue.
Make sure that `gem install ffi -v '1.9.18'` succeeds before bundling.

In Gemfile:
  pry-nav was resolved to 0.2.4, which depends on
    pry was resolved to 0.10.4, which depends on
      spoon was resolved to 0.0.6, which depends on
        ffi
vagrant@rails-dev-box:~/oracle-enhanced$ gem -v
  • Entire output:
vagrant@rails-dev-box:~/oracle-enhanced$ bundle install
Fetching https://github.com/rails/rails.git
Fetching https://github.com/rails/arel.git
Fetching https://github.com/rsim/ruby-plsql.git
Fetching https://github.com/colszowka/simplecov.git
The dependency ruby-oci8 (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for java but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
The dependency byebug (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for java but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
Fetching https://github.com/kubo/ruby-oci8.git
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies................
Using rake 12.3.0
Fetching concurrent-ruby 1.0.5 (java)
Installing concurrent-ruby 1.0.5 (java)
Fetching i18n 0.9.1
Installing i18n 0.9.1
Fetching minitest 5.10.3
Installing minitest 5.10.3
Fetching thread_safe 0.3.6 (java)
Installing thread_safe 0.3.6 (java)
Fetching tzinfo 1.2.4
Installing tzinfo 1.2.4
Using activesupport 5.2.0.beta2 from https://github.com/rails/rails.git (at master@17ad4eb)
jar-dependencies: spec must be either String or Gem::Specification
Using activemodel 5.2.0.beta2 from https://github.com/rails/rails.git (at master@17ad4eb)
jar-dependencies: spec must be either String or Gem::Specification
Using arel 9.0.0 from https://github.com/rails/arel.git (at master@bb0e60f)
jar-dependencies: spec must be either String or Gem::Specification
Using activerecord 5.2.0.beta2 from https://github.com/rails/rails.git (at master@17ad4eb)
jar-dependencies: spec must be either String or Gem::Specification
Using bundler 1.16.1
Fetching coderay 1.1.2
Installing coderay 1.1.2
Fetching diff-lcs 1.3
Installing diff-lcs 1.3
Fetching docile 1.1.5
Installing docile 1.1.5
Fetching ffi 1.9.18 (java)
Installing ffi 1.9.18 (java)
Gem::InstallError: invalid gem: package metadata is missing in
/home/vagrant/.rvm/gems/jruby-head/cache/ffi-1.9.18-java.gem
An error occurred while installing ffi (1.9.18), and Bundler cannot
continue.
Make sure that `gem install ffi -v '1.9.18'` succeeds before bundling.

In Gemfile:
  pry-nav was resolved to 0.2.4, which depends on
    pry was resolved to 0.10.4, which depends on
      spoon was resolved to 0.0.6, which depends on
        ffi
vagrant@rails-dev-box:~/oracle-enhanced$ gem -v
2.6.14
vagrant@rails-dev-box:~/oracle-enhanced$ ruby -v
jruby 9.2.0.0-SNAPSHOT (2.4.1) 2017-12-27 7bd10a6 Java HotSpot(TM) 64-Bit Server VM 25.151-b12 on 1.8.0_151-b12 [linux-x86_64]
vagrant@rails-dev-box:~/oracle-enhanced$ bundler -v
Bundler version 1.16.1
vagrant@rails-dev-box:~/oracle-enhanced$

@segiddins
Copy link
Member

Does running ruby -ropenssl -e 'p OpenSSL' succeed for you? Because if not, that would imply that OpenSSL is actually not available to load

@yahonda
Copy link
Author

yahonda commented Dec 30, 2017

It shows OpenSSL

$ ruby -ropenssl -e 'p OpenSSL
OpenSSL

Refer line 860.
https://travis-ci.org/yahonda/oracle-enhanced/jobs/323192740

@yahonda
Copy link
Author

yahonda commented Jan 17, 2018

Fortunately, this error has not reproduced recently.

Compared JRuby commits jruby/jruby@37904ac...1f53471 but I am unable to find related changes. Since both RubyGems and Bundler versions are same I do not know why it has been fixed.

I'm going to close this. Thanks for the help and comments.

@hsbt
Copy link
Member

hsbt commented Jan 17, 2018

@yahonda Thanks for your additional information.

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

No branches or pull requests

3 participants