none
Service Account changed--All builds now failing?

    Question

  • Just for the sake of administrative consistency, we changed the service account that the Build Service runs under (for some reason, it was originally set to DEV\tfssetup, and builds were working fine).  We changed this service to run under DEV\tfsservice, which is what all the other TFS services run under.  Now, all builds are failing, and the build logs state that:

     

    Build started 3/23/2007 10:28:54 AM.
    __________________________________________________
    Project "C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\BuildType\TFSBuild.proj" (EndToEndIteration;EmailAdmin target(s)):

    Target InitializeEndToEndIteration:
        UpdateBuildNumberDropLocation BuildNumber='DEV - Dove Interface Services_20070323.1' DropLocation='\\TFOKDEVWEB.dev.teleflora.org\BuildServer\Drop\DEV - Dove Interface Services_20070323.1'
       
       
       
    Target CoreClean:
        Removing directory "C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\BuildType\..\Sources".
        Removing directory "C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\BuildType\..\Sources\..\Binaries".
    Target InitializeBuild:
        Creating directory "C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\BuildType\..\Sources".
    Target InitializeWorkspace:
        DeleteWorkspaceTask Name="TFOKDEVTEAM_Hosted_DEV - Dove Interface Services" TeamFoundationServerUrl="http://tfokdevteam.dev.domain.org:8080/"
        Workspace TFOKDEVTEAM_Hosted_DEV - Dove Interface Services does not exist.
        CreateWorkspaceTask Name="TFOKDEVTEAM_Hosted_DEV - Dove Interface Services" TeamFoundationServerUrl="http://tfokdevteam.dev.domain.org:8080/" MappingFile="WorkspaceMapping.xml" LocalPath="C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\BuildType\..\Sources" TeamProject="Hosted"
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error : System.Web.Services.Protocols.SoapException: The working folder C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\Sources is already in use by another workspace on this computer.
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error :    at Microsoft.TeamFoundation.VersionControl.Server.Repository.CreateWorkspace(Workspace workspace)
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018: The "CreateWorkspaceTask" task failed unexpectedly.
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018: Microsoft.TeamFoundation.VersionControl.Client.WorkingFolderInUseException: System.Web.Services.Protocols.SoapException: The working folder C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\Sources is already in use by another workspace on this computer.
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Server.Repository.CreateWorkspace(Workspace workspace) ---> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The working folder C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\Sources is already in use by another workspace on this computer.
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Server.Repository.CreateWorkspace(Workspace workspace)
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    --- End of inner exception stack trace ---
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Client.Repository.ProcessHttpResponse(HttpWebResponse response, Stream responseStream, WebException webException, XmlReader& xmlResponseReader)
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Client.Repository.ExecWebServiceRequest(HttpWebRequest request, XmlWriter requestXml, String methodName, HttpWebResponse& response)
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Client.Repository.CreateWorkspace(Workspace workspace)
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Client.Client.CreateWorkspace(Workspace workspace)
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.CreateWorkspace(String name, String owner, String comment, WorkingFolder[] mappings)
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Tasks.CreateWorkspaceTask.Execute()
        C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
    Done building target "InitializeWorkspace" in project "TFSBuild.proj" -- FAILED.

    Done building project "TFSBuild.proj" -- FAILED.

    Build FAILED.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error : System.Web.Services.Protocols.SoapException: The working folder C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\Sources is already in use by another workspace on this computer.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error :    at Microsoft.TeamFoundation.VersionControl.Server.Repository.CreateWorkspace(Workspace workspace)
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018: The "CreateWorkspaceTask" task failed unexpectedly.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018: Microsoft.TeamFoundation.VersionControl.Client.WorkingFolderInUseException: System.Web.Services.Protocols.SoapException: The working folder C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\Sources is already in use by another workspace on this computer.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Server.Repository.CreateWorkspace(Workspace workspace) ---> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The working folder C:\BuildServer\Builds\Hosted\DEV - Dove Interface Services\Sources is already in use by another workspace on this computer.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Server.Repository.CreateWorkspace(Workspace workspace)
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    --- End of inner exception stack trace ---
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Client.Repository.ProcessHttpResponse(HttpWebResponse response, Stream responseStream, WebException webException, XmlReader& xmlResponseReader)
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Client.Repository.ExecWebServiceRequest(HttpWebRequest request, XmlWriter requestXml, String methodName, HttpWebResponse& response)
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Client.Repository.CreateWorkspace(Workspace workspace)
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Client.Client.CreateWorkspace(Workspace workspace)
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.CreateWorkspace(String name, String owner, String comment, WorkingFolder[] mappings)
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Tasks.CreateWorkspaceTask.Execute()
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(306,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
        0 Warning(s)
        2 Error(s)

    Time Elapsed 00:00:14.57

     

     

    DEV\tfsservice has full control permissions on the Build directories (share & NTFS permissions), and is a local admin on the TFS server (app & data tiers on same machine).  The build service starts successfully using the new account, but all builds fail.  Has anyone come across this issue?  More details available if necessary.  Thanks in advance,
    Tuesday, March 27, 2007 3:53 PM

Answers

  • Part of the Team Build build process involves creating a workspace that can be used to get sources for the build.  This workspace is typically deleted and then created during the course of the build, meaning that after the build the workspace hangs around.  So - when you changed the service account, the delete for the next build had nothing to do (since workspaces are owned and the current user didn't have a workspace to delete) and the create failed, since a workspace already existed in the same location.  You'll just need to delete the old workspace, owned by DEV\tfssetup.

     

    -Aaron

    Tuesday, March 27, 2007 5:03 PM
    Moderator
  • You can try something like this from a command prompt:

     

    tf.exe /workspace /delete /s:servername workspacename;DEV\tfssetup

     

    replace servername, and workspace name with their appropriate values.

     

    Here's some more info on the tf.exe command-line options:

    http://blogs.msdn.com/buckh/articles/CommandLineSummary.aspx

     

    - Steve

    Tuesday, March 27, 2007 6:23 PM

All replies

  • One other nugget...we changed the service account back to DEV\tfssetup and all builds are working again.
    Tuesday, March 27, 2007 4:02 PM
  • Part of the Team Build build process involves creating a workspace that can be used to get sources for the build.  This workspace is typically deleted and then created during the course of the build, meaning that after the build the workspace hangs around.  So - when you changed the service account, the delete for the next build had nothing to do (since workspaces are owned and the current user didn't have a workspace to delete) and the create failed, since a workspace already existed in the same location.  You'll just need to delete the old workspace, owned by DEV\tfssetup.

     

    -Aaron

    Tuesday, March 27, 2007 5:03 PM
    Moderator
  • Thanks, Aaron...how do I go about deleting workspaces owned by the previous service account?  I'm not a whiz at TFS, so I'd appreciate some guidance.  Thanks,
    Tuesday, March 27, 2007 6:10 PM
  • You can try something like this from a command prompt:

     

    tf.exe /workspace /delete /s:servername workspacename;DEV\tfssetup

     

    replace servername, and workspace name with their appropriate values.

     

    Here's some more info on the tf.exe command-line options:

    http://blogs.msdn.com/buckh/articles/CommandLineSummary.aspx

     

    - Steve

    Tuesday, March 27, 2007 6:23 PM
  • Thanks for the info...I dumped all the workspaces on my TFS box to a text file, and barely half of them are owned by the service account...the rest of them list the owners as various developers.  Would I need to delete (or change ownership) on ALL these workspaces, or just the ones owned by the service account?

     

    Thanks,

    Tuesday, March 27, 2007 9:21 PM
  • Just the ones owned by the service account. If you delete the ones owned by the developers then the server will lose track of the versions of each file each developer has and their checkout status, this won't be appreciated Smile
    Wednesday, March 28, 2007 9:07 AM
  • Thanks to all for the info.  Peace,
    Wednesday, March 28, 2007 2:20 PM