Odd behavior of Actual Parameters on Agent

I recently needed to move the installation of my Build Agent from the C: drive to the D: drive, and now one of my Build Configurations will not build correctly.

The error I am getting is because for this particular Build Configuration, the teamcity.agent.work.dir variable is being set to the old C: path.  Every other build configuration is working and getting the correct D: path (which is set in the buildAgent\conf\buildAgent.properties file).  There is only one Agent registered to the Server, and I am running the different Build Configurations back to back without restarting the Server or the Agent, so they are definitely using the same Build Agent.  I am wondering where the Build Configuration could be getting the old C: drive path from, as I thought those came directly from the buildAgent.properties file?

I have searched the local drives of the machine the Build Agent is installed on (which is the same machine as the Server) for other copies of the file buildAgent.properties, but did not find any that I wasn't expecting (namely, only the one in the buildAgent\conf).

Thanks for the help,
~Alex

7 comments
Comment actions Permalink

Hi Alex

Could you post teamcity-agent.log with the error message please.

0
Comment actions Permalink

The actual error that I get is only in the teamcity-build.log.  I have attached both.  The error is that TeamCity can't find the FxCop project that I define in the runner because the teamcity.agent.home.dir variable is being resolved to the old path "C:\TeamCity\buildAgent" instead of the new path "D:\TeamCity\buildAgent"

I am no longer getting this error however.  I believe it was a caching issue on that specific Build Configuration that it was not reading the new Properties file.

To clarify:

Originally:
Build Agent was located in C:\TeamCity\buildAgent.  Things ran smoothly.

About a week ago:
Build Agent was moved to D:\TeamCity\buildAgent (by uninstalling the old agent and reinstalling it to D:).  All but one of the Build Configurations built correctly using the teamcity.agent.work.dir

Now:
Without changing anything, the erroring Build Configuration is building correctly.



Attachment(s):
teamcity-build.log.zip
teamcity-agent.log.zip
0
Comment actions Permalink

Hi Alex

Unfortunately I cannot diagnose root cause of that issue from these logs.
Please let me know if such problem happens again in future.

Thanks
Michael

0
Comment actions Permalink

Michael,

I am getting this error again, although I think it is on a different Build Configuration.

What surprises me is that I have a successful build from a month ago that correctly used the D: drive, but now it is incorrectly using the C: drive.

As before, the other Build Configurations that are using the same Build Agent are working and correctly using the D: drive.

Any thoughts?

~Alex

0
Comment actions Permalink

And now it's working again, but I still haven't figured out why.

~Alex

0
Comment actions Permalink

You haven't said explicitly that you've done this already, but apologies if you have: I would check the Windows Registry (on your agent server) for keys containing the C drive reference that might not have been removed during the uninstall process, and also the build configuration XML files on your TC server for any possible hardocded references to the same.

0
Comment actions Permalink

I searched through the registry and did not find any instances of "C:\TeamCity" that would be a parameter.

What specifically would I be looking for in the configuration XML files?  I searched for "C:\TeamCity" and found a bunch, but they appear to be from old log files.  Would searching for the parameter name be better (i.e. teamcity.agent.home.dir)?

0

Please sign in to leave a comment.