Logstash-input-imap SSL Error for Logstash 8.12

Hello there, i have a logstash v8.12 and Imap input plugin v3.2.1. And I use Ubuntu 22.04
Below is my Logstash file:

input{
    imap {
        type => mail
        host => "imap.gmail.com"
        user => "forgcp24@gmail.com"
        password => "my-password"
        port => 993
        secure => "true"
        check_interval => 1
        save_attachments => "true"
        content_type => "multipart/mixed"
    }
}
output {
    file {
        path => "email-logs.txt"
    }
}

and here is the SSL error I encounter

[ERROR] 2024-03-05 08:55:04.898 [[main]<imap] imap - Encountered error Java::JavaLang::NullPointerException {:message=>"Cannot invoke \"org.jruby.ext.openssl.SSLContext$InternalContext.getSSLContext()\" because \"this.internalContext\" is null", :backtrace=>["org.jruby.ext.openssl.SSLContext.createSSLEngine(SSLContext.java:782)", "org.jruby.ext.openssl.SSLSocket.ossl_ssl_setup(SSLSocket.java:220)", "org.jruby.ext.openssl.SSLSocket.connectImpl(SSLSocket.java:298)", "org.jruby.ext.openssl.SSLSocket.connect_nonblock(SSLSocket.java:287)", "org.jruby.ext.openssl.SSLSocket$INVOKER$i$connect_nonblock.call(SSLSocket$INVOKER$i$connect_nonblock.gen)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:466)"

I have checked out a solution for a similar issue here but it doesn't work anymore.

I appreciate any and all help/feedback on this.

The issue you link to says you need to downgrade to 8.9, because IMAP is broken in 8.10 or newer. Yet you are saying you are using 8.12. Did you downgrade to 8.9 or not?

Yes i downgraded to v8.9 and tried it, but it didn't work. I still got the same error message.

I also forgot to mention that I tried other emails such as Yahoo, Outlook, and Hotmail, and I still received the same SSL error message.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.