Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community, For only one document I am getting the below QMC error and for rest of them no failures.
Error: The task "Dashboard" failed. Exception: || QDSMain.Exceptions.TaskFailedException: Task execution failed with errors to follow. ---> QDSMain.Exceptions.WritePermissionkException: Failed to get write permission for file: \Dashboard.qvw ---> System.IO.IOException: The process cannot access the file '\Dashboard.qvw' because it is being used by another process. || at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) || at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) || at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) || at QDSMain.AbstractReloadTask.CheckWritePermissionForFile(String fileName) || --- End of inner exception stack trace --- || at QDSMain.AbstractReloadTask.CheckWritePermissionForFile(String fileName) || at QDSMain.AbstractReloadTask.Reload(String fileName, IExecutingTaskResult executingTaskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage) || at QDSMain.DistributeTask.PerformExecute(IExecutingTaskResult executingTaskResult) || --- End of inner exception stack trace --- || at QDSMain.DistributeTask.PerformExecute(IExecutingTaskResult executingTaskResult) || at QDSMain.Task.AbstractTask.TaskExecution(CurrentExecutionArgs args)
Can you please over here.
_Priya
Does the reload work when running from the QV client?
It appears the QVW associated with that task could not be opened with the file lock, so we would be able to write the updated info back out post reload, which means some other task or process on the server had the file lock. These can be tricky to figure out, but the obvious thing we ask folks to check is if Anti-virus or any other 'active scanning' tools are running on the servers, and if so, we recommend excluding our directories from those tools to avoid these situations from occurring. Scans can be done during maintenance windows when the Qlik services are offline etc. at that point.
To Chris' point though, if you have the Script logs enabled on this app, I expect you got no script/document log in this case, which would confirm we could not open the QVW to do the reload, and the trick is figuring out why the file was in a locked state such that we were not able to open for reload. Sorry, I have not stated things very clearly here, but hopefully this makes a little sense.
Microsoft SysInternals Process Monitor can be used in these cases if you catch things to try to see what process has the lock etc.
Oh, just thought of a workaround as well, you could bump up the 'Retries' setting on the Task to more than 1 in this case, that way if this file is sometimes locked, having things retry a few times, hopefully we may be able to always get the lock on a subsequent try and successfully complete things.
Cheers,
Brett
Reload is not happening, failed
if you make sure the doc logs are enabled for the QVW in question, then try running a manual reload. If no log is created then this confirms the answer that Brett provided. Is there section access on the QVW?
What if you copy and paste the QVW, the copied version shouldn't have a lock on it (if that's the cause) , you can then test the reload on that one.
Are all of the QVWs in the same folder? i.e. are working QVWs in the same folder as the non working QVW? if they are in different folders then you could also try and move it to a folder that has a working QVW (if it doesn't mess up any data locations) and try and reload from there. That will rule out any issues with folder permissions.
Has the reload EVER worked from the QMC?
That sounds like its being 'locked' by something if its not every time., as Brett suggested. i would check things like anti virus like he said, make sure the Qlik directories are excluded. it might be that something is happening to that file at the same times the reloads are failing.