0

I am getting an error as mentioned below, when triggering the build from TFS to deploy through Release Management aka In Release.

*ERROR *

The account running the TFS build service (TFSBuildServices) needs to be added as a system user in the Release Management Server.
    at Microsoft.TeamFoundation.Release.Workflow.Services.ReleaseWorkflowService.InitiateFromBuild(String teamFoundationServerUrl, String teamProject, String buildDefinition, String buildNumber, String targetStageName)
    at Microsoft.TeamFoundation.Release.Build.Program.Release()
    at Microsoft.TeamFoundation.Release.Build.Program.Main()**

The Template which i m using is ReleaseDefaultTemplate.11.1.xaml

Any help would be much appreciated.

Thanks!!

--Update--

Below is the log Generated on Build Server under

"C:\Users\TFSBuildServices\AppData\Local\Temp\Microsoft\ReleaseManagement\12.0\Logs\ReleaseManagementBuild.log"

1/7/2014 3:04:14 PM - Error - Error loading profile for current user: ***\tfsbuildservices

1/7/2014 3:04:14 PM - Error - Unable to connect to the remote server: \r\n\r\n   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.TeamFoundation.Release.Data.ConfigurationServiceRef.ConfigurationService.GetUserByUserName(String userName)
   at Microsoft.TeamFoundation.Release.Data.Model.CurrentUser.get_Profile()

   1/7/2014 3:04:14 PM - Error - No connection could be made because the target machine actively refused it 127.0.0.1:29622: \r\n\r\n   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)

@Update With Solution

Thanks everyone for your help to troubleshoot this issue.

The proxy in Buildserver was the culprit. And this was enable for the service account tfsbuildservices. Due to which it was always hitting the wrong RM server(local address with wrong port).

After disabling the Proxy in Build server for account tfsbuildservices, it’s started working as expected. Thanks!!

Mohammed Jawed
  • 407
  • 3
  • 12
  • 1
    Is the Release Management server in the same domain as the TFS server, or is it in a different domain? – Daniel Mann Jan 05 '14 at 05:19
  • Hi Daniel: Both are in the same domain. – Mohammed Jawed Jan 05 '14 at 20:38
  • Per your update, this is the problem: `No connection could be made because the target machine actively refused it 127.0.0.1:29622`. Are you sure that port 29622 is open in the Windows firewall? – Daniel Mann Jan 08 '14 at 19:56
  • 2
    Hey Dan, we saw it at the same time! Port needs to be open (which the installer should have done if using Windows Firewall), but also the address should not point to localhost, but to the RM Server. – joerage Jan 08 '14 at 19:59
  • I didn't even notice that it was pointing to localhost. Silly me. – Daniel Mann Jan 08 '14 at 20:01
  • i agree with you. But the problem is when I login to Build Server and ran the ReleaseManagementBuild.exe using my acocunt by passing same arguments as through TFS build , its working fine.. its hitting the correct RM server.. In other hand it’s giving issue with tfsbuildservices account only. – Mohammed Jawed Jan 09 '14 at 09:56

1 Answers1

5

In the Release Management client, add a new user matching the account TFSBuildServices. Set the 'Is Service User?' field to Yes.

UPDATE

Based on the additional log you have added, the problem seems to be related to the configuration of your RM client installed on your Build Server box.

Open the client installed on the Build Server box and you should get a popup to configure the URL pointing to the RM Server. Once you are able to open the client, try triggering a new build.

joerage
  • 4,863
  • 4
  • 38
  • 48
  • :I tried that also but still getting same error..even i added TFSBuildServices to local admin in Release server..but same error..even i have re-started my release server..unfortunately no luck.. – Mohammed Jawed Jan 04 '14 at 10:49
  • under Manage Users Tab we have "Is a Service User?" option and which already i Marked as "Yes". No where i can find an option 'Is System User'.. – Mohammed Jawed Jan 06 '14 at 10:25
  • Joerage, Thanks!! I configured the correct RM details just after installation of Client in Build server. And I performed successful deployment through Client UI....and tested the same through running ReleaseManagementBuild.exe by passing arguments (ReleaseManagementBuild.exe -tfs "https://tfs:8443/Default" -tp "WebPortal Scrum" -bd "WebPortal Integration Dev" -bn " WebPortal Integration Dev_1.0.0.25" -ts "" -nologo}) and its working fine. But above issue start appearing as soon as I’m using tfsbuildservices account or trigger deployment through TFS. – Mohammed Jawed Jan 09 '14 at 10:27
  • Finally we are able to make it work..after disabling the proxy for the account tfsbuildservice... thanks to all of you for your help and support.. thanks!! – Mohammed Jawed Jan 09 '14 at 11:53
  • Thank you!! The error said to add as a system user to the Release Management Server. So I added it as a user on the Release Management server. Adding it in the Release Management Client worked and was the last problem I needed to solve! Finally got a deployment triggered from a build! woohoo!! thank you! – Shane Fowler Nov 04 '14 at 23:36
  • Opening the client in my server and connecting to the server solved my issue. Quite buggy for me. :) – Fabito Jan 26 '15 at 18:33