无法使用errbot连接到Hipchat?获得socket的权限被拒绝。

时间:2017-09-25 05:18:52

标签: bots hipchat errbot

连接错误机器人与自托管。在执行此操作时出现此错误 -

10:40:34 DEBUG    sleekxmpp.xmlstream.xmlst RECV: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
10:40:34 DEBUG    sleekxmpp.features.featur Starting TLS
10:40:34 INFO     sleekxmpp.xmlstream.xmlst Negotiating TLS
10:40:34 INFO     sleekxmpp.xmlstream.xmlst Using SSL version: TLSv1
10:40:34 DEBUG    sleekxmpp.xmlstream.xmlst Event triggered: socket_error
10:40:34 ERROR    sleekxmpp.xmlstream.xmlst **Socket Error #13: Permission denied**
10:40:34 DEBUG    sleekxmpp.xmlstream.xmlst reconnecting...

这是我正在使用的配置。

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

BOT_DATA_DIR = r'/Users/XXX/errbot/errbot/data'
BOT_EXTRA_PLUGIN_DIR = '/Users/XXXX/errbot/errbot/plugins'

BOT_LOG_FILE = r'/Users/XXXX/errbot/errbot/errbot.log'
BOT_LOG_LEVEL = logging.DEBUG

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

# The identity, or credentials, used to connect to a server
BOT_IDENTITY = {
    'username': 'XXXX',  # The JID of the user you have created for the bot
    'password': 'XXXXX',       # The corresponding password for this user
    'token': 'XXXXXX',
    'endpoint' : 'https://xxxx.xxxx.com',
}

有人可以让我知道我在上面的配置中做错了吗?

或者还请建议任何其他与自托管Hipchat一起使用的机器人(在python中)。

1 个答案:

答案 0 :(得分:0)

Hipchat服务器删除了对2.0.7版本上XMPP端口的外部访问,支持仅通过端口443进行通信(使用XMPP&#39; BOSH协议)。

根据您的服务器版本,您可以通过运行hipchat network --enable-xmpp-ports来启用它们。

https://confluence.atlassian.com/hipchatkb/external-xmpp-ports-5222-5223-disabled-by-default-in-hipchat-server-2-0-7-859442760.html有关于此主题的更多信息。