Skip to content

OpenSSL::SSL::SSLError: SSL_read: unexpected eof while reading with OpenSSL 3.x #90

Description

@voxik

Executing excon test suite with Ruby 3.1 and OpenSSL 3.0, I observe following errors:

  Excon basics (ssl) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[2022-02-23 03:58:50] ERROR OpenSSL::SSL::SSLError: SSL_read: unexpected eof while reading
	/usr/share/ruby/openssl/buffering.rb:80:in `sysread'
	/usr/share/ruby/openssl/buffering.rb:80:in `fill_rbuff'
	/usr/share/ruby/openssl/buffering.rb:332:in `eof?'
	/usr/share/gems/gems/webrick-1.7.0/lib/webrick/httpserver.rb:82:in `run'
	/usr/share/gems/gems/webrick-1.7.0/lib/webrick/server.rb:310:in `block in start_thread'

This reminds me issues I had with Puma. There is also more details in ruby/openssl ticket

Activity

  1. voxik commented on Mar 4, 2022

    @voxik
    Author
  2. geemus commented on Mar 4, 2022

    @geemus

    @voxik Thanks for the heads up. I don't think I've otherwise seen this, but I may just forget. Just let me know if I can help.

  3. voxik commented on Mar 4, 2022

    @voxik
    Author

    OpenSSL 3.0 is not widely available yet. But it is default on Fedora 36+ and CentOS Stream 9

  4. mpalmer commented on Dec 2, 2024

    @mpalmer

    I'm getting what appears to be a very similar error in an SSL-enabled WEBrick server, on every connection attempt:

    [2024-12-02 13:45:03] ERROR OpenSSL::SSL::SSLError: SSL session is not started yet
            [...]/ruby/3.2.0/gems/openssl-3.2.0/lib/openssl/buffering.rb:80:in `sysread'
            [...]/ruby/3.2.0/gems/openssl-3.2.0/lib/openssl/buffering.rb:80:in `fill_rbuff'
            [...]/ruby/3.2.0/gems/openssl-3.2.0/lib/openssl/buffering.rb:329:in `eof?'
            [...]/ruby/3.2.0/gems/webrick-1.9.0/lib/webrick/httpserver.rb:82:in `run'
            [...]/ruby/3.2.0/gems/webrick-1.9.0/lib/webrick/server.rb:310:in `block in start_thread'
    
    ldd [...]/ruby/3.2.0/extensions/x86_64-linux/3.2.0/openssl-3.2.0/openssl.so
    [...]
            linux-vdso.so.1 (0x00007ffc6e13b000)
            libruby.so.3.2 => /usr/local/lib/rubies/3.2.1/lib/libruby.so.3.2 (0x00007f90cbe7f000)
            libssl.so.3 => /usr/lib/x86_64-linux-gnu/libssl.so.3 (0x00007f90cbdb7000)
            libcrypto.so.3 => /usr/lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f90cb931000)
    [...]
    

    libssl.so.3 is provided by libssl3_3.0.15-1~deb12u1.

    Any other info needed to reproduce, please ask.

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

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