locked
Cannot Register Build Server TFS 2012

    Question

  • I have an issue where a TFS 2012 RC build server can access the main TFS 2012 server and register a build service, if I upgrade this build server to 2012 if fails with the error

    TF400106: Failed to register the build service

    I've now flattened the build server and created it from scratch and I'm still getting the same error. The Server is Windows 2008 R2

    The log is

    ===========================================================

    [Info   @10:00:24.838] +-+-+-+-+-| Running RegisterBuild: Registering the build service |+-+-+-+-+-
    [Info   @10:00:24.838]
    [Info   @10:00:24.838] +-+-+-+-+-| Registering the build service |+-+-+-+-+-
    [Info   @10:00:24.838] Starting Node: CREGBUILD
    [Info   @10:00:24.838] NodePath : Container/Progress/CREGBUILD
    [Info   @10:00:24.856] Get Collection: 'http://<REMOVED>:8080/tfs/<REMOVED>%20it%20dev'
    [Info   @10:00:24.856] create. null host
    [Info   @10:00:24.856]
    [Info   @10:00:24.856] +-+-+-+-+-| RegisterWithApplicationServer |+-+-+-+-+-
    [Info   @10:00:24.875] Unregister
    [Error  @10:00:25.151]
    Exception Message: Index (zero based) must be greater than or equal to zero and less than the size of the argument list. (type FormatException)
    Exception Stack Trace:    at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
       at System.String.Format(IFormatProvider provider, String format, Object[] args)
       at Microsoft.TeamFoundation.Build.Config.Resources.Format(String resourceName, Object[] args)
       at Microsoft.TeamFoundation.Build.Config.BuildServiceHostUtilities.RemovePermissions(Uri baseUrl, Boolean deleteFirewallException)
       at Microsoft.TeamFoundation.Build.Config.BuildServiceHostUtilities.Unregister(ServiceHostConfiguration currentConfiguration, Boolean deleteResources, Boolean ignoreErrors)
       at Microsoft.TeamFoundation.Admin.TeamBuildInstaller.RegisterWithApplicationServer(IAuthenticatedCollectionProvider authenticatedConnectionProvider, IBuildServiceHost host, String collectionUri, Int32 port, AccountInfo serviceAccount, AccountInfo authenticatingAccount, Boolean useSSL, BuildControllerOptions controllerOptions, List`1 agentListOptions, Boolean cleanOldResources, ITFLogger logger)
       at Microsoft.TeamFoundation.Admin.ConfigureRegisterBuild.Run(ActivityContext context)

    [Info   @10:00:25.151] Node returned: Error
    [Error  @10:00:25.151] TF400106: Failed to register the build service
    [Info   @10:00:25.151] Completed RegisterBuild: Error
    [Info   @10:00:25.151] -----------------------------------------------------
    [Info   @10:00:25.151] Execution results:
    [Info   @10:00:25.151] Overall result: Failure
    [Info   @10:00:25.151] Nodes completed: 7
    [Info   @10:00:25.151] Nodes succeeded: 6
    [Info   @10:00:25.151] Nodes skipped: 0
    [Info   @10:00:25.151] Nodes with errors: 1
    [Info   @10:00:25.151] Nodes with warnings: 0
    [Info   @10:00:25.151] Number of error messages: 1
    [Info   @10:00:25.151] Number of warning messages: 0
    [Info   @10:00:25.151] Number of info messages: 0
    [Error  @10:00:25.151] Activity failed.
    [Info   @10:00:25.151] Configuration failed. Unconfiguring.
    [Info   @10:00:25.151] Stopping Service
    [Info   @10:00:25.151] Done.
    [Info   @10:00:25.151] UnregisterWithApplicationServer
    [Error  @10:00:25.170] TF255070: Configuring services for Team Foundation Build failed with the following exception: Index (zero based) must be greater than or equal to zero and less than the size of the argument list..
    [Error  @10:00:25.170]
    Exception Message: Index (zero based) must be greater than or equal to zero and less than the size of the argument list. (type FormatException)
    Exception Stack Trace:    at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
       at System.String.Format(IFormatProvider provider, String format, Object[] args)
       at Microsoft.TeamFoundation.Build.Config.Resources.Format(String resourceName, Object[] args)
       at Microsoft.TeamFoundation.Build.Config.BuildServiceHostUtilities.RemovePermissions(Uri baseUrl, Boolean deleteFirewallException)
       at Microsoft.TeamFoundation.Build.Config.BuildServiceHostUtilities.Unregister(ServiceHostConfiguration currentConfiguration, Boolean deleteResources, Boolean ignoreErrors)
       at Microsoft.TeamFoundation.Admin.TeamBuildInstaller.UnregisterWithApplicationServer(Boolean bestEffort, ITFLogger logger)

    [Info   @10:00:25.170] TeamBuildInstaller.UninstallService
    [Info   @10:00:25.170] Attempting to remove recovery actions for service TFSBuildServiceHost.2012 prior to uninstall.
    [Info   @10:00:25.188] uninstalling TFSBuildServiceHost.2012
    [Info   @10:00:25.188] Uninstalling service TFSBuildServiceHost.2012
    [Info   @10:00:25.188] Process starting: fileName=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe arguments=/u "C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\TFSBuildServiceHost.exe" /LogFile= /LogToConsole=true
    [Info   @10:00:32.545] Process finished: fileName=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe arguments=/u "C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\TFSBuildServiceHost.exe" /LogFile= /LogToConsole=true exitCode=0 in 6231 ms
    [Info   @10:00:32.545] Microsoft (R) .NET Framework Installation utility Version 4.0.30319.17929
    [Info   @10:00:32.545] Copyright (C) Microsoft Corporation.  All rights reserved.
    [Info   @10:00:32.545]
    [Info   @10:00:32.545]
    [Info   @10:00:32.545]
    [Info   @10:00:32.545] The uninstall is beginning.
    [Info   @10:00:32.545] See the contents of the log file for the C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\TFSBuildServiceHost.exe assembly's progress.
    [Info   @10:00:32.545] The file is located at C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\TFSBuildServiceHost.InstallLog.
    [Info   @10:00:32.545] Uninstalling assembly 'C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\TFSBuildServiceHost.exe'.
    [Info   @10:00:32.545] Affected parameters are:
    [Info   @10:00:32.545]    logtoconsole = true
    [Info   @10:00:32.545]    assemblypath = C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\TFSBuildServiceHost.exe
    [Info   @10:00:32.545]    logfile = C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\TFSBuildServiceHost.InstallLog
    [Info   @10:00:32.545] Removing EventLog source TFSBuildServiceHost.2012.
    [Info   @10:00:32.545] Removing EventLog source TFSBuildServiceHost.2012.
    [Info   @10:00:32.545] Warning: The source TFSBuildServiceHost.2012 is not registered on the local machine.
    [Info   @10:00:32.545] Service TFSBuildServiceHost.2012 is being removed from the system...
    [Info   @10:00:32.545] Service TFSBuildServiceHost.2012 was successfully removed from the system.
    [Info   @10:00:32.545]
    [Info   @10:00:32.545] The uninstall has completed.
    [Info   @10:00:32.545] Setting the IsConfigured flag for feature TeamBuild to False.
    [Info   @10:00:32.564]
    [Info   @10:00:32.564] +-+-+-+-+-| ResultsSqmData |+-+-+-+-+-
    [Info   @10:00:32.564] Feature: TeamBuild (2)
    [Info   @10:00:32.582] Feature: TeamBuild; previousFailure: True
    [Info   @10:00:32.582] Error count: 1
    [Info   @10:00:32.582] Warning count: 0
    [Info   @10:00:32.582] Overall Result: Failure (3)
    [Info   @10:00:32.582] WebSiteData: 0
    [Info   @10:00:32.600] SqlData: 0
    [Info   @10:00:32.600] RSData: 0
    [Info   @10:00:32.600] WSSData: 0
    [Info   @10:00:32.600] Wizard: TeamBuild (6)
    [Info   @10:00:32.600] TfsConfigData: 16386
    [Info   @10:00:32.619] serviceLevel: Dev11.RTM
    [Info   @10:00:32.619] Fatal Error Location: 1200
    [Info   @10:00:32.619] Activity = TeamBuild (6)
    [Info   @10:00:32.729] ResultSqmData.UpdateIssues
    [Info   @10:00:32.729] no issues


    Wednesday, August 22, 2012 10:06 AM

Answers

  • The registration process attempts to create a firewall exception for the build service. If this fails, the error should be logged, but not stop the registration. Unfortunately, a bug was introduced to the logging of the warning that threw an exception and stopped the registration.

    We have addressed the bug and it should be out with the next release of the product. The workaround is to start the Firewall service (as you have discovered).

    Thanks for bringing this to our attention.

    Jason

    Thursday, August 30, 2012 1:26 PM
  • We also have the "TF400106: Failed to register the build service" with the message "Index (zero based) ...". After a week of tests and using the TFS 2012 RC as build Service (that works ;)), we found a way to use the TFS 2012 RTM build service.

    We started the Windows Firewall service.

    This service was deactivated during the windows installation, because our server is used only in the intranet. I don't understand why the build service now needs the firewall service, but it helps.
    Monday, August 27, 2012 3:32 PM
  • The Service was the Windows Firewall service, that is the one that's causing the issues.
    Wednesday, August 29, 2012 9:28 AM

All replies

  • Hmm, I've tried uninstalling TFS 2012 and reinstalling, to no avail.

    At what point is the build service installed ? I'm assuming when I run the Configuration Center, it installs the build service. There are two prior tasks that run and pass

    Install Team Foundation Build Service - Pass
    Enable Event Logging - Pass
    Register with Team Foundation Server - Fail

    But When I check the services running on the server, the service hasn't been installed. Is there a way I can manually install the service ?

    Wednesday, August 22, 2012 12:32 PM
  • Hi Huntsj17, 

    Thanks for your post.

    Have you installed and configured the TFS 2012 RC Application Tier(Team Foundation Application Server) correctly?

    When you tried to configure the Team Foundation Build Service in Configuration Center, you occurred the register error?

    To manually install the TFS Build Service, you can double-click tfs intstallation software to reinstall the Build Service. For how to install and configure TFS 2012 RC Server and Build Service, please refer to this video: http://www.youtube.com/watch?v=m-Z5fMjgtAY.   


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, August 23, 2012 2:13 AM
    Moderator
  • We've been running TFS 2012 RC in production since it was released, after upgrading to TFS 2012 (RTM version) I cannot install the build server.

    Running the TFS installation does not install the build service. I assumed that the build service was installed when it was configured from the admin console and this does not work either.The build server is a separate server.


    Thursday, August 23, 2012 6:44 AM
  • Hi Huntsj,

    Thanks for your reply.

    Can you try to install the TFS Build Service on another client(not TFS Server machine)? Then register it with your current TFS 2012 RTM Collection.   


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, August 23, 2012 6:48 AM
    Moderator
  • It installs fine on my own PC and registers ok.

    I wonder if it is a problem with the windows firewall that is disabled on the 2008 R2 server that we use, it threw the same warning on the 2012 RC install but worked, this is the only thing I can think of.

    The log for that warning is

    [Info   @07:26:17.236] +-+-+-+-+-| Running Firewall: Verifying that the Windows Firewall is installed and configured |+-+-+-+-+-
    [Info   @07:26:17.236]
    [Info   @07:26:17.236] +-+-+-+-+-| Verifying that the Windows Firewall is installed and configured |+-+-+-+-+-
    [Info   @07:26:17.236] Starting Node: VFIREWALL
    [Info   @07:26:17.236] NodePath : VINPUTS/Progress/VFIREWALL
    [Error  @07:26:17.361] System.Runtime.InteropServices.COMException (0x800706D9): Creating an instance of the COM component with CLSID {304CE942-6E39-40D8-943A-B913C40C9CD4} from the IClassFactory failed due to the following error: 800706d9 There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9).
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Activator.CreateInstance(Type type)
       at Microsoft.TeamFoundation.Admin.Firewall..ctor(ITFLogger logger)
    [Error  @07:26:17.361] System.Runtime.InteropServices.COMException (0x800706D9): Creating an instance of the COM component with CLSID {304CE942-6E39-40D8-943A-B913C40C9CD4} from the IClassFactory failed due to the following error: 800706d9 There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9).
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Activator.CreateInstance(Type type)
       at Microsoft.TeamFoundation.Admin.Firewall..ctor(ITFLogger logger)
       at Microsoft.TeamFoundation.Admin.VerifyFirewallInstalled.Run(ActivityContext context)
       at Microsoft.TeamFoundation.Admin.Engine.AdminNode.RunNode()
       at Microsoft.TeamFoundation.Admin.Engine.AdminNode.Run(String& message, Boolean& continueOnError)
    [Error  @07:26:17.361] Unhandled message not defined for task VFIREWALL:Verifying that the Windows Firewall is installed and configured
    [Warning@07:26:17.361] TF400129: Error from readiness check: Verifying that the Windows Firewall is installed and configured
    [Info   @07:26:17.361] Completed Firewall: Warning
    [Info   @07:26:17.361] -----------------------------------------------------

    Thursday, August 23, 2012 7:29 AM
  • Using process of elimination, I can manually register the service using

    C:\>sc create TFSBuildServiceHost.2012 binPath= "C:\Program Files\Microsoft Team  Foundation Server 11.0\Tools\TFSBuildServiceHost.exe" DisplayName= "Visual Studio Team Foundation Build Service Host 2012" start= auto

    But the Build Configuration utility, tells you to delete the service before it starts configuration, that then registers the service ... and then fails

    Could it be port 9191 is being blocked ? Would this stop the build service being registered by the Configuration Utility ? If  2012 RC used the same port, then "no" as that worked fine.


    Thursday, August 23, 2012 8:19 AM
  • I've logged a support incident.
    Thursday, August 23, 2012 12:07 PM
  • Have you had any luck with this? I am running into the same situation. I upgraded from TFS 2012 RC to the RTM. I don't think 9191 is blocked by anything because this is the same configuration I had with the RC.

    Thanks,

    Andy

    Friday, August 24, 2012 2:52 PM
  • I raised an incident through my MSDN subscription and I've been dealing with MS support yesterday and today. I'm hoping to hear something back on Tuesday (when I'm back in the office)

    It's not a ports issue with us either and installing TFS 2012 build server on a Desktop PC works fine. It could be down to the fact that we have a group policy on the server that prohibts me changing the Windows Forewall on the server, but that didn't stop RC working.

    Hopefully I'll have a solution on Tuesday. I'll post the outcome.

    Cheers

    James

    Friday, August 24, 2012 3:00 PM
  • Hi James, 

    Thanks for your reply.

    We look forward to your updates.  


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Monday, August 27, 2012 2:38 AM
    Moderator
  • Thanks!
    Monday, August 27, 2012 11:56 AM
  • We also have the "TF400106: Failed to register the build service" with the message "Index (zero based) ...". After a week of tests and using the TFS 2012 RC as build Service (that works ;)), we found a way to use the TFS 2012 RTM build service.

    We started the Windows Firewall service.

    This service was deactivated during the windows installation, because our server is used only in the intranet. I don't understand why the build service now needs the firewall service, but it helps.
    Monday, August 27, 2012 3:32 PM
  • Thanks for your comment Axel

    I spoke to Microsoft Support and they suggested I try manually starting the service and it worked. Luckily I had admin rights on this box, but it goes against our group policy to have the Windows Firewall service running on an intranet server.

    I'll wait to see how Microsoft respond before marking this as resoved because if I didn't have admin rights I'd still be stuck with the service not registering.

    James.

    Tuesday, August 28, 2012 1:30 PM
  • Hi Huntsj, 

    Thanks for your reply.

    Which service you started manually, VS Team Foundation Build Service Host service?   

    If you have not the admin right on Build Service host, you should ask the Build Service host admin user to restart the service manually.  


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us


    Wednesday, August 29, 2012 9:14 AM
    Moderator
  • The Service was the Windows Firewall service, that is the one that's causing the issues.
    Wednesday, August 29, 2012 9:28 AM
  • It's an answer of sorts. The install has changed from 2012 RC as that did not require that the build service was running - it's obviously changed for RTM. The problem some people may find is that if they do not have the rights to start the Windows Firewall service.

    Hopefully a fix will be forthcoming to address the issue as I do not think that it should fail if the Windows Firewall service is not running. (I've since disabled it again)

    Wednesday, August 29, 2012 10:00 AM
  • Hi Huntsj, 

    Thanks for your reply.

    For this scenario, you can submit it to Microsoft Connect Feedback portal at: https://connect.microsoft.com/VisualStudio. Microsoft engineers will evaluate them seriously. 


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, August 29, 2012 10:04 AM
    Moderator
  • The registration process attempts to create a firewall exception for the build service. If this fails, the error should be logged, but not stop the registration. Unfortunately, a bug was introduced to the logging of the warning that threw an exception and stopped the registration.

    We have addressed the bug and it should be out with the next release of the product. The workaround is to start the Firewall service (as you have discovered).

    Thanks for bringing this to our attention.

    Jason

    Thursday, August 30, 2012 1:26 PM
  • By the way, this worked for me. However, I could not simply enable Windows Firewall before configuring the Build Service because I didn't have the correct exceptions in the Firewall. So I uninstalled TFS completely and then reinstalled it with Windows Firewall turned on. Then I successfully configured the Build Service. Once this was all done, I turned of Firewall.

    A bit of pain but it seems ok now. Thanks to all for the help.

    -Andy

    Friday, August 31, 2012 1:34 AM