# Logstash cannot connect to Oracle cloud using wallet key

**URL:** <https://discuss.elastic.co/t/logstash-cannot-connect-to-oracle-cloud-using-wallet-key/248059>\
**Category:** Logstash\
**Created:** [September 9, 2020, 7:26pm UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-oracle-cloud-using-wallet-key/248059 "2020-09-09T19:26:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Otomar\_Jupiter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otomar_jupiter/32/75322_2.png) [@Otomar\_Jupiter](https://discuss.elastic.co/u/Otomar_Jupiter)\
**Post date:** [September 9, 2020, 7:26pm UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-oracle-cloud-using-wallet-key/248059/1 "2020-09-09T19:26:58Z")

</div>

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:

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

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

---

<div class="post-metadata">

**Author:** ![Otomar\_Jupiter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otomar_jupiter/32/75322_2.png) [@Otomar\_Jupiter](https://discuss.elastic.co/u/Otomar_Jupiter)\
**Post date:** [September 9, 2020, 7:55pm UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-oracle-cloud-using-wallet-key/248059/2 "2020-09-09T19:55:28Z")

</div>

Ok, it seems I have sort it our myself 😄  
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](https://www.oracle.com/database/technologies/appdev/jdbc-ucp-19c-downloads.html) for reference.

---

<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:** [October 7, 2020, 7:55pm UTC](https://discuss.elastic.co/t/logstash-cannot-connect-to-oracle-cloud-using-wallet-key/248059/3 "2020-10-07T19:55:28Z")

</div>

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