qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Zerola <michal.zer...@gmail.com>
Subject Re: Client applications in Python with SSL & EXTERNAL
Date Wed, 16 May 2012 15:01:51 GMT

we are encountering problems when using the ssl transport layer in Python
clients. When the client is sending messages in burst to the broker in
asynchronous manner (sync=False in Sender.send) the exception is
occasionally thrown with the following output:

[Errno 1] _ssl.c:1217: error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad
write retry

It seems, like the client's socket gets full, so the next underlying
SSLSocket.write() throws the SSLError (with SSL_ERROR_WANT_WRITE as a code)
but this situation is not handled properly. One can see, that in
qpid/messaging/transports.py in the constructor of the SSL transport the
socket is set to NON BLOCKING. Such a non blocking socket then behaves that
write() doesn't wait till there is enough space on the socket and may throw
the above exception. The question is therefore:

* Why is SSLSocket set to NON BLOCKING state in contrast to the non SSL
* Is handling of the above SSL_ERROR_WANT_{WRITE,READ} errors implemented
properly in the Python's API?

I have added this question also to the 
https://issues.apache.org/jira/browse/QPID-3175 Issue QPID-3175 

Thanks for answers. Best,


View this message in context: http://qpid.2158936.n2.nabble.com/Client-applications-in-Python-with-SSL-EXTERNAL-tp6158151p7561983.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

View raw message