java.io.IOException: An existing connection was forcibly closed by the remote host
Environment:
==========
I have
- Teamcity Professional 10.0.1 running on Windows 2012 R2.
- 2 build agents running on a separate Windows 2012 R2 (i.e. agent1 and agent2 running on same VM VMAgent1)
- source control is Subversion1.6.6 (r40053).
- applications are all Microsoft DotNet.
This is running fine.
Problem
======
I added a third agent (agent3) on a separate VM (VMAgent2)
The agent successfully builds most of the time.
Occasionally, it fails with the log output as below.
[08:07:51][Updating sources] Failed to build patch for build #57091 {build id=7789, buildTypeId=CodeBuild_Latest720}, VCS root: "Dev_7.2.0" {instance id=167, parent internal id=57, parent id=CodeBuild_Dev720, description: "svn: https://mysubversion.com/branches/a_branch"}, due to error: Error while transferring cached patch
[08:07:52][Updating sources] Failed to build patch for build #57091 {build id=7789, buildTypeId=CodeBuild_Latest720}, due to error: java.io.IOException: An existing connection was forcibly closed by the remote host.
[15:01:01][Updating sources] Build canceled
The build continues for a long time. I have to terminate it.
After termination, it lost connection with TeamCity server. TeamCity server was not able to see the agent anymore. After I restart the Teamcity agent service on the agent machine, TeamCity server is able to see it again and everything back to normal.
Help
===
Does anyone encounter something similar?
Any suggestion on what I can do to resolve the problem?
Please sign in to leave a comment.
Hi John,
how do you have the checkout configured? Server side or agent side?
Do you refer to build configuration setting? I have the same set of build configurations before I added the new build agent. They are all set to "prefer checkout files to agent".
All these build configurations are able to be built by build agent agent1 and agent2. They do occasionally have problem getting source from subversion but never lost connection with Teamcity server.
On agent3, when it fails to retrieve the source and it lost connection with the Teamcity server.
Hi John,
sorry for the delay. If it's doing agent side checkout (you can check in the build log whether this is the case), then it's possible that the problem in the connection is actually with the subversion server. That's probably why this specific agent fails while the others don't. At the same time, this would also imply that there is an issue with the connectivity between this agent's machine and the server. Maybe a third party software is colliding at some point with the task, which leads to the issue?
Hi Denis,
Thanks. Agent1 and Agent2 also fail at times to get source from Subversion. However, they do not lose connection with Teamcity server after that. Agent3 lost connection after it fails to get source from Subversion.
I can live with failure to get source and build timeout and fails. I have the problem with losing an agent after this.
Hi John,
Ah sorry, due to the log lines you copied I missed the point you had made. This is hard to debug though, could you please send us the teamcity-agent.log and teamcity-server.log files? Please ensure that they cover the timeframe where one of the disconnections happened, I would like to check whether any issue was logged there.
To send them to us, please use the submit a request button on top of the page, it will allow you to send us files privately. For any further question, please don't hesitate to ask.
A corresponding issue has been created in TeamCity Youtrack: https://youtrack.jetbrains.com/issue/TW-52166