Menu

#284 wrapper incorrectly identifies missing "Environment" registry key as a permissions issue when running the service as a user other than the local system account

v3.5.9
open
nobody
5
2014-08-18
2013-11-14
Jeremy Hopf
No

wrapper incorrectly identifies missing "Environment" registry key as a permissions issue when running the service as a user other than the local system account

Specifically, on Windows XP SP3 (32-bit) (and probably in other situations) if you configure it to run as a service account (a user that has never logged in, but has full administrator access) there is no Environment registry key, and it is logged as follows to wrapper.log:

FATAL | wrapper | 2013/11/13 20:00:23 | Unable to access registry to obtain environment variables - The operation completed successfully. (0x0)

I was able to solve the problem by creating this key in the user hive.. It appears that by default this key does not exist in XP until after you have set a user environment variable. I would expect other OS's have a similar issue. With Windows 7, we did not experience this problem.

I found this solution here:
http://superuser.com/questions/343714/teamcity-build-agent-service-immediately-fails-with-1053-did-not-start-in-a-tim

Basically running the following will fix it:
runas /user:MYDOMAIN\MyUser "REG ADD HKCU\Environment /v Foo /d Bar"
(the quotes in the link did not work for me in XP, I had to change them)

I may have put this under the wrong milestone, but 3.5.21 is the version we are using and it was not available as a milestone to select for me.

Discussion


Log in to post a comment.