Does Logstash support oracle wallet for jdbc connection?

Hi , I am trying to use oracle wallet in logstash jdbc connection and I am getting below error in logs.

Unable to connect to database. Tried 1 times {:error_message=>"Java::JavaSql::SQLRecoverableException: IO Error: Unknown host specified "}

Jun 17 20:52:00 blp07601010 logstash: 2654 error:
Jun 17 20:52:00 blp07601010 logstash: 2654 2654
Jun 17 20:52:00 blp07601010 logstash: 2654 Sequel::DatabaseConnectionError
Jun 17 20:52:00 blp07601010 logstash: 2654 Java::JavaSql::SQLRecoverableException: IO Error: Unknown host specified
Jun 17 20:52:00 blp07601010 logstash: 2654 oracle.jdbc.driver.T4CConnection.logon(oracle/jdbc/driver/T4CConnection.java:743)
Jun 17 20:52:00 blp07601010 logstash: 2654 oracle.jdbc.driver.PhysicalConnection.connect(oracle/jdbc/driver/PhysicalConnection.java:666)
Jun 17 20:52:00 blp07601010 logstash: 2654 oracle.jdbc.driver.T4CDriverExtension.getConnection(oracle/jdbc/driver/T4CDriverExtension.java:32)
Jun 17 20:52:00 blp07601010 logstash: 2654 oracle.jdbc.driver.OracleDriver.connect(oracle/jdbc/driver/OracleDriver.java:566)
Jun 17 20:52:00 blp07601010 logstash: 2654 java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
Jun 17 20:52:00 blp07601010 logstash: 2654 org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:470)
Jun 17 20:52:00 blp07601010 logstash: 2654 org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:328)
Jun 17 20:52:00 blp07601010 logstash: 2654 usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_27_dot_0.lib.sequel.adapters.jdbc.connect(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.27.0/lib/sequel/adapters/jdbc.rb:227)
Jun 17 20:52:00 blp07601010 logstash: 2654 usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_27_dot_0.lib.sequel.connection_pool.make_new(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.27.0/lib/sequel/connection_pool.rb:122)
Jun 17 20:52:00 blp07601010 logstash: 2654 usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_27_dot_0.lib.sequel.connection_pool.threaded.assign_connection(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.27.0/lib/sequel/connection_pool/threaded.rb:209)
Jun 17 20:52:00 blp07601010 logstash: 2654 usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_27_dot_0.lib.sequel.connection_pool.threaded.acquire(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.27.0/lib/sequel/connection_pool/threaded.rb:139)
Jun 17 20:52:00 blp07601010 logstash: 2654 usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_27_dot_0.lib.sequel.connection_pool.threaded.hold(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.27.0/lib/sequel/connection_pool/threaded.rb:91)
Jun 17 20:52:00 blp07601010 logstash: 2654 usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_27_dot_0.lib.sequel.database.connecting.synchronize(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.27.0/lib/sequel/database/connecting.rb:270)
Jun 17 20:52:00 blp07601010 logstash: 2654 usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_27_dot_0.lib.sequel.database.connecting.test_connection(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.27.0/lib/sequel/database/connecting.rb:279)
Jun 17 20:52:00 blp07601010 logstash: 2654 usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_27_dot_0.lib.sequel.database.connecting.connect(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.27.0/lib/sequel/database/connecting.rb:58)
Jun 17 20:52:00 blp07601010 logstash: 2654 usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_27_dot_0.lib.sequel.core.connect(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.27.0/lib/sequel/core.rb:121)

Below is the input config i have added in config file.

input {
jdbc {
jdbc_driver_library => "/logstash/jars/ojdbc7.jar,/logstash/jars/oraclepki.jar,/logstash/jars/osdt_cert.jar,/logstash/jars/osdt_core.jar"
jdbc_connection_string => "jdbc:oracle:thin:/@DBName"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_user => ""
jdbc_password => ""
last_run_metadata_path => "/logstash/last_run_files/.logstash_jdbc_last_run_temp"
statement => "select 1 from tb_table"
schedule => "*/15 * * * *"
}
}

Also i am able to make connection from server via sqlplus utility but getting error via logstash.

This issue was resolved ?

No Mate , still no luck

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