Connect to Oracle DB using JDBC input plugin


I'm able to connect to oracle database using oracle jdbc thin driver with the below config file. In the original config file we have the username/password parameters defined.

input {
    jdbc {
          jdbc_validate_connection => true
          jdbc_connection_string => "jdbc:oracle:thin:@<host>:<port>/<service>"
          jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
          statement_filepath => "filename"

But now we want to connect to the same oracle database in a more secure manner by using the TCPS port (using TLS).

I just tried by replacing TCP port# with TCPS port# in the connection string, but got below error:
Unable to connect to database. Tried 1 times {:error_message=>"Java::JavaSql::SQLRecoverableException: IO Error: Connection reset"}

The reference logstash document for jdbc input plugin does not says anything about using certs/TLS or I may be missing something.
Is there is any reference document to configure logstash for oracle TLS connection, or if anyone can help us on the parameters which we would have to update for TLS connections.


That is really an Oracle question rather than a logstash question. You enable tcps in the connection string. This is old, but frequently referenced.

Adding few more details.

We have oracle client working on the same server, and when we try sqlplus to test the connection for the same db using TCPS, then it is working fine with some properties (as mentioned in the document shared by you) defined in oracle client sqlnet/tns file.

My doubt here is, do we need to explicitly configure any logstash property to use TCPS port when connecting to oracle database using logstash jdbc input plugin ?

wondering if anyone else is connecting logstash to oracle using jdbc input plugin with SSL enabled.

Has anyone figured this out, is this Oracle SSL (TCPS) feature available with JDBC input plugin?

Nothing yet. we are still trying to find workaround.

Did anyone tried connecting to oracle database using jdbc input for TCPS.

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