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

Errbot unable to read from XML stream #1257

Closed thakral729 closed 6 years ago

thakral729 commented 6 years ago

In order to let us help you better, please fill out the following fields as best you can:

I am...

I am running...

Issue description

I have an error integrating errbot with our enterprise hipchat server, trying to implement chatbot for our DevOps team.

Steps to reproduce

Here's the config.py 

import logging

# This is a minimal configuration to get you started with the Text mode.
# If you want to connect Errbot to chat services, checkout
# the options in the more complete config-template.py from here:
# https://raw.githubusercontent.com/errbotio/errbot/master/errbot/config-template.py

#BACKEND = 'Text'  # Errbot will start in text mode (console only mode) and will answer commands from there.
BACKEND = 'Hipchat'  # Errbot will start in text mode (console only mode) and will answer commands from there.

BOT_DATA_DIR = r'/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot-root/data'
BOT_EXTRA_PLUGIN_DIR = r'/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot-root/plugins'

BOT_LOG_FILE = r'/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot-root/errbot.log'
BOT_LOG_LEVEL = logging.DEBUG

#BOT_ADMINS = ('@CHANGE_ME', )  # !! Don't leave that to "@CHANGE_ME" if you connect your errbot to a chat system !!

BOT_ADMINS = ('1_970@chat.btf.hipchat.com',)

BOT_IDENTITY = {
    'username': '1_15114@chat.btf.hipchat.com',
    'password': ***password***,
    'token': *****token*****,
    'server': ('ichat.xyz.com',  443)   #enterprise hipchat server we are using
}

CHATROOM_FN = ('ankittestroom',)
CHATROOM_PRESENCE = ('1_ankittestroom',)

Here's the entire trace while starting errbot

(``` errbot_ve) da0801a-dhcp130:errbot-root athakral$ errbot 18:36:49 INFO errbot.specific_plugin_ma storage search paths {'/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/storage'} 18:36:49 INFO errbot.specific_plugin_ma Found those plugings available: 18:36:49 INFO errbot.specific_plugin_ma Memory (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/storage/memory.py) 18:36:49 INFO errbot.specific_plugin_ma Shelf (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/storage/shelf.py) 18:36:49 INFO errbot.bootstrap Found Storage plugin: 'Shelf' Description: This is the storage plugin for the traditional shelf store for errbot. 18:36:49 DEBUG errbot.specific_plugin_ma Refilter the plugins... 18:36:49 DEBUG errbot.specific_plugin_ma Load the one remaining... 18:36:49 DEBUG errbot.specific_plugin_ma Class to load ShelfStoragePlugin 18:36:49 DEBUG errbot.storage Opening storage 'repomgr' 18:36:49 DEBUG errbot.storage.shelf Open shelf storage /Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot-root/data/repomgr.db 18:36:49 DEBUG errbot.storage Opening storage 'core' 18:36:49 DEBUG errbot.storage.shelf Open shelf storage /Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot-root/data/core.db 18:36:49 INFO errbot.specific_plugin_ma backends search paths {'/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/backends'} 18:36:49 INFO errbot.specific_plugin_ma Found those plugings available: 18:36:49 INFO errbot.specific_plugin_ma Test (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/backends/test.py) 18:36:49 INFO errbot.specific_plugin_ma Graphic (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/backends/graphic.py) 18:36:49 INFO errbot.specific_plugin_ma XMPP (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/backends/xmpp.py) 18:36:49 INFO errbot.specific_plugin_ma Telegram (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/backends/telegram_messenger.py) 18:36:49 INFO errbot.specific_plugin_ma IRC (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/backends/irc.py) 18:36:49 INFO errbot.specific_plugin_ma Text (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/backends/text.py) 18:36:49 INFO errbot.specific_plugin_ma Slack (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/backends/slack.py) 18:36:49 INFO errbot.specific_plugin_ma Null (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/backends/null.py) 18:36:49 INFO errbot.specific_plugin_ma Hipchat (/Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/backends/hipchat.py) 18:36:49 INFO errbot.bootstrap Found Backend plugin: 'Hipchat' Description: This is the hipchat backend for Err. 18:36:49 DEBUG errbot.specific_plugin_ma Refilter the plugins... 18:36:49 DEBUG errbot.specific_plugin_ma Load the one remaining... 18:36:49 DEBUG errbot.specific_plugin_ma Class to load HipchatBackend 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.smart_strong". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.smart_strong.SmartEmphasisExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.fenced_code". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.fenced_code.FencedCodeExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.footnotes". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.footnotes.FootnoteExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.attr_list". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.attr_list.AttrListExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.def_list". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.def_list.DefListExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.tables". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.tables.TableExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.abbr". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.abbr.AbbrExtension". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.extra.ExtraExtension". 18:36:49 DEBUG errbot.backends.hipchat Will apply those treeprocessors: {'footnote': <markdown.extensions.footnotes.FootnoteTreeprocessor object at 0x1109869b0>, 'hipchat stripper': <yapsy_loaded_plugin_Hipchat_0.HipchatTreeprocessor object at 0x110924208>, 'inline': <markdown.treeprocessors.InlineProcessor object at 0x1109241d0>, 'prettify': <markdown.treeprocessors.PrettifyTreeprocessor object at 0x110924048>, 'attr_list': <markdown.extensions.attr_list.AttrListTreeprocessor object at 0x110986748>} 18:36:49 DEBUG MARKDOWN Successfully loaded extension "yapsy_loaded_plugin_Hipchat_0.HipchatExtension". 18:36:49 DEBUG errbot.core ErrBot init. 18:36:49 DEBUG errbot.backends.base Backend init. 18:36:49 DEBUG errbot.core created a thread pool of size 10. 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: RFC 6120: Stream Feature: STARTTLS 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: RFC 6120: Stream Feature: Resource Binding 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: RFC 3920: Stream Feature: Start Session 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: RFC 6121: Stream Feature: Roster Versioning 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: RFC 6121: Stream Feature: Subscription Pre-Approval 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: RFC 6120: Stream Feature: SASL 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: XEP-0030: Service Discovery 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: XEP-0004: Data Forms 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: XEP-0045: Multi-User Chat 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: XEP-0199: XMPP Ping 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: XEP-0203: Delayed Delivery 18:36:49 DEBUG sleekxmpp.plugins.base Loaded Plugin: XEP-0249: Direct MUC Invitations 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.smart_strong". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.smart_strong.SmartEmphasisExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.fenced_code". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.fenced_code.FencedCodeExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.footnotes". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.footnotes.FootnoteExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.attr_list". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.attr_list.AttrListExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.def_list". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.def_list.DefListExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.tables". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.tables.TableExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.abbr". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.abbr.AbbrExtension". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.extra.ExtraExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.smart_strong". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.smart_strong.SmartEmphasisExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.fenced_code". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.fenced_code.FencedCodeExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.footnotes". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.footnotes.FootnoteExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.attr_list". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.attr_list.AttrListExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.def_list". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.def_list.DefListExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.tables". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.tables.TableExtension". 18:36:49 DEBUG MARKDOWN Successfuly imported extension module "markdown.extensions.abbr". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.abbr.AbbrExtension". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "markdown.extensions.extra.ExtraExtension". 18:36:49 DEBUG MARKDOWN Successfully loaded extension "errbot.rendering.ansiext.AnsiExtension". 18:36:49 DEBUG errbot.core Initializing backend storage 18:36:49 DEBUG errbot.storage Opening storage 'hipchat_backend' 18:36:49 DEBUG errbot.storage.shelf Open shelf storage /Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot-root/data/hipchat_backend.db 18:36:49 DEBUG errbot.plugin_manager All plugin roots: 18:36:49 DEBUG errbot.plugin_manager -> /Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot-root/plugins/err-example 18:36:49 DEBUG errbot.plugin_manager Add /Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot-root/plugins/err-example to sys.path 18:36:49 DEBUG errbot.plugin_manager -> /Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/core_plugins 18:36:49 DEBUG errbot.plugin_manager Add /Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/core_plugins to sys.path 18:36:49 DEBUG errbot.plugin_manager /Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot-root/plugins/err-example has no requirements.txt file 18:36:49 DEBUG errbot.plugin_manager /Users/athakral/Documents/workspace/Blob-Bot/Err-bot/errbot_ve/lib/python3.6/site-packages/errbot/core_plugins has no requirements.txt file 18:36:49 DEBUG errbot.plugins.Example Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.ACLs Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.Flows Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.CommandNot Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.Health Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.Backup Logger for plugin initialized... 18:36:49 INFO errbot webhooks: Flag to bind /echo to echo 18:36:49 DEBUG errbot.plugins.Webserver Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.TextCmds Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.VersionChe Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.Plugins Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.Help Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.ChatRoom Logger for plugin initialized... 18:36:49 DEBUG errbot.plugins.Utils Logger for plugin initialized... 18:36:49 DEBUG errbot.bootstrap Start serving commands from the hipchat backend 18:36:49 DEBUG sleekxmpp.xmlstream.xmlst Waiting 2.012210114508182 seconds before connecting. 18:36:52 DEBUG sleekxmpp.xmlstream.resol DNS: Querying for AAAA records. 18:36:52 DEBUG sleekxmpp.xmlstream.resol DNS: No AAAA records for 18:36:52 DEBUG sleekxmpp.xmlstream.resol DNS: Querying for A records. 18:36:52 DEBUG sleekxmpp.xmlstream.xmlst Connecting to :443 18:36:52 DEBUG sleekxmpp.xmlstream.xmlst Event triggered: connected 18:36:52 DEBUG sleekxmpp.thirdparty.stat ==== TRANSITION disconnected -> connected 18:36:52 DEBUG sleekxmpp.xmlstream.xmlst Starting HANDLER THREAD 18:36:52 DEBUG sleekxmpp.xmlstream.xmlst Loading event runner 18:36:52 DEBUG sleekxmpp.xmlstream.xmlst SEND (IMMED): 18:36:52 ERROR sleekxmpp.xmlstream.xmlst Error reading from XML stream. 18:36:52 DEBUG sleekxmpp.xmlstream.xmlst reconnecting... 18:36:52 DEBUG sleekxmpp.xmlstream.xmlst Event triggered: session_end 18:36:52 DEBUG sleekxmpp.xmlstream.xmlst SEND (IMMED): </stream:stream> 18:36:52 INFO sleekxmpp.xmlstream.xmlst Waiting for </stream:stream> from server

### Additional info

Here's the list of dependancies : 

(errbot_ve) da0801a-dhcp130:errbot-root athakral$ pip list Package Version


ansi 0.1.3 asn1crypto 0.24.0 atomicwrites 1.2.1 attrs 18.2.0 beautifulsoup4 4.6.3 bottle 0.12.13 certifi 2018.8.24 cffi 1.11.5 chardet 3.0.4 colorlog 3.1.4 cryptography 2.3.1 daemonize 2.4.7 dnspython 1.15.0 dnspython3 1.15.0 errbot 5.2.0 hypchat 0.21 idna 2.7 Jinja2 2.10 Markdown 2.6.7 MarkupSafe 1.0 more-itertools 4.3.0 pip 18.1 pluggy 0.7.1 py 1.6.0 pyasn1 0.3.7 pyasn1-modules 0.1.5 pycparser 2.19 Pygments 2.2.0 pygments-markdown-lexer 0.1.0.dev39 pyOpenSSL 18.0.0 pytest 3.8.2 python-dateutil 2.7.3 requests 2.19.1 rocket-errbot 1.2.5 setuptools 40.4.3 six 1.11.0 sleekxmpp 1.3.2 urllib3 1.23 waitress 1.1.0 WebOb 1.8.2 WebTest 2.0.32 wheel 0.32.1 Yapsy 1.12.0


If you have any more information, please specify it here.
thakral729 commented 6 years ago

Could someone help me with this one....or am i doing something wrong with config ..since the hipchat server is ichat.xyz.com & JID's are @chat.btf.hipchat.com

thakral729 commented 6 years ago

this is resolved after correcting the port to 5222 ..443 is for UI access.