Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mellerbeck
Creator II
Creator II

File write failed: System.IO.IOException: Cannot create a file when that file already exists.

I get this error on occasion, was wondering if anyone else sees it and possible reasons why it occurs?

File write failed: System.IO.IOException: Cannot create a file when that file already exists.

Thanks,

Michael   

15 Replies
danielrozental
Master II
Master II

Have you tried disabling UAC (User Access Control)?

mellerbeck
Creator II
Creator II
Author

Tried it, but still happened

File write failed: System.IO.IOException: Cannot create a file when that file already exists.


  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

  at System.IO.File.Move(String sourceFileName, String destFileName)

  at QlikTech.FileSystem.IO.File.CopyFile(Stream i_SourceStream, String i_TargetFileName, eFSSecurityMethod i_eFSSecurityMethod, List`1 i_Permissions)

2/17/2012 10:55:22 PM   Error   Failed to copy file. FileName=Quality_Management.qvw

2/17/2012 10:55:22 PM   Error   (2) Failed to copy files into folder: C:\Qlikview\QlikView Storage\Public Data\AccessPoint Documents\QC-QualityManagement

2/17/2012 10:55:22 PM   Error   Distribution to resources failed with errors. Warnings: 0, Errors: 3

2/17/2012 10:55:23 PM   Error   The task "QC-Quality Management" failed. Exception:

QDSMain.Exceptions.DistributionFailedException: Distribute failed with errors to follow. ---> QDSMain.Exceptions.LogBucketErrorException: Distribution to resources failed with errors. Warnings: 0, Errors: 3

  at QDSMain.DistributeTask.RevertOneAndAlwaysOne(Document qvbDocument)

  at QDSMain.DistributeTask.ReleaseQvb(Document qvbDocument)

  at QDSMain.DistributeTask.Distribution(String fileName, DistributionRequest distributionRequest, TaskResult taskResult, String repeatVariableName, String currentRepeatVariableValue)

  at QDSMain.DistributeTask.Execute(TaskResult currentTaskResult)

  --- End of inner exception stack trace ---

  at QDSMain.DistributeTask.Execute(TaskResult currentTaskResult)

  at QDSMain.Task.AbstractTask.TaskExecution(ILogBucket logBucket, TaskResult taskResult)

mellerbeck
Creator II
Creator II
Author

Anyone else ever see this error? Would like to make them go away if possible, they appear fairly regularly but also fairly randomly.     

Not applicable

I'm also having the same error, it also appearing randomly!

I'm using V10 SR4, Enterprise with Publisher.

I have more than 10 apps running, and this problem only happenning in one of the QVW.

No idea what's the root cause since there's not much information in the task log.

Not applicable

I found that the QVW which has the random IO exception is distributing to a network drive which looks like this:

\\cnhkgqlv031prd\d$\QlikViewDestination

The destination is actually same location as my publisher, so I changed the destination to D:\QlikViewDestination instead of \\cnhkgqlv031prd\d$\QlikViewDestination

I'm not sure whether it will solve the IO problem (I need to let it run for few days to see the result), but I believe it will because my other apps are distributing directly to D:\ drive path and have never had the IO problem.

Hope this helps

Bill_Britt
Former Employee
Former Employee

Does this happen all the time? Are you running any type of backup or antivirus that could have the file open and locked?

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
mellerbeck
Creator II
Creator II
Author

We have a fair amount of reloads that happen every five minutes. This error will occur once or twice a day out of thousands of runs. No backup or antivirus is running. The publisher is writing to local disk

Bill_Britt
Former Employee
Former Employee

I would check the OS system and application logs to see if they show any errors or problems around the the time the QV error happens.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
vasilev
Contributor III
Contributor III

Did anybody find a solution for this issue. We have the same problem for 3 weeks coming randomly at two applications.