# Logstash JDBC SSL Error

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631>\
**Category:** Logstash\
**Created:** [November 27, 2019, 8:27am UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631 "2019-11-27T08:27:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [November 27, 2019, 8:27am UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/1 "2019-11-27T08:27:13Z")

</div>

Hi,

I'm trying to use jdbc-input plugin to pull the data from oracle. It is working fine when using TCP connection string, but getting below error when trying to connect using TCP"S" connection (SSL).

[ERROR][logstash.inputs.jdbc][main] Unable to connect to database. Tried 1 times {:error\_message=\>"Java::JavaSql::SQLRecoverableException: IO Error: Connection reset"}

I'm unable to find option to connect to oracle database using TCPS(SSL) connection. Please let me know if there is any such option available in other plugin.

---

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [November 29, 2019, 2:52am UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/2 "2019-11-29T02:52:29Z")

</div>

Please let me know if anyone came across similar issue.

---

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [December 18, 2019, 9:20pm UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/3 "2019-12-18T21:20:57Z")

</div>

Still waiting for update..  
It seems no one tried this option of using TCPS connection in oracle:jdbc as input to logstash.

---

<div class="post-metadata">

**Author:** ![Jugsofbeer](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@Jugsofbeer](https://discuss.elastic.co/u/Jugsofbeer)\
**Post date:** [December 18, 2019, 9:56pm UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/4 "2019-12-18T21:56:20Z")

</div>

Hi,

Are you connecting to an HTTPS address where the certificate is signed by an internal issuer ? or a widely used/common public issuer ?

---

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [December 18, 2019, 10:50pm UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/5 "2019-12-18T22:50:53Z")

</div>

I'm connecting as common user. The source oracle database has listeners running on both TCP and TCPS. With TCP, my logstash is able to connect but its not working with TCPS.  
With same user, when I'm trying sqlplus with both (TCP/TCPS) it is working.

It seems I might be missing some ssl enabled parameter in logstash. not sure though.

---

<div class="post-metadata">

**Author:** ![Jugsofbeer](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@Jugsofbeer](https://discuss.elastic.co/u/Jugsofbeer)\
**Post date:** [December 18, 2019, 11:42pm UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/6 "2019-12-18T23:42:31Z")

</div>

Can you post your config file... change out the password and url for dummy values first.

its probably something subtle

---

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [December 19, 2019, 1:02am UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/7 "2019-12-19T01:02:08Z")

</div>

Below is my sample config file

input {  
jdbc {  
jdbc\_validate\_connection =\> true  
jdbc\_connection\_string =\> "jdbc:oracle:thin:@:/"  
jdbc\_user =\> "user"  
jdbc\_password =\> "\*\*"  
jdbc\_driver\_class =\> "Java::oracle.jdbc.driver.OracleDriver"  
statement\_filepath =\> "dummy"  
codec =\> plain {  
charset =\> "UTF-8"  
}  
}  
}  
output {  
}

---

<div class="post-metadata">

**Author:** ![Jugsofbeer](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@Jugsofbeer](https://discuss.elastic.co/u/Jugsofbeer)\
**Post date:** [December 19, 2019, 3:01am UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/8 "2019-12-19T03:01:16Z")

</div>

I dont have oracle at hand at the moment to test before I post... but im wondering if its down to something simple like the format of the connection string and the error message not being helpful.

For example, if the database to which you want to connect resides on host `prodHost` , at port `1521` , and system identifier (SID) `ORCL`

jdbc\_connection\_string =\> "jdbc:oracle:thin:@prodHost:1521:ORCL"

[https://docs.oracle.com/cd/B28359\_01/java.111/b31224/jdbcthin.htm](https://docs.oracle.com/cd/B28359_01/java.111/b31224/jdbcthin.htm)

---

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [December 19, 2019, 3:08am UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/9 "2019-12-19T03:08:01Z")

</div>

Thank you for the update.

I had updated same in my sample config file.. somehow it didn't posted the complete message.  
I'm using same connection string format which you have mentioned. It is working when I'm using TCP port/sid, and not working with TCPS port/sid.

The source oracle database is accepting connection on both (TCP and TCPS), but somehow logstash is unable to connect when using TCPS.

---

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [January 13, 2020, 8:54pm UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/10 "2020-01-13T20:54:42Z")

</div>

Still wondering if there is any such option in logstash.

---

<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:** [February 10, 2020, 8:54pm UTC](https://discuss.elastic.co/t/logstash-jdbc-ssl-error/209631/11 "2020-02-10T20:54:52Z")

</div>

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