I was working on python xmpp library (XMPPPy) with Openfire. It could connect, send message and recieve message. But the problem is the xmpppy client will get following exception after every 5 or 6 minutes:
DEBUG: socket error Socket error while receiving data
Traceback (most recent call last):
File “/root/workspace/MyTest/src/xmpp/transports.py”, line 146, in receive
try: received = self._recv(BUFLEN)
sslerror: (6, ‘TLS/SSL connection has been closed’)
DEBUG: client stop Disconnect detected
DEBUG: socket error Socket operation failed
DEBUG: socket error Socket error while receiving data
The only recommend I got is use another xmpp server instead of Openfire. I am just wondering this is the xmpppy problem or Openfire? Is there any way can make them work together?
not sure this will help, but I believe the code may have to send an ‘available’ status message every so often…some code I have running sends an ‘available’ presence packet every minute or so…seems to run ok 24x7. I think the version of xmpppy I’m using is 0.4.0.
at the risk of exposing my poor code to ridicule…here’s the code I’m using to take messages from an mq series queue (message is an email message) and post it to a chat room on my local OpenFire server…we use internally for application notifications, etc. The mainloop is in the gchat class…I found that in order for the bot not to be disconnected, it had to send ‘Available’ presence messages every so often…so I put a counter in to do that nominally every 60 iterations of the ‘StepOn’ code.