[Twisted-Python] Perspective Broker and [WINSOCK] Connection reset by peer

Justin Johnson justinjohnson at fastmail.fm
Fri Apr 2 10:10:32 EST 2004

I'm trying to track down a problem and I'm not sure if Twisted is
involved or not.  Here are the details.

I administer Rational ClearCase.  One task I do is removing repositories
(a repository is called a VOB in ClearCase).  If I am logged onto the
machine locally I run the command "cleartool rmvob -f C:\VOBs\myvob.vbs".
 ClearCase uses RPC calls in some manner unknown to me for most of its
operations (probably with this command too).  So when I run the command,
some RPC interaction probably takes place and then the VOB is removed. 
The command is being run on the server where the VOB exists, but I
believe it still uses RPC, even if everything is local.

I have been using Twisted, specifically PB, to help me administer these
servers.  The PB service has a method remote_rmvob that can be called
remotely to remove a VOB.  Sometimes this works, but other times I get
the following error:

[WINSOCK] Connection reset by peer
cleartool: Error: Versioned object base "C:\VOBS\myvob.vbs" not deleted.
cleartool: Error: Trouble removing versioned object base

If I retry the PB operation again and again, eventually it succeeds.  On
some servers it takes more retries than others to get a successful
removal, but eventually it succeeds.  If I run the command locally with
no PB/Twisted involved I never get this error.

So I've been doing some research on this WINSOCK error, trying to
determine if it is being caused by the fact that I'm running the command
via PB.

The site http://frontier.userland.com/discuss/msgReader$173 has the
following info:


WSAECONNRESET -- Connection reset by peer. This occurs when an
established connection is shut down for some reason by the remote

The following thread discusses a similar problem with rsync where the
connection wasn't shutdown gracefully and a similar error occurred.


Does anyone with more networking knowledge than me have any ideas on what
might be causing this problem?  All I have is fuzzy ideas in my head,
like the command running in a ProcessProtocol might cause some problems,
or PB closing the connection before some important thing happens, ...  As
you can see, it is very fuzzy for me.  :-(

Any help you can provide is appreciated.

More information about the Twisted-Python mailing list