hipchat / hubot-hipchat

HipChat adapter for GitHub's Hubot
https://www.hipchat.com/help/page/bots
MIT License
666 stars 252 forks source link

Hubot disconnecting and doesn't reconnect. Process still running. #284

Open ghvillasboas opened 7 years ago

ghvillasboas commented 7 years ago

I'm having a very frustrating time deploying this adapter on HipChat Server, both on a Heroku like solution and a dedicated CentOS instance. In both cases the bot disconnects after around 1-2 hours and never reconnects. No log output. Processes is still active. I've seen other similar issues here with the same effect. Any workaround? Thanks.

paulomsg commented 7 years ago

I'm getting a similar issue here. Hubot will disconnect for an unknown reason and not reconnect anymore.

>> Lot's of DEBUG OUT while idle
[Fri Apr 07 2017 16:30:48 GMT+0000 (UTC)] DEBUG OUT > <r/>
[Fri Apr 07 2017 16:30:48 GMT+0000 (UTC)] DEBUG Disconnecting here
[Fri Apr 07 2017 16:30:48 GMT+0000 (UTC)] INFO Connection went offline
>> The last 2 messages keep repeating forever.

Is there a way to generate more debug info so I can find out why it is disconnecting? Also, do I need to configure something in order for it to reconnect?

thanks

plutoid commented 7 years ago

you may try: export HUBOT_HIPCHAT_RECONNECT="true" I'm still testing it.

paulomsg commented 7 years ago

I'm having the same issue here. The HUBOT_HIPCHAT_RECONNECT env var doesn't help. I wonder if hubot-hipchat is still maintained.

daniel-beard commented 6 years ago

I am also seeing similar issues:

{snip lots of the exact same message}
...
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] INFO Connection went offline
[Wed Feb 21 2018 14:14:20 GMT+0000 (UTC)] ERROR RangeError: Maximum call stack size exceeded
  at Log.info (/var/iosbot/node_modules/log/lib/log.js:231:17)
  at Connector.onOffline (/var/iosbot/node_modules/hubot-hipchat/src/connector.coffee:502:10, <js>:454:17)
  at emitNone (events.js:106:13)
  at Client.emit (events.js:208:7)
  at Client.<anonymous> (/var/iosbot/node_modules/node-xmpp-client/lib/Client.js:157:12)
  at emitNone (events.js:111:20)
  at Connection.emit (events.js:208:7
{snip}
cheenpo commented 6 years ago

fwiw, tried export HUBOT_HIPCHAT_RECONNECT=true (after suffering for some time and then finding this issue thread) ... worked out for me

I put the exports in a .sh file like this: $ cat hipchat.sh

!/bin/bash

export HUBOT_HIPCHAT_HOST="private_server" export HUBOT_HIPCHAT_JID="something@chat.btf.hipchat.com" export HUBOT_HIPCHAT_PASSWORD="redacted" export HUBOT_HIPCHAT_JOIN_PUBLIC_ROOMS=false export HUBOT_HIPCHAT_JOIN_ROOMS_ON_INVITE=true export HUBOT_HIPCHAT_XMPP_DOMAIN="btf.hipchat.com" export HUBOT_HIPCHAT_RECONNECT=true export HUBOT_LOG_LEVEL="debug"

bin/hubot --adapter hipchat

and then just ./hipchat.sh to start the bot