[Twisted-Python] Help with BananaError

Iago Toral itoral at igalia.com
Thu Mar 13 14:24:49 EDT 2008

Hi all,

I'm working on the gnome build brigade (http://build.gnome.org/) using
Buildbot, which is a continuous integration tool based on Twisted.

I have several Twisted services (buildbot masters) running behind a
firewall (say ports 8001, 8002, mand 8003) and only one opened port for
external connections (say 9000). 

I'm writting a small Twisted tool to allow me to use these services
which port is not open directly for external connections through that
opened port to other external Twisted clients (buildbot slaves):


This tool has two parts, the client side (Mux) wraps the application
protocol by adding a header that identifies the client and also the
server it wants to connect. The server side (Demux) listens on the
opened port (9000) for incomming messages, extracts the client header
with information identifying the client and uses that information to
properly redirect the wrapped message to the appropriate internal port.

This tool works mostly ok, except that after some minutes working
properly redirecting several dozens of messages correctly, the Demux
breaks (on reception of a normal incoming message) with the following
error message:

  File "/home/master/devel/lib/python/twisted/spread/banana.py", line
176, in
    raise BananaError("Security precaution: List too long.")    

The messages do not exceed the maximum size defined in banana.py,
actually these messages are rather small, usually less than 1KB.

Does anyone know what that error message means and when it happens? What
might an application be doing wrong for that to happen?

Attached is the code of this tool, both the Mux and the Demux, it is a
very small file (~100 lines of code). Also, take into account that this
was written as a protoype and it is my first TWisted program so it might
be very badly designed.

Thanks in advance for any feedback you can give!!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tunnel.py
Type: text/x-python
Size: 4021 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20080313/612ceb77/attachment.py 

More information about the Twisted-Python mailing list