Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Dave Newbern
2015-04-17T20:24:40Z
Hi.

Facts:
* This is a new install.
* Windows 2008 R2 SP1.
* Security policies (specifically user rights) have been restricted as part of security posture
* Using a domain user account for credentials to launch the process.


Situation:
I have a batch file that does nothing but echo some text to stdout. When I execute it as a background process it fails. Job log shows:
exit code of 77777
Output = No output
Output (stderr) = Exception in Task: Non zero exit code


When I execute the job in the foreground it seems to work just fine.
exit code = 0
Output = Completed successfully
Output (stderr) = No Output


Could this be a product of the User Rights changes? (things like Act as part of the operating system, logon as batch job, etc..) If so, do you have documentation that describes what rights should be granted?

In background mode when the job seems to fail, I can see in the Security event log that the process performs a Logon, a Special Logon, several processes are created (including the cmd.exe that should process my batch file) and the logoff occurrs- all without errors.

I also note that if I change the batch file to execute something else, like notepad.exe, that the process does not seem to get started or appear as a running task.


Any suggestions would be helpful. I am demoing the product and would love to license it but need to get it working first.

Thanks



Sponsor
Forum information
omaresp
2015-04-17T20:49:11Z
Depending on what you are trying to execute, Error code 77777 usually means access denied somewhere. Check that the user trying to execute the task has access to do so.
Support
2015-04-19T20:59:00Z
Actually, exit code 77777 does not directly have anything to do with "access denied". It is a general error in VisualCron that we throw when an process does not throw any other error. Normally, if this is an execute Task it means that it could not even start the process.

You should turn on Extended debugging in Server settings->Log then look at the log file log_serverDATE.txt. Please paste any errors during the execution here.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Dave Newbern
2015-04-20T15:31:46Z
Thanks for your help. Here is the excerpt from the log.




4/20/2015 11:17:36 AM Debug 2015-04-20 15:17:36.027: MessageRecived From (in) uuid:139e3de2-16c0-480f-9c02-7e0d04eba0b9;id=2: TaskRun
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : VCJobProcess
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : VCJobProcess
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : JobStats
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : JobStats
4/20/2015 11:17:36 AM Debug SendJobStats->Ended (4/20/2015 11:17:36 AM)
4/20/2015 11:17:36 AM Debug Next action: ActionContinue
4/20/2015 11:17:36 AM Debug Next Task is: Execute
4/20/2015 11:17:36 AM Debug Calling StartTaskProcess() with Task: Execute (0)
4/20/2015 11:17:36 AM Debug 2015-04-20 15:17:36.167: MessageSend To (Private) uuid:139e3de2-16c0-480f-9c02-7e0d04eba0b9;id=2: TaskRunResult
4/20/2015 11:17:36 AM Info Task started: Execute (3585)
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : VCTaskProcess
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : VCTaskProcess
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : TaskStats
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : TaskStats
4/20/2015 11:17:36 AM Debug ptrDesktop: 68
4/20/2015 11:17:36 AM Debug ptrWindowStation: 64
4/20/2015 11:17:36 AM Err Error OpenDesktop: 5 - Access is denied.
4/20/2015 11:17:36 AM Debug Process status - retrieving process id (3585)
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : VCTaskProcess
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : VCTaskProcess
4/20/2015 11:17:36 AM Debug Process status - process has already exited at WaitForExit
4/20/2015 11:17:36 AM Debug Process status - OutPut captured (3585)
4/20/2015 11:17:36 AM Debug Process status - trying to retrieve exit code
4/20/2015 11:17:36 AM Err Task "Execute" exited with code: -1073741502(Exit code -1073741502 was not found in exit code collection 'Windows.)
4/20/2015 11:17:36 AM Debug Process status - ExitCode fetched (3585)
4/20/2015 11:17:36 AM Debug Process status - ProcessHandles closed (3585)
4/20/2015 11:17:36 AM Debug Ending timeout timer (3585)
4/20/2015 11:17:36 AM Debug Ending output readers (3585)
4/20/2015 11:17:36 AM Debug Closing desktop handles (3585)
4/20/2015 11:17:36 AM Debug Process status - About to raise TaskCompleted (3585)
4/20/2015 11:17:36 AM Err GetExitCodeResult->Collection: Windows, error: VisualCronAPI.ExitCodes+ExitCodeNotFoundException: Exit code -1073741502 was not found in exit code collection 'Windows.
at VisualCronAPI.ExitCodes.GetExitCodeInfo(ExitCodeCollectionClass ecc, Int32 intExitCode)
at VisualCronService.ExitCodeAPI.GetExitCodeResult(String strCollectionId, Int32 intExitCode) in C:\sourcefiles\code\VisualCronService\Jobs\ExitCodes\apiExitCode.vb:line 267
4/20/2015 11:17:36 AM Info Task completed: Execute (3585)
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : VCTaskProcess
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : VCTaskProcess
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : TaskStats
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : TaskStats
4/20/2015 11:17:36 AM Debug PrevTaskProcess(Execute)->ExitCodeResult: Failure (ECCId: 746c95ce-d394-491c-925c-8bd50e4daa8ePId: 3585, Exit code: 77777)
4/20/2015 11:17:36 AM Debug Found 1 matching flows. (3585)
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : VCJobProcess
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : VCJobProcess
4/20/2015 11:17:36 AM Debug Next execution (2) for job 'MTMSCP_MSXSCHED' is: 4/20/2015 11:20:00 AM
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : JobStats
4/20/2015 11:17:36 AM Debug MessageSend (ToAll) To (Empty) : JobStats
4/20/2015 11:17:36 AM Debug SendJobStats->Ended (4/20/2015 11:17:36 AM)
4/20/2015 11:17:36 AM Info Job completed: MTMSCP_MSXSCHED
4/20/2015 11:17:42 AM Debug 2015-04-20 15:17:42.626: MessageRecived From (in) uuid:139e3de2-16c0-480f-9c02-7e0d04eba0b9;id=2: Ping
4/20/2015 11:17:42 AM Debug 2015-04-20 15:17:42.626: MessageSend To (Private) uuid:139e3de2-16c0-480f-9c02-7e0d04eba0b9;id=2: Ping
Support
2015-04-20T15:33:49Z
We did some research about exit code -1073741502 and we found 2 possible solutions:

1. Go to administrative tools->Local security policy. Set SYSTEM user with Logon as batch Job. Reboot. Try Task again.
2. Disable UAC. Reboot computer. Try Task again.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Dave Newbern
2015-04-20T18:09:52Z
Thanks for the reply.

UAC was already disabled.
SYSTEM was missing from Logon as Batch Job. I added it and rebooted. I get the same error as before. What do we try next?
Dave Newbern
2015-04-20T19:32:47Z
I kept troubleshooting and in the process I removed the software, cleaned up the registry and reinstalled. Now it complains that my trial has expired. What is the best way to continue the trial until I can resolve this execution problem?

thanks.
Support
2015-04-21T08:39:48Z
Originally Posted by: Dave Newbern 

I kept troubleshooting and in the process I removed the software, cleaned up the registry and reinstalled. Now it complains that my trial has expired. What is the best way to continue the trial until I can resolve this execution problem?

thanks.



We have emailed you a trial extension code.

Another thing you should try, if you haven't, is to physically logon with the same user once (with the Credential that you use). It might be that the profile has not been fully created.

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Dave Newbern
2015-04-21T17:22:28Z
Thank you for the code. I received it and applied it successfully. Continuing to look for the problem.

FYI, it appears to be working better now. Previously I had installed the application on another partition, not in the usual "program files (x86)" folder. When i came across the Security Option "User Account Control: Only Elevate UIAccess applications that are installed in secure locations" I thought that I would reinstall into the default location. The UAC slider was set to Never prompt so who knows if this has anything to do with anything. In any event, once I restored a few xml files I can now execute tasks as the system account or a named account.

I will continue my testing - thanks for your help.
Dave Newbern
2015-04-21T17:32:23Z
This is making a liar out of me. After a restart to add another vCPU it is failing again.
Support
2015-04-21T19:27:09Z
Please try the 7.6.5: http://www.visualcron.co....aspx?g=posts&t=4907 

Then add the startup log. We are logging some information about UAC there.

I wonder what kind of policies you do apply because with a vanilla install you will not get this error.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Dave Newbern
2015-04-22T16:11:25Z
I believe that with a vanilla install there won't be a problem. We try to follow the DID STIGs regarding policies. I have relaxed the FIPS requirement for the system running Visual Cron but sometimes these things get in the way. I'm not convinced it is a policy though as I have observed that this issue does not always behave in the same way. Here is a weird observation. Yesterday after a reboot my test job seems to be working. I run it a few more times and it's good to go. I go get a cup of celebratory coffee, come back and now it fails. I try to restart the VisualCron service and it fails to start. After a reboot of the system it has started. Before I run any jobs I observe that I can restart the service just fine. This time I get one successful execution of a job and then failure. Can't restart service. Reboot. Now I get about an hour and a half of successful jobs (possibly because I have a single job that is running all of this time) and go home. This morning I saw nothing but overnight failures.

Very strange. Almost like there is a lock or mutex not being closed properly. I will try installing the other version with more enhanced logging. Stay tuned.
Dave Newbern
2015-04-22T18:20:50Z
I installed the update. Following the install the service failed to start. I rebooted. Service failed to start again.

Application popup: VisualCronService.exe - Application Error : The exception unknown software exception (0xc06d007e) occurred in the application at location 0xfd9c940d.

The VisualCron service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.


Another reboot and it seems more stable. So I booted it again to try to anger it. Seems stable for the moment.

server_startup.txt is the most recent log.
server_startup_error.txt contained an error that I thought you might like to see.


  server_startup_error.txt (16kb) downloaded 53 time(s).
  server_startup.txt (15kb) downloaded 51 time(s).
Support
2015-04-23T07:00:28Z
Ok, so we have two different errors, first this one regarding the execution:

4/20/2015 11:17:36 AM Err Error OpenDesktop: 5 - Access is denied.

I am not exactly sure which permission is blocking this but that is the problem. You could try to change the Execute Task to "Managed mode" instead of "API mode".

The crash is interesting. It is probably related to something being done so we would like the log_serverDATE.txt from the time of the crash. Also, if you can look up any error in the event viewer.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Dave Newbern
2015-04-23T12:47:28Z
log attached.
  log_server20150422.txt (438kb) downloaded 49 time(s).


I will try that, though I think the issue may be rooted deeper. Things were running okay until 2am last night (see 2am.jpg.)
2am.JPG
After 2am, every scheduled execution resulted in this in the event log:
Application popup: cmd.exe - Application Error : The application was unable to start correctly (0xc0000142). Click OK to close the application.
There isn't much else of interest in the event logs except some noise from a SSH daemon that looks like it was probed by one of our network security monitors. On the chance that probing is having an effect on VisualCron I will block it for now.


I stopped the visualcron service and it won't restart. (it isn't logging its startup attempts to the VC logs). Rebooting and will continue.
Dave Newbern
2015-05-01T15:17:22Z
I just wanted to circle back around on this. I have been running for the better part of a week now. I can't be sure but I think it may have something to do with the log sizes. I noticed that I had a job that was running, but the end of the log was being cut of. I went in to Settings to increase the output settings (up to 20,000 characters) and the database settings (20,000 rows each.) It enabled me to troubleshoot the job but I also noticed that since I did that I have no more problems with the service locking up or the execution failing for no good reason.

If I can I will try to put the settings back to normal and see if the problem re-appears.

Support
2016-06-10T12:37:15Z
We have modified this Task for 8.1.2 so there is no need for UAC disabling. So if you encounter this again please test this beta or official when released: http://www.visualcron.co....aspx?g=posts&t=6721 
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top