2 Replies Latest reply: May 15, 2014 10:05 AM by mdyoung _ RSS

    Monitored Process runs while the file is being created --> error

    pranitj84 _

      Hello,

       

      We are experiencing a problem where a monitored process runs but the file is still being created and due to that it fails and gives the following error message:

       

      09-09-2009 20:18:43 Created.

           

      time  2009-09-09T20:18:43

       

      + 09-09-2009 20:18:44 Process prerequisites were not met: File 'C:\PROD\IMPORT\CASUALTY\ARSTATL2.RPT' cannot be opened for exclusive read access. Another process may still be writing to this file.

           

      time  2009-09-09T20:18:44

       

      + 09-09-2009 20:18:44 Failed: DwchServer.NoRetryInfoException: Process prerequisites failed, but no retry information is available. Process will not be retried. ---> DwchServer.SpecifiedFileCannotBeOpenedForExclusiveReadPrerequisiteException: File 'C:\PROD\IMPORT\CASUALTY\ARSTATL2.RPT' cannot be opened for exclusive read access. Another process may still be writing to this file. at DwchServer.ProjectInputs.TestPrerequisites() at DwchServer.ProcessHandler.b(ServerDB A_0, JobRow A_1, JobLog A_2) --- End of inner exception stack trace --- at DwchServer.ProcessHandler.b(ServerDB A_0, JobRow A_1, JobLog A_2)

           

      time  2009-09-09T20:18:44

      alert  SystemAlertProcessFailed

       

      + 09-09-2009 20:18:44 Distribution started

           

      time  2009-09-09T20:18:44

      source  distributor

       

      + 09-09-2009 20:18:45 Distribution completed

       

      But then the file does run within seconds of the failure[/B]

       

      Date/Time Event Description

      + 09-09-2009 20:18:45 Created.

           

      time  2009-09-09T20:18:45

       

      + 09-09-2009 20:18:45 Process launched 1 job(s).

           

      time  2009-09-09T20:18:45

       

      + 09-09-2009 20:18:46 Dispatched.

           

      time  2009-09-09T20:18:46

       

      + 09-09-2009 20:18:47 Set project file: C:\PROD\MOD\CASUALTY\ARSTATML2.xprj

           

      time  2009-09-09T20:18:47

       

      + 09-09-2009 20:18:50 Exporting completed.

           

      time  2009-09-09T20:18:50

       

      + 09-09-2009 20:18:50 Distribution started

           

      time  2009-09-09T20:18:50

      source  distributor

       

      + 09-09-2009 20:18:51 Distribution completed 

       

      Is there anything that can be done to stop the monitored process to run prematurely?

       

      Thanks,

      Pranit

        • Monitored Process runs while the file is being created --> error
          mdyoung _

          Hi, Pranit.

           

          Have you tried using the "Retries" section on the Advanced tab of the Process Properties? This may solve your problem.

           

          Thanks,

           

          Micheal

            • Monitored Process runs while the file is being created --> error
              mdyoung _

              OK. Forget what I asked/stated in my previous reply. It doesn't work. I had a similar problem today, except I am using two processes where the second process is relying on the first process to create a text file. The second process was firing off while the text file was being created; therefore, raising a similar error you're getting. I resolved my issue by having the first process export the text file as CREATING_TextFile.txt, then using the distribution feature to move the file and rename it to the file name that the second process is monitoring.

               

              This might not help you in your situation because you're only using one process, but maybe there's a way you can write a script or batch file that monitors the completion of the file and renames the file. Then you can set your process to monitor the newly renamed file. Then again, that might not be an option for you. Just a thought. Sorry I couldn't help, but maybe it'll give you some ideas. This is an issue I've brought to Datawatch several times before with the idea of including a way in the file monitoring setup to delay the process once a file was detected. But I think it fell on deaf ears.

               

              Thanks,

               

              Micheal