[Twisted-Python] Dealing with an intermittent PB server

Phil Mayers p.mayers at imperial.ac.uk
Thu Feb 17 18:24:19 EST 2005


On Thu, Feb 17, 2005 at 11:31:24AM -0800, Dave Cook wrote:
>On Thu, 17 Feb 2005 01:05:22 +0000, Phil Mayers <p.mayers at imperial.ac.uk> wrote:
>>     try:
>>       self.root.callRemote('start').addCallbacks(self.start2, self.err)
>
>I never get this far.  In my code:
>
>    def data_tableList(self, ctx, data):
>        ...
>        d = self.pbClientFactory.login(creds).addCallbacks(self._cbLogin,
>self._ebLogin)
>        return d
> 
>Neither _cbLogin or _ebLogin ever get called, so there's no possiblity
>of the DeadReferenceError getting called.  I guess this could be a

That's odd. Even if Nevow discarded the deferred (not sure - I don't use 
it in data/render mode, my app is 100% livepage!) the callback/errback 
should still get called by the reactor.

If I call "start" in my example with the server down, I get a Failure to 
errback with "errno 111 connection refused" (I see it in the LivePage, 
via my "alert" function)

Is there any possibility there's a firewall between the Nevow middle and 
PB backend that's making TCP RST or ICMPs not work?

>Nevow bug (I hate bugging people if it's just my misunderstanding)?  I
>think what I'll do is keep a reference to the original SSLClient
>object and check client.running before I try factory.login().

Wait, SSL? Hmm. Have you tried running over straight TCP just to see if 
there's a difference (I'm thinking error handling propagation etc. given 
the layered nature of SSL and comments seen on this list to the effect 
of the Twisted SSL implementation complexity)





More information about the Twisted-Python mailing list