Logstash 8.15.2 Imap Input plugin SSL Error

Hello,

I’m running logstash 8.15.2 and running into the below IMAP input plugin error.

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:784)", "org.jruby.ext.openssl.SSLSocket.ossl_ssl_setup(SSLSocket.java:221)", "org.jruby.ext.openssl.SSLSocket.connectImpl(SSLSocket.java:299)", "org.jruby.ext.openssl.SSLSocket.connect_nonblock(SSLSocket.java:288)", "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)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:244)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:314)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)", "org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:88)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)", "org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:228)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:476)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:293)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:324)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)", "org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:76)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)",

I can confirm my IMAP server supports SSL/TLS.

image

I see from previous posts regarding this error it states to downgrade to logstash 8.9. But this didn’t resolve the problem for everyone.

My config is below

input {

imap {

    host => "imap.gmail.com"

    port => 993

    user => "user@gmail.com"

    password => "${imap_pwd}"

    check_interval => 300

    folder => "INBOX"

    secure => true

}

}

Please advise on how I can resolve this issue.

First you need to upgrade to the last version, 8.19.2 to see if this issue still exists or if it was already fixed.

ok. Let me try that and will advise

It is not clear to me that the imap input is supported. There is an issue that appears to say it will not work with any 8.10+ logstash version due to changes in the libraries it depends upon, and making any updates to the plugin requires re-architecting the test suite. There have been no changes checked in for the last two years, and I wouldn’t hold my breath waiting for any to come.