Skip to content

0.15.6 - Jruby 9.2.7.0 compatibility issue (with java JDK8). #348

@edefaria

Description

@edefaria

Latest release of jruby-openssl 0.15.6 breaks/is not compatible with Jruby 9.2.7.0.
You set matrix compatibility with 0.15.X to 9.2.x-9.4.x in the project page/github README.

I used to install jruby-9.2.7.0 with rvm script (with openjdk env) :

        apt-get update; \
        apt-get install -y --no-install-recommends gnupg2; \
        curl -sSL https://rvm.io/mpapis.asc | gpg2 --import && \
        curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import && \
        curl -sSL https://get.rvm.io | bash -s stable --ruby=jruby-9.2.7.0 

During the install rvm update jruby-openssl to the latest possible compatible version (today 0.15.6), after it update jruby-openssl to 0.15.6, gem is broken due to jruby-openssl defect.
I use this in CI/CD to build a Jruby 9.2.7.0 based product for years, with jruby-openssl 0.15.3, it was still working without issue with Jruby 9.2.7.0.
It is 9.2.X.X still support with 0.15.6 ?

gem crashed with the following error after upgrade to jruby-openssl to 0.15.6, try lots of openssl/libssl-devel (1.1.1,3.[0-6]) without fixing the error.

9.650 ERROR:  While executing gem ... (NoMethodError)
9.650     undefined method `invoke_with_build_args' for nil:NilClass
15.16 ERROR:  Loading command: install (NameError)
15.16 	cannot load (ext) (org.jruby.ext.openssl.OpenSSL)
15.29 ERROR:  While executing gem ... (NoMethodError)
15.29     undefined method `invoke_with_build_args' for nil:NilClass

I write a Docker test close to my environment with jruby-openssl 0.15.3,0.15.5,0.15.6 with jruby 9.2.7.0, only 0.15.6 is defect, 0.15.3 & 0.15.5 work.

FROM ubuntu:noble

RUN     cd /opt && \
        apt-get update; \
        apt-get install -y --no-install-recommends gnupg2 curl ca-certificates ; \
        curl -sSL https://rvm.io/mpapis.asc | gpg2 --import && \
        curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import && \
        curl -sSL https://get.rvm.io | bash -s stable --ruby=jruby-9.2.7.0 --without-gems=jruby-openssl ; \
        rm -rf /var/lib/apt/lists/*

RUN     bash -c 'source /etc/profile.d/rvm.sh ; gem install ffi --version=1.15.5'
RUN     bash -c 'source /etc/profile.d/rvm.sh ; gem uninstall ffi --version=1.15.5'

RUN     curl "https://rubygems.org/downloads/jruby-openssl-0.15.3-java.gem" -o "/tmp/jruby-openssl-0.15.3-java.gem" ; \
        bash -c 'source /etc/profile.d/rvm.sh ; gem install --local /tmp/jruby-openssl-0.15.3-java.gem'

RUN     bash -c 'source /etc/profile.d/rvm.sh ; gem install ffi --version=1.15.5'
RUN     bash -c 'source /etc/profile.d/rvm.sh ; gem uninstall ffi --version=1.15.5'

RUN     curl "https://rubygems.org/downloads/jruby-openssl-0.15.5-java.gem" -o "/tmp/jruby-openssl-0.15.5-java.gem" ; \
        bash -c 'source /etc/profile.d/rvm.sh ; gem uninstall jruby-openssl --version=0.15.3' ; \
        bash -c 'source /etc/profile.d/rvm.sh ; gem install --local /tmp/jruby-openssl-0.15.5-java.gem'

RUN     bash -c 'source /etc/profile.d/rvm.sh ; gem install ffi --version=1.15.5'
RUN     bash -c 'source /etc/profile.d/rvm.sh ; gem uninstall ffi --version=1.15.5'

RUN     curl "https://rubygems.org/downloads/jruby-openssl-0.15.6-java.gem" -o "/tmp/jruby-openssl-0.15.6-java.gem" ; \
        bash -c 'source /etc/profile.d/rvm.sh ; gem uninstall jruby-openssl --version=0.15.5' ; \
        bash -c 'source /etc/profile.d/rvm.sh ; gem install --local /tmp/jruby-openssl-0.15.6-java.gem'

RUN     bash -c 'source /etc/profile.d/rvm.sh ; gem install ffi --version=1.15.5'
RUN     bash -c 'source /etc/profile.d/rvm.sh ; gem uninstall ffi --version=1.15.5'

The error with gem after installing jruby-openssl-0.15.6 :

#15 5.327 Error loading RubyGems plugin "/usr/local/rvm/gems/jruby-9.2.7.0/gems/gem-wrappers-1.4.0/lib/rubygems_plugin.rb": cannot load (ext) (org.jruby.ext.openssl.OpenSSL) (NameError)
#15 5.757 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant OPENSSL_NO_SOCK
#15 5.758 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant TLS_DH_anon_WITH_AES_256_GCM_SHA384
#15 5.759 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant HAVE_TLSEXT_HOST_NAME
#15 5.761 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant PKCS1_PADDING
#15 5.763 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant SSLV23_PADDING
#15 5.763 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant NO_PADDING
#15 5.765 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant PKCS1_OAEP_PADDING
#15 5.768 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant NAMED_CURVE
#15 5.776 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant EOC
#15 5.777 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant BOOLEAN
#15 5.778 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant INTEGER
#15 5.779 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant BIT_STRING
#15 5.780 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant OCTET_STRING
#15 5.780 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant NULL
#15 5.781 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant OBJECT
#15 5.782 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant OBJECT_DESCRIPTOR
#15 5.783 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant EXTERNAL
#15 5.784 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant REAL
#15 5.785 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant ENUMERATED
#15 5.787 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant EMBEDDED_PDV
#15 5.787 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant UTF8STRING
#15 5.788 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant RELATIVE_OID
#15 5.789 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant SEQUENCE
#15 5.790 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant SET
#15 5.791 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant NUMERICSTRING
#15 5.792 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant PRINTABLESTRING
#15 5.793 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant T61STRING
#15 5.794 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant VIDEOTEXSTRING
#15 5.795 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant IA5STRING
#15 5.796 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant UTCTIME
#15 5.797 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant GENERALIZEDTIME
#15 5.798 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant GRAPHICSTRING
#15 5.799 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant ISO64STRING
#15 5.799 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant GENERALSTRING
#15 5.800 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant UNIVERSALSTRING
#15 5.801 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant CHARACTER_STRING
#15 5.802 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant BMPSTRING
#15 5.803 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant UNIVERSAL_TAG_NAME
#15 5.806 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant COMPAT
#15 5.807 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant RFC2253
#15 5.808 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant ONELINE
#15 5.809 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant MULTILINE
#15 5.810 /usr/local/rvm/gems/jruby-9.2.7.0/gems/jruby-openssl-0.15.6-java/lib/jopenssl/load.rb:26: warning: already initialized constant DEFAULT_OBJECT_TYPE
#15 5.822 ERROR:  Loading command: install (NameError)
#15 5.822 	cannot load (ext) (org.jruby.ext.openssl.OpenSSL)
#15 5.966 ERROR:  While executing gem ... (NoMethodError)
#15 5.966     undefined method `invoke_with_build_args' for nil:NilClass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions