New Agent can't create workDir or tempDir

We are trying to replace our old TeamCity Agents running on Windows 2008r2 with TeamCity agents running on  Windows 2012. We can't seem to get the agent to use a different workDir and tempDir. Below you can see a snippet from the agent log.

[2014-05-15 08:06:24,221]   INFO - dAgentConfigurationInitializer - Loading build agent configuration from ..\conf\buildAgent.properties
[2014-05-15 08:06:24,221]   WARN - ig.BuildAgentConfigurablePaths - Failed to set tempDir from 'T:\Build\Agent\temp'. Cannot create directory: T:\Build\Agent\temp. Default value '../temp' will be used.
[2014-05-15 08:06:24,221]   WARN - ig.BuildAgentConfigurablePaths - Failed to set workDir from 'T:\Build\Agent\work'. Cannot create directory: T:\Build\Agent\work. Default value '../work' will be used.
[2014-05-15 08:06:24,237]   INFO - s.buildServer.agent.AgentMain2 - Working dir: C:\Program Files (x86)\BuildAgent\work
[2014-05-15 08:06:24,237]   INFO - s.buildServer.agent.AgentMain2 - Temp dir: C:\Program Files (x86)\BuildAgent\temp

We have installed the Team City Agent software in C:\Program Files (x86)\BuildAgent\, which is the default when installing the agent software. We then set the workDir and tempDir to anothter location, in our case T:\Build\Agent ...
When the agent starts up we get the Warning above.

The agent is configured to run as a Windows Service as a specific user. We need to run as this user for connection to other systems. This always worked on Windows 2008r2.

Any advice would be appriciated.

Regards,

Ron Barrett

5 comments
Comment actions Permalink

We found by using the jre that is packaged with the Agent software this problem goes away. I noticed in the wrapper log that there seemed to be an acces problem when going outside of the agent directory for the jre.

0
Comment actions Permalink

We are still having problems getting the agent to access the build and temp folder on another drive. If anyone has expirence with 2012 and Team City Agent configuration, we would appriciate any assistance you could provide.

0
Comment actions Permalink

Is it a mapped network share? Windows dowsn't allow services to access them.
Please look at Agent running as Windows Service Limitations article for details.

0
Comment actions Permalink

This appears to be the case. I started the agent in a console and it was able to access the workDir and tempDir on drive T: The drive is to my knowledge not a  mounted network dirve, but I will check with our Cloud Team. I am wondering if this is Windows 2012 issue.

Thanks for your replay. I will keep you informed.

0
Comment actions Permalink

The reason for this was a bug in Windows 2012 that was fixed in a patch that came out later. After installing all patches (optional included) the agents are now working.

0

Please sign in to leave a comment.