<?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>question Sqoop import with wallet in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-with-wallet/m-p/60346#M68602</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are facing some problems related to the wallet utilization with Sqoop v1.4.6 in Cloudera CDH 5.8.5. Our scenario:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;user folder:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;/home/myuser&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;wallet folder:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;/home/myuser/wallet&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(&lt;EM&gt;cwallet.sso, cwallet.sso.lck, ewallet.p12, ewallet.p12.lck, sqlnet.ora, tnsnames.ora&lt;/EM&gt;)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The wallet is well configured as if I run&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pln"&gt;sqlplus &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/@&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;MY_TNS_NAME&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I can connect to the db without the password.&lt;/P&gt;&lt;P&gt;The problem is with sqoop. I can connect to the db and list all the tables inside using:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pln"&gt;export HADOOP_OPTS&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"-Doracle.net.tns_admin=/home/myuser/wallet -Doracle.net.wallet_location=/home/myuser/wallet"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sqoop list-tables &lt;/SPAN&gt;&lt;SPAN class="com"&gt;--connect "jdbc:oracle:thin:@MY_TNS_NAME" &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;If I try to dump a table into HDFS with the following command (as suggested&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://it.hortonworks.com/blog/how-to-do-secure-apache-sqoop-jobs-with-oracle-wallet/" target="_blank" rel="nofollow noreferrer"&gt;here&lt;/A&gt;)&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pln"&gt;export HADOOP_OPTS&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"-Doracle.net.tns_admin=/home/myuser/wallet -Doracle.net.wallet_location=/home/myuser/wallet"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sqoop import &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;D mapreduce&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;map&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;java&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;opts&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str"&gt;'-Doracle.net.tns_admin=. -Doracle.net.wallet_location=.'&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;files &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;home&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;myuser&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;wallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;cwallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sso&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;home&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;myuser&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;wallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;ewallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;p12&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;home&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;myuser&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;wallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sqlnet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;ora&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;home&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;myuser&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;wallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;tnsnames&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;ora  &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;libjars &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"/var/lib/sqoop/oraclepki.jar,/var/lib/sqoop/osdt_cert.jar,/var/lib/sqoop/osdt_core.jar,/var/lib/sqoop/sqljdbc4.jar"&lt;/SPAN&gt; &lt;SPAN class="com"&gt;--m 1 --connect "jdbc:oracle:thin:@MY_TNS_NAME" --query "SELECT * FROM MYTABLE WHERE \$CONDITIONS" --target-dir '/tmp/mytabledump'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I get this error:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;EM&gt;Error: java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLException: encountered a problem with the Secret Store. Check the wallet location for the presence of an open wallet (cwallet.sso) and ensure that this wallet contains the correct credentials using the mkstore utility: java.io.IOException: oracle.security.crypto.core.CipherException: Invalid padding string (or incorrect password)...&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If I run the same command without using the wallet (providing manually user and password) it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additional info:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ACLs allows the sqoop user to access&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;/home/myuser&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;/home/myuser/wallet&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;folder owner group is the sqoop primary group (&lt;EM&gt;rwx&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;permissions).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It seems there are some problems passing the wallet to the mappers. Any idea how to solve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 12:18:09 GMT</pubDate>
    <dc:creator>ssandona</dc:creator>
    <dc:date>2022-09-16T12:18:09Z</dc:date>
    <item>
      <title>Sqoop import with wallet</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-with-wallet/m-p/60346#M68602</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are facing some problems related to the wallet utilization with Sqoop v1.4.6 in Cloudera CDH 5.8.5. Our scenario:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;user folder:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;/home/myuser&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;wallet folder:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;/home/myuser/wallet&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(&lt;EM&gt;cwallet.sso, cwallet.sso.lck, ewallet.p12, ewallet.p12.lck, sqlnet.ora, tnsnames.ora&lt;/EM&gt;)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The wallet is well configured as if I run&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pln"&gt;sqlplus &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/@&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;MY_TNS_NAME&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I can connect to the db without the password.&lt;/P&gt;&lt;P&gt;The problem is with sqoop. I can connect to the db and list all the tables inside using:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pln"&gt;export HADOOP_OPTS&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"-Doracle.net.tns_admin=/home/myuser/wallet -Doracle.net.wallet_location=/home/myuser/wallet"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sqoop list-tables &lt;/SPAN&gt;&lt;SPAN class="com"&gt;--connect "jdbc:oracle:thin:@MY_TNS_NAME" &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;If I try to dump a table into HDFS with the following command (as suggested&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://it.hortonworks.com/blog/how-to-do-secure-apache-sqoop-jobs-with-oracle-wallet/" target="_blank" rel="nofollow noreferrer"&gt;here&lt;/A&gt;)&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pln"&gt;export HADOOP_OPTS&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"-Doracle.net.tns_admin=/home/myuser/wallet -Doracle.net.wallet_location=/home/myuser/wallet"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sqoop import &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;D mapreduce&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;map&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;java&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;opts&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str"&gt;'-Doracle.net.tns_admin=. -Doracle.net.wallet_location=.'&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;files &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;home&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;myuser&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;wallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;cwallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sso&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;home&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;myuser&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;wallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;ewallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;p12&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;home&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;myuser&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;wallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sqlnet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;ora&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;home&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;myuser&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;wallet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;tnsnames&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;ora  &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;libjars &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"/var/lib/sqoop/oraclepki.jar,/var/lib/sqoop/osdt_cert.jar,/var/lib/sqoop/osdt_core.jar,/var/lib/sqoop/sqljdbc4.jar"&lt;/SPAN&gt; &lt;SPAN class="com"&gt;--m 1 --connect "jdbc:oracle:thin:@MY_TNS_NAME" --query "SELECT * FROM MYTABLE WHERE \$CONDITIONS" --target-dir '/tmp/mytabledump'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I get this error:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;EM&gt;Error: java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLException: encountered a problem with the Secret Store. Check the wallet location for the presence of an open wallet (cwallet.sso) and ensure that this wallet contains the correct credentials using the mkstore utility: java.io.IOException: oracle.security.crypto.core.CipherException: Invalid padding string (or incorrect password)...&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If I run the same command without using the wallet (providing manually user and password) it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additional info:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ACLs allows the sqoop user to access&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;/home/myuser&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;/home/myuser/wallet&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;folder owner group is the sqoop primary group (&lt;EM&gt;rwx&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;permissions).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It seems there are some problems passing the wallet to the mappers. Any idea how to solve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:18:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-with-wallet/m-p/60346#M68602</guid>
      <dc:creator>ssandona</dc:creator>
      <dc:date>2022-09-16T12:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop import with wallet</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-with-wallet/m-p/62408#M68603</link>
      <description>&lt;P&gt;We managed to solve the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem was related to the wallet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I know there are 2 types of wallet. The first type can be used only on the machine where it was created. The second type can be used on multiple machines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our problem is that our wallet was of the first type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;During map reduce the wallet is distributed among mappers and so with this "non sharable" wallet the mappers (located on different machines) are not able to use it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We had to create the wallet with the command:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;mkstore -wrl "&amp;lt;wallet_folder&amp;gt;" -create&lt;/PRE&gt;&lt;P&gt;Hope our solution will help someone else in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stefano&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 11:02:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Sqoop-import-with-wallet/m-p/62408#M68603</guid>
      <dc:creator>ssandona</dc:creator>
      <dc:date>2017-12-01T11:02:47Z</dc:date>
    </item>
  </channel>
</rss>

