Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

QMC says "failed", but log shows no error - what happened?


Hi,

I have a problem here:

I have a small app that checks the contents of a certain directory - there should be 2 files there, following a certain pattern. If there are not exactly 2 files or that pattern is not right, an email is triggered.

That app works fine when I reload it locally.

This morning it was reloaded automatically on the Server and failed - there was an error in the logic which I repaired already. Now, however, when I launch it manually in QMC, it still turns red and says "failed"

<=> BUT the app-log finishes with the normal "EXIT" and I can find no error in there.

Can anyone help me there?

I will post the app-log for a start, but I can post the actual script_code, too, if you need it. There's nothing secret about this.

Thanks a lot!

Best regards,

DataNibbler

P.S.: You see in the log one line "IF Weekday(Today()) = 'Fri'  THEN" - the piece of code inside that loop (though I'm not sure why the closure of that loop is not in there) is clearly not executed - if it was, the code would be sure to fail because that loop is for a sub-directory where the files for the following week should be and thus, from Mon-Thu, it is very improbable that there should be 2 files as expected ...

11 Replies
Not applicable

Hi Data,

Can you post up the task log too?

datanibbler
Champion
Champion
Author

Hi Joe,

you mean that from the QMC? One moment ...

Here it is. Sorry for the format, I don't know which one is the task_log that I see in the QMC?

(2015-02-09 09:30:44) Information: Starting task 'production/03_Application/Dateiprüfung_Schichtpläne_StSt.qvw'. Id:865f2b72-ab5d-44ac-b737-3fb05f786975. Triggered by 'ManualStartTrigger'. Id:00000001-0002-0003-0405-0607080a0b0c(2015-02-09 09:30:44) Information: Entering Task Execution. (2015-02-09 09:30:44) Information: ClusterID=1(2015-02-09 09:30:44) Information: QDSID=17b99450-36b8-6971-9283-4b0db22cb6be(2015-02-09 09:30:44) Information: TaskID=865f2b72-ab5d-44ac-b737-3fb05f786975(2015-02-09 09:30:44) Information: MaxRunTime=06:00:00(2015-02-09 09:30:44) Information: MachineName=RGB1APP202(2015-02-09 09:30:44) Information: Max attempts:1(2015-02-09 09:30:44) Information: Current Attempt=0(2015-02-09 09:30:44) Information: Task Dependencies are OK(2015-02-09 09:30:44) Error: The task "production/03_Application/Dateiprüfung_Schichtpläne_StSt.qvw" failed. Exception: || QDSMain.Exceptions.TaskFailedException: Task execution failed with errors to follow. ---> QDSMain.Exceptions.SourceDocumentNotFoundException: Could not find SourceDocument (Distribution): qvp://rgb1app202/production/03_Application/Dateiprüfung_Schichtpläne_StSt.qvw ||    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)(2015-02-09 09:30:44) Information: Task Execute Duration=00:00:00.1403955(2015-02-09 09:30:44) Information: Sending Alert mail(2015-02-09 09:30:46) Information: TaskResult.status=Finished(2015-02-09 09:30:46) Information: Notifying all triggers of new state:FinishedWithErrors(2015-02-09 09:30:46) Information: Notifying all triggers of new state:FinishedWithErrors - completed(2015-02-09 09:30:46) Information: Saving Task Result

P.S.: Oh - there it is. I attach it.

datanibbler
Champion
Champion
Author

Oh ...

I just see there seems to be something about the folder \03_Application.

Could it be that, since I moved that app into \04_Non-User_apps, the QMC cannot run it?

I did that because another app that is to monitor usage of our apps looks for all qvw_files in 03_Application - but that app and others like it are not intended for the end_users, so counting them would be incorrect.

datanibbler
Champion
Champion
Author

Wow!

It goes - er, it works 😉

I just deleted that task - well, I set the reload_schedule to "None" and I added it new from the "Documents" tab. Now it runs without issues.

Well, not quite - I have another problem now: That one codeblock that I intended to set to run only on Fridays (while the app is reloaded once a day) is apparently executed now for I get the popup and the email for that specific directory - I know for I have the exact path in the body of the email - alerting me that there are not 2 files in that directory - which is very improbable to ever be so on a monday, that's why I tried using that IF...THEN clause - but that doesn't seem to work.

Can anyone help me with that?

Thanks a lot!

Best regards,

DataNibbler

Not applicable

Yea looks like it is still trying to reference the 03 location. Probably best to re-create the task for the new location and see if that resolves for you.

datanibbler
Champion
Champion
Author

Hi,

yes, that one works. Now I have that other problem - it seems to be that the WEEKDAY() function is not evaluated or evaluated differently when reloading on the server rather than locally - for when I reload locally, the code is not executed - as it should not be for it's not Friday.

Maybe I have to specify the parameter 0 for "evaluate upon reload" for the app is not opened on the server?

datanibbler
Champion
Champion
Author

Hmmm ... the app runs without issues on the server, but I still do get that alert.

Do I have to specify the condition with the weekday in the alarm as well?

That could well be for the alarm now looks for a variable to evaluate which doesn't exist when that code is not executed.

datanibbler
Champion
Champion
Author

Yes, apparently that was it.

This thread is closed now.

Thanks to all for helping!

Not applicable

I've not done much with alerts I'll be honest, for this sort of thing I normally use an execute statement to fire during the reload to send email alerts.

I would first check the if statement from the server by just writing an extra trace line into your code, to see if the server if correctly skipping the section (and just check the app log for the tracer line). That would point to the alert being the problem yea.