Logstash cannot connect to Oracle cloud using wallet key

Hello community,
I'm having hard time to establish Logstash connection towards Oracle cloud autonomous db. I have suspicion that it is connected to wallet key.

I was able to connect to Oracle cloud using Ubuntu/sql developer either using "cloud wallet" connection type but also using "custom jdbc". I have used following form:
jdbc:oracle:thin:@banach001_high?TNS_ADMIN=/home/otomar-jupiter/ora.cloud/wallet_keys/Wallet_banach001

Therefore I thought I can use same string in Logstash config, but it seems it doesn't work. Just for info, I have tried ojdbc7/8/10.jar, neither of them worked.

Here is the config detail:

    jdbc {
#==========| JDBC Configs |==============#
        jdbc_driver_library => "/home/otomar-jupiter/ora.cloud/jdk/ojdbc8.jar"
        jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
        jdbc_connection_string => "jdbc:oracle:thin:@banach001_high?TNS_ADMIN=/home/otomar-jupiter/ora.cloud/wallet_keys/Wallet_banach001"
      # jdbc_default_timezone => "Europe/Zurich"
        plugin_timezone => "local"
	  # jdbc_page_size => 1000000
#==========| Database Details |==========#

In logstash log, I see just this java error:

[2020-09-09T21:01:46,952][ERROR][logstash.javapipeline    ][banach-prod-onln-upc][b27d9c2a6c018ecf07741dbf4bfd050c8559f9e3e21cb687908c57f4fc994d85] A plugin had an unrecoverable error. Will restart this plugin.
  Pipeline_id:banach-prod-onln-upc
  Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"admin", use_column_value=>false, jdbc_password=><password>, statement_filepath=>"/etc/logstash/conf.d/banach-prod-onln-upc-init.sql", clean_run=>true, jdbc_driver_library=>"/home/otomar-jupiter/ora.cloud/jdk/ojdbc10.jar", jdbc_connection_string=>"jdbc:oracle:thin:@banach001_high?TNS_ADMIN=/home/otomar-jupiter/ora.cloud/wallet_keys/Wallet_banach001", id=>"b27d9c2a6c018ecf07741dbf4bfd050c8559f9e3e21cb687908c57f4fc994d85", jdbc_driver_class=>"Java::oracle.jdbc.driver.OracleDriver", record_last_run=>false, plugin_timezone=>"local", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_9b2e5d29-f599-4c49-848d-fa86d36bef04", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validate_connection=>false, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, last_run_metadata_path=>"/root/.logstash_jdbc_last_run", tracking_column_type=>"numeric", lowercase_column_names=>true, use_prepared_statements=>false>
  Error: Java::JavaSql::SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
  Exception: Sequel::DatabaseConnectionError
  Stack: oracle.jdbc.driver.T4CConnection.logon(oracle/jdbc/driver/T4CConnection.java:858)

I would be happy for any suggestions or help.
Best Regards

Ok, it seems I have sort it our myself :smile:
If anybody would benefit, here is the solution
jdbc_driver_library => "/home/otomar-jupiter/ora.cloud/jdk/ojdbc10.jar,/home/otomar-jupiter/ora.cloud/jdk/ucp.jar,/home/otomar-jupiter/ora.cloud/jdk/osdt_core.jar,/home/otomar-jupiter/ora.cloud/jdk/oraclepki.jar,/home/otomar-jupiter/ora.cloud/jdk/osdt_cert.jar"

Additional files needed for Oracle wallet. Oracle docs for reference.

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