# Logstash-input-imap SSL Error for Logstash 8.12

**URL:** <https://discuss.elastic.co/t/logstash-input-imap-ssl-error-for-logstash-8-12/354712>\
**Category:** Logstash\
**Created:** [March 5, 2024, 9:11am UTC](https://discuss.elastic.co/t/logstash-input-imap-ssl-error-for-logstash-8-12/354712 "2024-03-05T09:11:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![krissemmy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krissemmy/32/132313_2.png) [@krissemmy](https://discuss.elastic.co/u/krissemmy)\
**Post date:** [March 5, 2024, 9:11am UTC](https://discuss.elastic.co/t/logstash-input-imap-ssl-error-for-logstash-8-12/354712/1 "2024-03-05T09:11:44Z")

</div>

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:

```auto
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

```auto
[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**](https://discuss.elastic.co/t/logstash-input-imap-error-ssl/349772) but it doesn't work anymore.

I appreciate any and all help/feedback on this.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 5, 2024, 6:29pm UTC](https://discuss.elastic.co/t/logstash-input-imap-ssl-error-for-logstash-8-12/354712/2 "2024-03-05T18:29:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![krissemmy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krissemmy/32/132313_2.png) [@krissemmy](https://discuss.elastic.co/u/krissemmy)\
**Post date:** [March 5, 2024, 7:55pm UTC](https://discuss.elastic.co/t/logstash-input-imap-ssl-error-for-logstash-8-12/354712/3 "2024-03-05T19:55:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![krissemmy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krissemmy/32/132313_2.png) [@krissemmy](https://discuss.elastic.co/u/krissemmy)\
**Post date:** [March 5, 2024, 7:59pm UTC](https://discuss.elastic.co/t/logstash-input-imap-ssl-error-for-logstash-8-12/354712/4 "2024-03-05T19:59:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 2, 2024, 7:59pm UTC](https://discuss.elastic.co/t/logstash-input-imap-ssl-error-for-logstash-8-12/354712/5 "2024-04-02T19:59:21Z")

</div>

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