<?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 Re: Spark-Submit and Ozone FS :: org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS] in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Spark-Submit-and-Ozone-FS-org-apache-hadoop-security/m-p/375434#M242446</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/78612"&gt;@RangaReddy&lt;/a&gt;&amp;nbsp;Thanks for sharing the link. The link does not include details of spark jobs submitted via spark-submit but covers samples of reading files from Ozone using spark-shell. Hence have to post the error for clarification. However the above conf parameter helped in resolving the error observed in spark job.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Aug 2023 08:02:46 GMT</pubDate>
    <dc:creator>skommineni</dc:creator>
    <dc:date>2023-08-21T08:02:46Z</dc:date>
    <item>
      <title>Spark-Submit and Ozone FS :: org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-Submit-and-Ozone-FS-org-apache-hadoop-security/m-p/375320#M242391</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking for some inputs on the below error. Basically we have a sample Spark Java application which reads an input file that is existing in HDFS, perform transformations on the data and rewrites it back to another file into HDFS. On spark-submit like below :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;spark-submit --master yarn --deploy-mode cluster --class com.sample.SparkJavaApiTest /tmp/sample-spark-java.jar &amp;lt;HDFS File Path : /user/user1/test.txt&amp;gt; &amp;lt;HDFS Output File : /user/user1/output.txt&amp;gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The sample code works perfectly. However when the same job is submitted via spark-submit with files in Ozone File system getting the below error :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;spark-submit --master yarn --deploy-mode cluster --keytab /tmp/test.keytab --principal user1@EXAMPLE.COM --class com.sample.SparkJavaApiTest /tmp/sample-spark-java.jar 'ofs://sk-ozone-test1/user1vol/user1bucket/test.txt' 'ofs://sk-ozone-test1/user1vol/user1bucket/output'&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;or&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;spark-submit --master yarn --deploy-mode cluster --keytab /tmp/test.keytab --principal user1@EXAMPLE.COM --class com.sample.SparkJavaApiTest /tmp/sample-spark-java.jar 'o3fs://user1bucket.user1vol.master.localdomain.com/test.txt' 'o3fs://user1bucket.user1vol.master.localdomain.com/output'&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fails with exception :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;23/08/17 06:21:12 INFO storage.BlockManagerInfo: Added broadcast_0_piece0 in memory on node2.localdomain.com:44558 (size: 48.0 KB, free: 366.3 MB)&lt;BR /&gt;23/08/17 06:21:13 WARN scheduler.TaskSetManager: Lost task 0.0 in stage 0.0 (TID 0, node3.localdomain.com, executor 1): java.io.IOException: org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]&lt;BR /&gt;at org.apache.hadoop.ipc.Client$Connection$1.run(Client.java:789)&lt;BR /&gt;at java.security.AccessController.doPrivileged(Native Method)&lt;BR /&gt;at javax.security.auth.Subject.doAs(Subject.java:422)&lt;BR /&gt;at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1898)&lt;BR /&gt;at org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:752)&lt;BR /&gt;at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:847)&lt;BR /&gt;at org.apache.hadoop.ipc.Client$Connection.access$3800(Client.java:414)&lt;BR /&gt;at org.apache.hadoop.ipc.Client.getConnection(Client.java:1662)&lt;BR /&gt;at org.apache.hadoop.ipc.Client.call(Client.java:1487)&lt;BR /&gt;at org.apache.hadoop.ipc.Client.call(Client.java:1440)&lt;BR /&gt;at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:233)&lt;BR /&gt;at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:118)&lt;BR /&gt;at com.sun.proxy.$Proxy25.submitRequest(Unknown Source)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)&lt;BR /&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at java.lang.reflect.Method.invoke(Method.java:498)&lt;BR /&gt;at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:431)&lt;BR /&gt;at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeMethod(RetryInvocationHandler.java:166)&lt;BR /&gt;at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invoke(RetryInvocationHandler.java:158)&lt;BR /&gt;at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeOnce(RetryInvocationHandler.java:96)&lt;BR /&gt;at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:362)&lt;BR /&gt;at com.sun.proxy.$Proxy25.submitRequest(Unknown Source)&lt;BR /&gt;at org.apache.hadoop.ozone.om.protocolPB.Hadoop3OmTransport.submitRequest(Hadoop3OmTransport.java:80)&lt;BR /&gt;at org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.submitRequest(OzoneManagerProtocolClientSideTranslatorPB.java:284)&lt;BR /&gt;at org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.getServiceInfo(OzoneManagerProtocolClientSideTranslatorPB.java:1442)&lt;BR /&gt;at org.apache.hadoop.ozone.client.rpc.RpcClient.&amp;lt;init&amp;gt;(RpcClient.java:236)&lt;BR /&gt;at org.apache.hadoop.ozone.client.OzoneClientFactory.getClientProtocol(OzoneClientFactory.java:247)&lt;BR /&gt;at org.apache.hadoop.ozone.client.OzoneClientFactory.getRpcClient(OzoneClientFactory.java:114)&lt;BR /&gt;at org.apache.hadoop.fs.ozone.BasicRootedOzoneClientAdapterImpl.&amp;lt;init&amp;gt;(BasicRootedOzoneClientAdapterImpl.java:181)&lt;BR /&gt;at org.apache.hadoop.fs.ozone.RootedOzoneClientAdapterImpl.&amp;lt;init&amp;gt;(RootedOzoneClientAdapterImpl.java:51)&lt;BR /&gt;at org.apache.hadoop.fs.ozone.RootedOzoneFileSystem.createAdapter(RootedOzoneFileSystem.java:92)&lt;BR /&gt;at org.apache.hadoop.fs.ozone.BasicRootedOzoneFileSystem.initialize(BasicRootedOzoneFileSystem.java:149)&lt;BR /&gt;at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3451)&lt;BR /&gt;at org.apache.hadoop.fs.FileSystem.access$300(FileSystem.java:161)&lt;BR /&gt;at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3556)&lt;BR /&gt;at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3503)&lt;BR /&gt;at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:521)&lt;BR /&gt;at org.apache.hadoop.fs.Path.getFileSystem(Path.java:361)&lt;BR /&gt;at org.apache.hadoop.mapred.LineRecordReader.&amp;lt;init&amp;gt;(LineRecordReader.java:111)&lt;BR /&gt;at org.apache.hadoop.mapred.TextInputFormat.getRecordReader(TextInputFormat.java:67)&lt;BR /&gt;at org.apache.spark.rdd.HadoopRDD$$anon$1.liftedTree1$1(HadoopRDD.scala:267)&lt;BR /&gt;at org.apache.spark.rdd.HadoopRDD$$anon$1.&amp;lt;init&amp;gt;(HadoopRDD.scala:266)&lt;BR /&gt;at org.apache.spark.rdd.HadoopRDD.compute(HadoopRDD.scala:224)&lt;BR /&gt;at org.apache.spark.rdd.HadoopRDD.compute(HadoopRDD.scala:95)&lt;BR /&gt;at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:346)&lt;BR /&gt;at org.apache.spark.rdd.RDD.iterator(RDD.scala:310)&lt;BR /&gt;at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)&lt;BR /&gt;at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:346)&lt;BR /&gt;at org.apache.spark.rdd.RDD.iterator(RDD.scala:310)&lt;BR /&gt;at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)&lt;BR /&gt;at org.apache.spark.scheduler.Task.run(Task.scala:123)&lt;BR /&gt;at org.apache.spark.executor.Executor$TaskRunner$$anonfun$12.apply(Executor.scala:456)&lt;BR /&gt;at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1334)&lt;BR /&gt;at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:462)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)&lt;BR /&gt;at java.lang.Thread.run(Thread.java:748)&lt;BR /&gt;&lt;STRONG&gt;Caused by: org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]&lt;/STRONG&gt;&lt;BR /&gt;at org.apache.hadoop.security.SaslRpcClient.selectSaslClient(SaslRpcClient.java:173)&lt;BR /&gt;at org.apache.hadoop.security.SaslRpcClient.saslConnect(SaslRpcClient.java:390)&lt;BR /&gt;at org.apache.hadoop.ipc.Client$Connection.setupSaslConnection(Client.java:623)&lt;BR /&gt;at org.apache.hadoop.ipc.Client$Connection.access$2300(Client.java:414)&lt;BR /&gt;at org.apache.hadoop.ipc.Client$Connection$2.run(Client.java:834)&lt;BR /&gt;at org.apache.hadoop.ipc.Client$Connection$2.run(Client.java:830)&lt;BR /&gt;at java.security.AccessController.doPrivileged(Native Method)&lt;BR /&gt;at javax.security.auth.Subject.doAs(Subject.java:422)&lt;BR /&gt;at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1898)&lt;BR /&gt;at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:830)&lt;BR /&gt;... 52 more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CDP PVC Base cluster has Kerberos enabled. Wanted to know if I am missing out on any configuration on Spark or YARN that is causing the above error. The console log seems to indicate it is able to obtain delegation token for user "user1" correctly for HDFS :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;23/08/17 07:27:41 INFO security.HadoopFSDelegationTokenProvider: getting token for: class org.apache.hadoop.hdfs.DistributedFileSystem:hdfs://master.localdomain.com:8020 with renewer yarn/master.localdomain.com@EXAMPLE.COM&lt;BR /&gt;23/08/17 07:27:41 INFO hdfs.DFSClient: Created token for user1: HDFS_DELEGATION_TOKEN owner=user1@EXAMPLE.COM, renewer=yarn, realUser=, issueDate=1692271661218, maxDate=1692876461218, sequenceNumber=545, masterKeyId=126 on 10.49.0.9:8020&lt;BR /&gt;23/08/17 07:27:41 INFO security.HadoopFSDelegationTokenProvider: getting token for: class org.apache.hadoop.hdfs.DistributedFileSystem:hdfs://master.localdomain.com:8020 with renewer user1@EXAMPLE.COM&lt;BR /&gt;23/08/17 07:27:41 INFO hdfs.DFSClient: Created token for user1: HDFS_DELEGATION_TOKEN owner=user1@EXAMPLE.COM, renewer=user1, realUser=, issueDate=1692271661245, maxDate=1692876461245, sequenceNumber=546, masterKeyId=126 on 10.49.0.9:8020&lt;BR /&gt;23/08/17 07:27:41 INFO security.HadoopFSDelegationTokenProvider: Renewal interval is 86400067 for token HDFS_DELEGATION_TOKEN&lt;BR /&gt;23/08/17 07:27:42 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.5.5-801-b1e2c346541b2d00405d023dc5c4894d038aef98, built on 08/24/2022 12:46 GMT&lt;BR /&gt;23/08/17 07:27:42 INFO zookeeper.ZooKeeper: Client environment:host.name=master.localdomain.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the same does not seems to succeed inside spark job for Ozone FS file ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 06:49:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-Submit-and-Ozone-FS-org-apache-hadoop-security/m-p/375320#M242391</guid>
      <dc:creator>skommineni</dc:creator>
      <dc:date>2026-04-21T06:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Spark-Submit and Ozone FS :: org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-Submit-and-Ozone-FS-org-apache-hadoop-security/m-p/375328#M242397</link>
      <description>&lt;P&gt;Ignore the above post got the above error resolved by passing the following config value to spark-submit command :&amp;nbsp;--conf=spark.yarn.access.hadoopFileSystems=o3fs://&amp;lt;bucket&amp;gt;.&amp;lt;volume&amp;gt;.&amp;lt;ozone-id&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 13:23:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-Submit-and-Ozone-FS-org-apache-hadoop-security/m-p/375328#M242397</guid>
      <dc:creator>skommineni</dc:creator>
      <dc:date>2023-08-17T13:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Spark-Submit and Ozone FS :: org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-Submit-and-Ozone-FS-org-apache-hadoop-security/m-p/375398#M242439</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/106473"&gt;@skommineni&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following article will help you to understand how to integrate Spark Ozone Integration in CDP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/t5/Community-Articles/Spark-Ozone-Integration-in-CDP/ta-p/323132" target="_blank"&gt;https://community.cloudera.com/t5/Community-Articles/Spark-Ozone-Integration-in-CDP/ta-p/323132&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2023 16:00:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-Submit-and-Ozone-FS-org-apache-hadoop-security/m-p/375398#M242439</guid>
      <dc:creator>RangaReddy</dc:creator>
      <dc:date>2023-08-20T16:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Spark-Submit and Ozone FS :: org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Spark-Submit-and-Ozone-FS-org-apache-hadoop-security/m-p/375434#M242446</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/78612"&gt;@RangaReddy&lt;/a&gt;&amp;nbsp;Thanks for sharing the link. The link does not include details of spark jobs submitted via spark-submit but covers samples of reading files from Ozone using spark-shell. Hence have to post the error for clarification. However the above conf parameter helped in resolving the error observed in spark job.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 08:02:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Spark-Submit-and-Ozone-FS-org-apache-hadoop-security/m-p/375434#M242446</guid>
      <dc:creator>skommineni</dc:creator>
      <dc:date>2023-08-21T08:02:46Z</dc:date>
    </item>
  </channel>
</rss>

