1
votes

i try to set up a new TFS Build agent (TFS 2015, Build "vNext"). I get a strange error when a build is triggered.

Following setup:

  • TFS 2015 Server hosted on a machine in the intenet
  • TFS 2015 Build Agent on a machine in our company network behind a VPN
  • set up Build Agent and registered on TFS Server

The Agent is showing up in TFS-Webaccess and it is marked as online (green), so i guess the connection is set up correctly. Agent green

Now, when a build is triggered it looks like the agent starts the work, but after some time an entry is written to the log:

Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: TF246017: Team Foundation Server could not connect to the database. Verify that the server that is hosting the database is operational, and that network problems are not blocking communication with the server.

With Webaccess no problems, working perfectly. Any ideas on this?

UPDATE I tried to connect an build agent from another Internetserver. There i get another error when agent tries to run a build:

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8080

My TFS-Server is accessed via https://tfs.xxx.yy/tfs.

2

2 Answers

2
votes

I think I finally found the solution. It had to do with DNS and the config of the TFS-Online-Server. I am now able to build a little test project.

@Patrick-MSFT: Thank you very much for your support!

0
votes

To narrow the isuue, can you verify below information:

  • The database is running and receiving IP connections
  • Your account has permissions to access the DB instance
  • That there are no firewall rules between the AT and DT server that would block the SQL ports
  • Your account has permissions to connect to the Team Foundation Administration Console (If not, ask Administrator to add you in the list of Administration Console Users)

Most possiblity related to the account permissions. Otherwise, you'll need to go through the system and SQL logs looking for the connection attempt and rejection reason.