SVN error: “Can't write to connection: An existing connection was forcibly closed by the remote host.”

不问归期 提交于 2020-01-03 16:01:51

问题


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.

回答1:


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)



回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/3167203/svn-error-cant-write-to-connection-an-existing-connection-was-forcibly-close

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!