<?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: Exceptions 'Failed to create file','Failed close file. Lease recovery in progress.try again late in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Exceptions-Failed-to-create-file-Failed-close-file-Lease/m-p/28776#M53583</link>
    <description>You (or your used software) appear to be using appends on files that are being modified in parallel by other concurrent jobs/workflows/etc.. HDFS uses a single-writer model for its files, so observing this error is normal if your software does not have logic handling it and waiting for a proper writer lease to perform its work.&lt;BR /&gt;&lt;BR /&gt;Without audit logs of the filenames involved, there's little more we can tell. We also advise against using appends unless you absolutely require it for your use-cases.</description>
    <pubDate>Sun, 21 Jun 2015 12:36:48 GMT</pubDate>
    <dc:creator>Harsh J</dc:creator>
    <dc:date>2015-06-21T12:36:48Z</dc:date>
    <item>
      <title>Exceptions 'Failed to create file','Failed close file. Lease recovery in progress.try again later'</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Exceptions-Failed-to-create-file-Failed-close-file-Lease/m-p/28011#M53582</link>
      <description>&lt;P&gt;Exceptions 'Failed to create file','Failed close file. Lease recovery in progress.try again later'&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; We are facing an issue while working with Cloudera CDH – 5.1.2 ( Default MR2 YARN).&amp;nbsp; Request your expertise in this topic.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;In this case, We are extracting data from a some source via Talend ETL tool and storing the files(three file here) in HDFS file system. It works fine in most of the cases, But fails randomly with below exception(s)&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Please note that the issue is intermittent&amp;nbsp; and if you kill the job and restart the process it works fine.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Exception in component tHDFSOutput_3&lt;BR /&gt;org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException): Failed to create file [/user/mya4kor/test/messages/Sensor_Data.txt] for [DFSClient_NONMAPREDUCE_929417152_1] on client [10.0.2.5], because this file is already being created by [DFSClient_NONMAPREDUCE_82386981_1] on [10.0.2.5]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.recoverLeaseInternal(FSNamesystem.java:2548)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;.....&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;.....&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.hadoop.hdfs.DistributedFileSystem.append(DistributedFileSystem.java:316)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.hadoop.fs.FileSystem.append(FileSystem.java:1161)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at testproject.manufacturing_0_1.manufacturing.tInfiniteLoop_1Process(manufacturing.java:18254)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at testproject.manufacturing_0_1.manufacturing.runJobInTOS(manufacturing.java:20359)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at testproject.manufacturing_0_1.manufacturing.main(manufacturing.java:20003)&lt;BR /&gt;[statistics] disconnected&lt;BR /&gt;Job manufacturing ended at 11:58 26/05/2015. [exit code=1]&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Error: 2&lt;BR /&gt;Exception in component tHDFSOutput_7&lt;BR /&gt;org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.protocol.RecoveryInProgressException): Failed to close file /user/mya4kor/test/messages/Sensor_Data.txt. Lease recovery is in progress. Try again later.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.recoverLeaseInternal(FSNamesystem.java:2538)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;...&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;...&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.hadoop.fs.FileSystem.append(FileSystem.java:1161)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at testproject.manufacturing_0_1.manufacturing.tInfiniteLoop_1Process(manufacturing.java:12892)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at testproject.manufacturing_0_1.manufacturing.runJobInTOS(manufacturing.java:19588)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at testproject.manufacturing_0_1.manufacturing.main(manufacturing.java:19232)&lt;BR /&gt;Job manufacturing ended at 17:29 25/05/2015. [exit code=1]&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Thanks.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Regards,&lt;BR /&gt;&amp;nbsp;Ganesh&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:30:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Exceptions-Failed-to-create-file-Failed-close-file-Lease/m-p/28011#M53582</guid>
      <dc:creator>pvganesh</dc:creator>
      <dc:date>2022-09-16T09:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Exceptions 'Failed to create file','Failed close file. Lease recovery in progress.try again late</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Exceptions-Failed-to-create-file-Failed-close-file-Lease/m-p/28776#M53583</link>
      <description>You (or your used software) appear to be using appends on files that are being modified in parallel by other concurrent jobs/workflows/etc.. HDFS uses a single-writer model for its files, so observing this error is normal if your software does not have logic handling it and waiting for a proper writer lease to perform its work.&lt;BR /&gt;&lt;BR /&gt;Without audit logs of the filenames involved, there's little more we can tell. We also advise against using appends unless you absolutely require it for your use-cases.</description>
      <pubDate>Sun, 21 Jun 2015 12:36:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Exceptions-Failed-to-create-file-Failed-close-file-Lease/m-p/28776#M53583</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-06-21T12:36:48Z</dc:date>
    </item>
  </channel>
</rss>

