5
votes

When attempting to commit changes to SVN, I receive the following error:

Error: Commit failed (details follow):
Error: While preparing 'C:\Users\dan\Documents\Visual Studio
Error: 2008\Websites\admin\trunk\bin\SmtpDotNet.dll' for commit
Error: Can't write to connection: An existing connection was forcibly closed by the
Error: remote host.

I am running TortoiseSVN 1.6.9 and Subversion 1.6.12, the latest and greatest. Here are the facts uncovered so far:

  • It makes no difference how many files I attempt to commit, or which files
  • I can commit changes from other projects to the same server
  • Other people can commit changes to this project from their working copies
  • I tried checking out a new working copy, but I get the same error.
4
You should check the Apache server log files (error.log and access.log), it should give everyone a little more insight on what could be causing the error.Garo Yeriazarian
I'm running svnserve. As far as I know, svnserve does not have logging capability.dansays
The --verbose option to svnserve could give you interesting hintsjdehaan
The repository, and svnserve, are running on a Windows server. There doesn't appear to be a --verbose option. I did, however, stop the service and run svnserve via the command line (svnserve --listen-once --foreground --root d:\svnrepo) but it provided no diagnostic information.dansays
Too bad, that is sad... That's something that should be improved by the svn team.jdehaan

4 Answers

4
votes

The message means the server really means to close the connection: it is intended. The most common issue are the access rights to the directory in the repository when this message appears.

I would urge to check the auth and svnserve.conf files on server side.

Alternative ideas:

  1. Clear the tortoiseSVN cached data and try again: TortoiseSVN -> Settings -> Saved Data
  2. Disable your firewall and try again. (should not be the issue as you mentionned it worked for other projects to the same server)
  3. Try using the command line client to see if it is maybe some bug (special character in path, mismatching casing or some other silly situation that makes the client or server fail)
1
votes

I'm a few years late to the party but in our company we had this problem last week.

The source of it was one user using TortoiseSVN 1.8 while another used 1.9. The user with TortoiseSVN 1.8 couldn't commit anymore. Upgrading to 1.9 fixed the problem.

0
votes

Even though the error message tells you that the "connection was forcibly closed by the remote host", I doubt that the server closed the connection. The svn client only knows that the connection was closed while it tried to write data to it - who or what closed the connection isn't really known.

The file you try to commit is a binary file, and from it's name I gather it has code to do mail stuff in it. That's something that many virus scanners recognize as malicious. Which means it most likely is your virus scanner that's closing the connection, not the server itself. To make sure, you could check the server error logs - if there's nothing in there relating to your commit, then it wasn't the server that closed the connection.

Try disabling your virus scanner for the commit.

0
votes

Just try to commit project files partially instead of committing all of them at a step. If there is still a problem with a folder, commit partial folder and files inside this folder. If there is a problem with a file after committing only this file, update this file and then retry commit. I fixed the the problem by applying these methods.