[Twisted-Python] I'm missing something on SSL-encrypted PB connections...

Mike C. Fletcher mcfletch at rogers.com
Tue Dec 20 13:25:10 EST 2005

Hi all,

I'm working on refining a load-sharing mechanism to run across a number 
of pb connections (sharing processor time and/or access to a network).  
One of the requirements I have is that I must be able to run the pb 
connections over encrypted channels.  However, when I try to set up an 
SSL-encrypted server (using the same mechanisms I've used for setting up 
SSL-encrypted Nevow sites and the same ones in the echo examples) I 
always get a connection refused error on the client when I try to connect.

I'm using self-generated keys from:

    openssl genrsa > privkey.pem
    openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1000

I'm guessing this has to be some incredibly stupid error, but I'm not 
seeing it in a few hours of poking now, so this is basically a request 
for more eyes.  I've reduced the failing code down to a modification of 
the pbecho* example code (attached).  With keys generated as above in 
the current directory the server starts fine, but the client always 

    Failure: twisted.internet.error.ConnectionRefusedError: Connection
    was refused by other side: 111: Connection refused.

when it tries to connect.

The only other code I've found trying to use SSL + PB is connecting it 
up to a multi-service of some sort, which I don't *think* should be 

Thoughts appreciated,

  Mike C. Fletcher
  Designer, VR Plumber, Coder

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pbecho_ssl.py
Type: text/x-python
Size: 1416 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20051220/ae2f7f54/attachment.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pbechoclient_ssl.py
Type: text/x-python
Size: 856 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20051220/ae2f7f54/attachment-0001.py 

More information about the Twisted-Python mailing list