0
votes

My Build Server has been running just fine for a couple months and then this week we started getting this problem (see below).

It's almost certainly a permission problem, but no one in IT will admit to having changed a permission somewhere.

Also, it's trying to publish a log file to a location that doesn't exist!

to '#/416/logs/msbuild/agent-2'

If I knew where this location was, I would happily fix it or turn this specific publish off. All the other logs are present and accessible (obviously I'm able to view the log of these errors).

using Visual Studio 2013 & TFS2013.

This is the same issue, but changing the drop folders didn't fix it: TFS Error publishing log files to #/198/logs/msbuild/agent-2

Other Errors and Warnings
3 error(s), 0 warning(s)

Exception Message: TF270016: An error occurred publishing log files from 'C:\Builds\2\AppName\AppName\src\AppName\AppName.log' to '#/416/logs/msbuild/agent-2'. Details: An error occurred while sending the request. (type PublishLogFileException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Inner Exception Details:

Exception Message: An error occurred while sending the request. (type HttpRequestException) Exception Stack Trace: at Microsoft.TeamFoundation.Build.Workflow.Activities.FileContainerDropProvider.CopyDirectory(String sourceDirectory, String targetDirectory) at Microsoft.TeamFoundation.Build.Workflow.Activities.FileContainerDropProvider.CopyDirectory(String sourceDirectory, String targetDirectory, String[] renameIfExists)
at Microsoft.TeamFoundation.Build.Workflow.Activities.PublishLogFile.Execute(CodeActivityContext context)

Inner Exception Details:

Exception Message: Unable to connect to the remote server (type WebException)Exception Stack Trace: at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)

Inner Exception Details:

Exception Message: No connection could be made because the target machine actively refused it [::1]:8080 (type SocketException) Exception Stack Trace: at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)

An error occurred while copying diagnostic activity logs to the drop location. Details: An error occurred while sending the request.

An error occurred while copying diagnostic activity logs to the drop location. Details: An error occurred while sending the request.

Update 12/29/2015

I've been able to confirm with IT that our main TFS instance was updated to 2013 Update 5. Our build server is running TFS 2013 Update 4. My next priority will be getting the build server updated.

2
What is your drop location currently set to? Server or file share? if file share, is it a fully qualified server name, or a "friendly" DNS alias?Daniel Mann
Did all your team members experience this issue? You can try to set the drop location \\machinename\drops, and clean the cache folder on TFS AT machine: C:\Program Files\Microsoft Team Foundation Server 12.0\Application Tier\Web Services_tfs_data.Cece Dong - MSFT
@DanielMann, I have the build definition set to "not copy output files to a drop folder". I'm using PublishProfiles to perform web.config transforms and deploy to a fully qualified network location. This works in spite of the PublishLogFileException.MothraTL
@Cece-MSFT Yes, all projects are experiencing this error. I checked and the cache folder was already empty.MothraTL

2 Answers

0
votes

You can try to create a new build agent to see whether the issue persists.

0
votes

The issue had nothing to do with TFS.

On the build server machine, we had a copy of Visual Studio installed (necessary for MSBuild and MSTest). The license we used had expired, and as a result Visual Studio installed in trial mode.

I don't know why this mattered, but reinstalling Visual Studio using a valid license fixed the issue.