errbotio / errbot

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
http://errbot.io
GNU General Public License v3.0
3.13k stars 616 forks source link

Constant disconnect/reconnect from HipChat #154

Closed dekked closed 11 years ago

dekked commented 11 years ago

This is probably because of sleekxmpp, but I am reporting here first to see if I am the only one experiencing these issues.

Every two minutes or so, my bot disconnects from HipChat only to enter again in the following seconds.

Log goes like this:

INFO:sleekxmpp.xmlstream.xmlstream:Waiting for </stream:stream> from server
INFO:root:Disconnect callback, deactivating all the plugins.
INFO:sleekxmpp.xmlstream.xmlstream:Negotiating TLS
INFO:sleekxmpp.xmlstream.xmlstream:Using SSL version: 3
INFO:sleekxmpp.features.feature_bind.bind:Node set to: X@chat.hipchat.com/none
INFO:sleekxmpp.xmlstream.xmlstream:CERT: Time until certificate expiration: 956 days, 8:01:13.027233

Any idea what's wrong? I am using 2.0.0-beta version of err under Python 2.7 with sleekxmpp 1.1.11.

Thanks!

zoni commented 11 years ago

I had the same issue. I didn't really dive in deeply yet to see if it's a bug in sleekxmpp, but I did create a workaround: https://github.com/zoni/err-agressive-keepalive

dekked commented 11 years ago

This does it it seems, thanks! :)

Although I had to be careful, I was getting this error:

AttributeError: 'str' object has no attribute 'getStripped'

In base.py. I fixed it by making username a unicode in the config.py file, which it was not in the default template (remember I am using Python 2).