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


Guest
  •  dwrb
  • No customer Topic Starter
2014-04-08T22:09:37Z
I brought this issue up before: http://www.visualcron.co....aspx?g=posts&t=3898 

After some time spent understanding how the VC service must be configured, and a clean install, I thought the problem was resolved.

After not looking at the server for 2 weeks, I am getting the same problem again. (The job is not configured to run on a schedule, just ad-hoc for now, and this is the first time Anybody's been on the server in the past 2 weeks.)

A summary of my problem:
1) Using Win2008R2 server
2) Using VC 7.1.3 with service configured to interact with desktop
3) Jobs were configured and ran successfully with credentials using "Load User Profile"
4) [two weeks go by without looking at this server; no Windows updates, but automatic reboots every weekend]
5) Exception replicates next time I'm logged into server
6) As a test, set up job to run simple cmd script calling "date /t"
--> test job fails with "Load User Profile"
--> test job completes successfully without "Load User Profile"
7) Reboot server
--> Same exception for "Load User Profile"
8) Upgrade to VC 7.1.4
9) Validate VC service is still configured to interact with desktop
--> Same exception for "Load User Profile"
10) Reboot server
--> Same exception for "Load User Profile"


I'm really not sure what's going on here. We are successfully using VC 7.0.8 daily on another server. Given the problems I'm having here, I'm afraid to upgrade that server and wondering whether I should downgrade this server to 7.0.8 in an attempt to find something that works for me.

I don't see anything that jumps out at me in the event log.

a) there is this one entry under source "User Profile Service":

Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.

DETAIL -
1 user registry handles leaked from \Registry\User\S-1-5-21-927577446-3854444739-2300020530-1209:
Process 3828 (\Device\HarddiskVolume2\Windows\System32\svchost.exe) has opened key \REGISTRY\USER\S-1-5-21-927577446-3854444739-2300020530-1209


b) there's a message in the system log:

Application popup: cmd.exe - Application Error : The application was unable to start correctly (0xc0000142). Click OK to close the application.


Any guidance on how to debug is really appreciated.
Sponsor
Forum information
Support
2014-04-09T06:42:04Z
1. So, the problem starts when you logon with the same user as you use for Credential?
2. Is any Task (using this Credential) running when you do the above?
3. do you get any error when using another Adminstrator as Credential? And does it matter if it is a local or AD user?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
  •  dwrb
  • No customer Topic Starter
2014-04-09T12:56:41Z
Thanks for your suggestions.

1) No. I am logged in as a different user from the VC credentialed user. I'm not sure when the problem starts. It worked 2 weeks ago, and now isn't working. I haven't been on the server in the interim, and very little has been running on it. The server has rebooted via a scheduled reboot at least 2 times.

2) There are no processes running as the VC credentialed user.

3a) The VC credentialed user is an AD user, but not a local admin.
3b) Using my AD account (local admin) I get the same problem.
3c) Using local admin (not AD account) I still get the same problem.

Thanks.



Support
2014-04-09T13:30:19Z
Did you ever verify if this was a state of Windows or a version specific problem. Let say you backup settings now to a safe place. Downgrade to 7.0.8 and try to run the same executable again - does it work?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
  •  dwrb
  • No customer Topic Starter
2014-04-09T14:13:49Z
My experience has been that a clean install resolves this problem temporarily. This is actually the third time I've encountered this issue. The first time a clean install fixed it. The second time I logged it under http://www.visualcron.co....aspx?g=posts&t=3898  , and ultimately it took a clean install to resolve completely. Now is the third time.

This server is still in pre-production. I'd really like to understand the problem before releasing it to production. I understand if you think the best course of action is to
- export the settings
- uninstall
- install 7.0.8
- import the settings
- confirm everything is working
- wait and see if it happens again

but that doesn't give me the confidence I need to release the server to production. And even if the underlying issue is environmental and not related to VC, if there are no tools to diagnose, I won't be able to upgrade beyond 7.0.8 ever.

Thanks in advance for any other suggestions you may have.
Support
2014-04-09T14:26:44Z
There are a lot of question marks concerning this error as only a few users have experienced it.

We think this problem started with version 7.1.0 when we had the installer set to "Interact with desktop" to false. This was present in 7.1.1 and 7.1.2. In 7.1.3 we reverted back.

I see the possible scenarios:

1. there might be a bug in the code (so far we cannot see any related code changes)
2. users installed 7.1.0 - 7.1.2 marked the system as dirty forever - even if installing and checking that it comes back later
3. a Windows update is causing this
4. a specific Windows security setting is causing this

In your case, I would suggest installing 7.0.8. to test if it works directly or requires a reboot. If it works after this I would like you to continue running this version with same Jobs and Tasks to see if you can reproduce the problem later. This will hopefully verify if there is a bug in VisualCron.

I think it might be best to merge this topic into the first topic as it is related.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
  •  dwrb
  • No customer Topic Starter
2014-04-10T03:30:09Z
In the process of uninstalling VC I inadvertently fixed it and got sidetracked trying to understand why. I'm still on 7.1.4 and it's not working now after a reboot, but I noticed something interesting.

I changed my test job to run "whoami" and currently VC is showing the output "nt authority\system" when running with a credential using Local User only. (Local User + Load Profile gives Exit code: -1073741502.)

So all along I've been trying to understand why VC cannot load a user's profile, but it seems to me the real problem is VC is not able to impersonate a user. (Maybe trying and failing to load system user's profile is where my Exit code: -1073741502 is coming from.)

I'm not clear on the mechanism VC uses to impersonate users, but maybe this information would offer a clue on steps I can take to isolate the problem.

Thanks.
Support
2014-04-10T07:34:07Z
Originally Posted by: dwrb 

In the process of uninstalling VC I inadvertently fixed it and got sidetracked trying to understand why. I'm still on 7.1.4 and it's not working now after a reboot, but I noticed something interesting.

I changed my test job to run "whoami" and currently VC is showing the output "nt authority\system" when running with a credential using Local User only. (Local User + Load Profile gives Exit code: -1073741502.)

So all along I've been trying to understand why VC cannot load a user's profile, but it seems to me the real problem is VC is not able to impersonate a user. (Maybe trying and failing to load system user's profile is where my Exit code: -1073741502 is coming from.)

I'm not clear on the mechanism VC uses to impersonate users, but maybe this information would offer a clue on steps I can take to isolate the problem.

Thanks.



The mechanism we use, or rather the Windows API function that we use, is CreateProcessLogonW. We have used that for 6 years without really modifying it. This could of course be bad if something external has changed.

This error is connected to the Load profile option. And if Load profile fails then the user will always be the default LocalSystem.

Now when you are in the fail state I would like you to test some things:

1. download 7.1.6: http://neteject.com/down...Cron/VisualCron7.1.6.exe 
2. I assume it will not work after installation - please confirm
3. open the Credential and first try to check "Open desktop". Please note that you need to have Extended debugging on in Server settings in order to see that option. Then try to run the Task. Please let us know result and send the log_serverDATE.txt after running
4. edit the Credential again and check "Duplicate token". Test again.
5. open the Task manager and disconnec the user (is it listed among connected users?) that you are using for the Credential. When you have done that, test again.
6. if it still does not work then logoff, logon (no restart) and try again

Then I also would like to know:
1. do you run VisualCron in any virtualized environment like VMWare?
2. do you apply any special security settings or use a "vanilla" install of the software?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
  •  dwrb
  • No customer Topic Starter
2014-04-10T14:49:01Z
Thanks for the suggestions.

> 2. I assume it will not work after installation - please confirm
Yes, still broken

> 3. open the Credential and first try to check "Open desktop". Please note that you need to have Extended debugging on in Server settings in order to see that option. Then try to run the Task. Please let us know result and send the log_serverDATE.txt after running
Worked as desired. (I didn't look closely, and both DuplicateToken and SuppressFlow were also selected.)

> 4. edit the Credential again and check "Duplicate token". Test again.
I tried again, but this time with just OpenDesktop and SuppressFlow. Still worked as desired.

> 5. open the Task manager and disconnec the user (is it listed among connected users?) that you are using for the Credential. When you have done that, test again.
User is not listed in task mgr (yes, I am running it as Admin).

Now that it's working, if i remove all debug settings, it still works. That result is somewhat unsatisfactory, since I was hoping we could point to a setting which resolves the problem. Happy to operate with whichever settings you think are correct.


> Then I also would like to know:
> 1. do you run VisualCron in any virtualized environment like VMWare?
Yes, all our servers are virtualized via vmware

> 2. do you apply any special security settings or use a "vanilla" install of the software?
Yes, we enable a number of group policy settings. I can send them.


Support
2014-04-10T15:41:45Z
Thank you for your testing. The problem seems to be that the "desktop" that we open for execution of processes is closed outside of VisualCron. We will investigate what needs to be done here. If we should open it every time or can detect that it is closed.

But it would be interesting to know what causes it to close.

Hope to get back to you tomorrow.

FYI The version that you have now opens the desktop everytime the process starts. This is not necessarily a problem.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2014-04-11T17:35:25Z
I would say now that this is pretty much handled in 7.1.6.

http://www.visualcron.co....aspx?g=posts&t=4017 

What we have done is to change that we "Open" the desktop before launching a process. It seems like on some servers, for some reasons the desktop object is lost and causing this error. We are currently stress-testing these methods but have not see any issues so far. Thanks for the feedback and report!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
George Mohr
2014-06-26T19:38:27Z
Hi Herik,

I'm experiencing this problem as well, running VC 7.1.7. My "Execute" jobs can no longer function using credentials by clicking the "Load profile" checkbox. If I unclick them, things seem to work fine.

However there is an odd side effect. In my execute job, I run a .NET exe, and that app is not reporting the proper user ID. You can see from my log that it looks like a local user, but the credentials in VC are a domain user.

BatchSimulator.exe Information: 0 : 0.01 : BatchSimulator.exe is a...
BatchSimulator.exe Information: 0 : 0.01 : 64bit process
BatchSimulator.exe Information: 0 : 0.02 : running as user NT AUTHORITY\SYSTEM

Even stranger, the process is actually running using the domain user creds, as is can get to the database and file system. Disabling this account in SQL server throws an error back to the job, so I know the impersonation is "kindof working". This mis-reporting of the user to the .net app is puzzling, and to be honest, it makes me nervous.

Something broke a few versions back (not sure which version of VC began this problem). Happy to show you interactively if that helps.

Regards,
George
Support
2014-06-27T06:54:12Z
Originally Posted by: George Mohr 

Hi Herik,

I'm experiencing this problem as well, running VC 7.1.7. My "Execute" jobs can no longer function using credentials by clicking the "Load profile" checkbox. If I unclick them, things seem to work fine.

However there is an odd side effect. In my execute job, I run a .NET exe, and that app is not reporting the proper user ID. You can see from my log that it looks like a local user, but the credentials in VC are a domain user.

BatchSimulator.exe Information: 0 : 0.01 : BatchSimulator.exe is a...
BatchSimulator.exe Information: 0 : 0.01 : 64bit process
BatchSimulator.exe Information: 0 : 0.02 : running as user NT AUTHORITY\SYSTEM

Even stranger, the process is actually running using the domain user creds, as is can get to the database and file system. Disabling this account in SQL server throws an error back to the job, so I know the impersonation is "kindof working". This mis-reporting of the user to the .net app is puzzling, and to be honest, it makes me nervous.

Something broke a few versions back (not sure which version of VC began this problem). Happy to show you interactively if that helps.

Regards,
George



Most likely you need to physically login once with this user to make it work. I am guessing that this error is a result of that you never have done this.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2015-04-14T14:33:02Z
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!
Support
2016-06-10T12:39:54Z
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