<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Trouble Accessing Trust Store for Oracle JDBC Connection on Shared Compute Cluster in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/trouble-accessing-trust-store-for-oracle-jdbc-connection-on/m-p/103817#M41564</link>
    <description>&lt;P&gt;The trust store file needs to be accessible from all nodes in the shared compute cluster. You can achieve this by storing the trust store file in a location that is accessible to all nodes, such as a mounted volume or a distributed file system.&lt;/P&gt;
&lt;P&gt;Here's some documentation on Volumes&amp;nbsp;&lt;A href="https://docs.databricks.com/en/sql/language-manual/sql-ref-volumes.html" target="_blank"&gt;https://docs.databricks.com/en/sql/language-manual/sql-ref-volumes.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure the file has sufficient permissions&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#!/bin/bash &lt;SPAN class="hljs-built_in"&gt;cp&lt;/SPAN&gt; /dbfs/Volumes/test_catalog/oracle_jdbc_driver/certs/oracle_truststore.jks /tmp/oracle_truststore.jks &lt;SPAN class="hljs-built_in"&gt;chmod&lt;/SPAN&gt; 644 /tmp/oracle_truststore.jks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jan 2025 11:07:51 GMT</pubDate>
    <dc:creator>NandiniN</dc:creator>
    <dc:date>2025-01-01T11:07:51Z</dc:date>
    <item>
      <title>Trouble Accessing Trust Store for Oracle JDBC Connection on Shared Compute Cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/trouble-accessing-trust-store-for-oracle-jdbc-connection-on/m-p/74566#M34757</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am trying to read data from an Oracle D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PAN&gt;"JKS"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;option&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"javax.net.ssl.trustStore"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"/dbfs/FileStore/certs/oracle.truststore.jks"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;option&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"javax.net.ssl.trustStorePassword"&lt;/SPAN&gt;&lt;SPAN&gt;, dbutils.secrets.&lt;/SPAN&gt;&lt;SPAN&gt;get&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;scope&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"oracle"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;key&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"truststore_pw"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;load&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;If I use personal compute, the trust store is found and the connection is established successfully. If I however use a shared compute cluster, it cannot find the file:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;java.sql.SQLRecoverableException: IO Error: The Network Adapter could &lt;/SPAN&gt;&lt;SPAN&gt;not&lt;/SPAN&gt;&lt;SPAN&gt; establish the connection&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;Caused by: oracle.net.ns.NetException: Unable to initialize the trust store.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at oracle.net.nt.CustomSSLSocketFactory.&lt;/SPAN&gt;&lt;SPAN&gt;trustStoreFailure&lt;/SPAN&gt;&lt;SPAN&gt;(CustomSSLSocketFactory.java:&lt;/SPAN&gt;&lt;SPAN&gt;769&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at oracle.net.nt.CustomSSLSocketFactory.&lt;/SPAN&gt;&lt;SPAN&gt;createSSLContext&lt;/SPAN&gt;&lt;SPAN&gt;(CustomSSLSocketFactory.java:&lt;/SPAN&gt;&lt;SPAN&gt;418&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;... &lt;/SPAN&gt;&lt;SPAN&gt;41&lt;/SPAN&gt;&lt;SPAN&gt; more&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Caused by: java.nio.file.NoSuchFileException: &lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;dbfs&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;FileStore&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;certs&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;oracle.truststore.jks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at sun.nio.fs.UnixException.&lt;/SPAN&gt;&lt;SPAN&gt;translateToIOException&lt;/SPAN&gt;&lt;SPAN&gt;(UnixException.java:&lt;/SPAN&gt;&lt;SPAN&gt;86&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at sun.nio.fs.UnixException.&lt;/SPAN&gt;&lt;SPAN&gt;rethrowAsIOException&lt;/SPAN&gt;&lt;SPAN&gt;(UnixException.java:&lt;/SPAN&gt;&lt;SPAN&gt;102&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at sun.nio.fs.UnixException.&lt;/SPAN&gt;&lt;SPAN&gt;rethrowAsIOException&lt;/SPAN&gt;&lt;SPAN&gt;(UnixException.java:&lt;/SPAN&gt;&lt;SPAN&gt;107&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at sun.nio.fs.UnixFileSystemProvider.&lt;/SPAN&gt;&lt;SPAN&gt;newFileChannel&lt;/SPAN&gt;&lt;SPAN&gt;(UnixFileSystemProvider.java:&lt;/SPAN&gt;&lt;SPAN&gt;177&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at java.nio.channels.FileChannel.&lt;/SPAN&gt;&lt;SPAN&gt;open&lt;/SPAN&gt;&lt;SPAN&gt;(FileChannel.java:&lt;/SPAN&gt;&lt;SPAN&gt;287&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at java.nio.channels.FileChannel.&lt;/SPAN&gt;&lt;SPAN&gt;open&lt;/SPAN&gt;&lt;SPAN&gt;(FileChannel.java:&lt;/SPAN&gt;&lt;SPAN&gt;335&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at oracle.net.nt.CustomSSLSocketFactory.&lt;/SPAN&gt;&lt;SPAN&gt;loadFileBasedKeyStore&lt;/SPAN&gt;&lt;SPAN&gt;(CustomSSLSocketFactory.java:&lt;/SPAN&gt;&lt;SPAN&gt;1153&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at oracle.net.nt.CustomSSLSocketFactory.&lt;/SPAN&gt;&lt;SPAN&gt;loadKeyStore&lt;/SPAN&gt;&lt;SPAN&gt;(CustomSSLSocketFactory.java:&lt;/SPAN&gt;&lt;SPAN&gt;1128&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;at oracle.net.nt.CustomSSLSocketFactory.&lt;/SPAN&gt;&lt;SPAN&gt;createSSLContext&lt;/SPAN&gt;&lt;SPAN&gt;(CustomSSLSocketFactory.java:&lt;/SPAN&gt;&lt;SPAN&gt;409&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;... &lt;/SPAN&gt;&lt;SPAN&gt;41&lt;/SPAN&gt;&lt;SPAN&gt; more&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Does anyone know how to solve this?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have also tried using Volumes, but with no success:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;option&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"javax.net.ssl.trustStore"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"/dbfs/Volumes/test_catalog/oracle_jdbc_driver/certs/oracle_truststore.jks"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 17 Jun 2024 09:41:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/trouble-accessing-trust-store-for-oracle-jdbc-connection-on/m-p/74566#M34757</guid>
      <dc:creator>meret</dc:creator>
      <dc:date>2024-06-17T09:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Accessing Trust Store for Oracle JDBC Connection on Shared Compute Cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/trouble-accessing-trust-store-for-oracle-jdbc-connection-on/m-p/91368#M38160</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;Can you give me a concrete example on how to use a file stored in a volume? or if volume is not possible, from a distributed file system? Important for me is, that it works on a shared compute cluster, so dbfs is not an option as far as I know.&lt;/P&gt;&lt;P&gt;I understand the concept in general, but I struggle with the concrete implementation.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 07:13:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/trouble-accessing-trust-store-for-oracle-jdbc-connection-on/m-p/91368#M38160</guid>
      <dc:creator>meret</dc:creator>
      <dc:date>2024-09-23T07:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Accessing Trust Store for Oracle JDBC Connection on Shared Compute Cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/trouble-accessing-trust-store-for-oracle-jdbc-connection-on/m-p/103817#M41564</link>
      <description>&lt;P&gt;The trust store file needs to be accessible from all nodes in the shared compute cluster. You can achieve this by storing the trust store file in a location that is accessible to all nodes, such as a mounted volume or a distributed file system.&lt;/P&gt;
&lt;P&gt;Here's some documentation on Volumes&amp;nbsp;&lt;A href="https://docs.databricks.com/en/sql/language-manual/sql-ref-volumes.html" target="_blank"&gt;https://docs.databricks.com/en/sql/language-manual/sql-ref-volumes.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure the file has sufficient permissions&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#!/bin/bash &lt;SPAN class="hljs-built_in"&gt;cp&lt;/SPAN&gt; /dbfs/Volumes/test_catalog/oracle_jdbc_driver/certs/oracle_truststore.jks /tmp/oracle_truststore.jks &lt;SPAN class="hljs-built_in"&gt;chmod&lt;/SPAN&gt; 644 /tmp/oracle_truststore.jks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jan 2025 11:07:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/trouble-accessing-trust-store-for-oracle-jdbc-connection-on/m-p/103817#M41564</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2025-01-01T11:07:51Z</dc:date>
    </item>
  </channel>
</rss>

