Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Disconnecting from HipChat #34

Open
MattMencel opened this issue Dec 21, 2015 · 2 comments
Open

Disconnecting from HipChat #34

MattMencel opened this issue Dec 21, 2015 · 2 comments
Labels

Comments

@MattMencel
Copy link

My Lita bot disconnects from HipChat fairly regularly. The debug looks like this for each of the rooms when the disconnect happens.

D, [2015-12-19T11:35:29.418177 #48133] DEBUG -- : SENDING:
    <presence to='MYROOMNAME@conf.hipchat.com/Lita Bot' type='unavailable' xmlns='jabber:client'/>
W, [2015-12-19T11:35:29.418357 #48133]  WARN -- : EXCEPTION:
    IOError
    closed stream
    /opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/openssl/buffering.rb:326:in `syswrite'
    /opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/openssl/buffering.rb:326:in `do_write'
    /opt/rbenv/versions/2.1.5/lib/ruby/2.1.0/openssl/buffering.rb:391:in `<<'
    /opt/lita/vendor/ruby/2.1.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:346:in `block in send_data'
    /opt/lita/vendor/ruby/2.1.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:344:in `synchronize'
    /opt/lita/vendor/ruby/2.1.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:344:in `send_data'
    /opt/lita/vendor/ruby/2.1.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:375:in `send'
    /opt/lita/vendor/ruby/2.1.0/gems/xmpp4r-0.5.6/lib/xmpp4r/muc/helper/mucclient.rb:147:in `exit'
    /opt/lita/vendor/ruby/2.1.0/gems/lita-hipchat-3.0.1/lib/lita/adapters/hipchat/connector.rb:88:in `part'
    /opt/lita/vendor/ruby/2.1.0/gems/lita-hipchat-3.0.1/lib/lita/adapters/hipchat.rb:38:in `part'
    /opt/lita/vendor/ruby/2.1.0/gems/lita-hipchat-3.0.1/lib/lita/adapters/hipchat.rb:64:in `block in shut_down'
    /opt/lita/vendor/ruby/2.1.0/gems/lita-hipchat-3.0.1/lib/lita/adapters/hipchat.rb:64:in `each'
    /opt/lita/vendor/ruby/2.1.0/gems/lita-hipchat-3.0.1/lib/lita/adapters/hipchat.rb:64:in `shut_down'
    /opt/lita/vendor/ruby/2.1.0/gems/lita-4.6.1/lib/lita/robot.rb:169:in `shut_down'
    /opt/lita/vendor/ruby/2.1.0/gems/lita-hipchat-3.0.1/lib/lita/adapters/hipchat/connector.rb:121:in `block in register_exception_handler'
    /opt/lita/vendor/ruby/2.1.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:387:in `call'
    /opt/lita/vendor/ruby/2.1.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:387:in `block in send'
@sjernigan
Copy link

Similar problem, different spot. No reconnect. Hipchat's xmpp service had some issues today and lita threw the following. Ideally it would reconnect. Alternatively, lita could die and some other god process would restart it. As it is, it's take manual intervention.

W, [2016-01-12T20:20:36.070537 #1] WARN -- : EXCEPTION:
Errno::ECONNRESET
Connection reset by peer
/var/bundle/ruby/2.2.0/gems/xmpp4r-0.5.6/lib/xmpp4r/connection.rb:45:in sysread' /var/bundle/ruby/2.2.0/gems/xmpp4r-0.5.6/lib/xmpp4r/connection.rb:45:insysread'
/usr/local/lib/ruby/2.2.0/openssl/buffering.rb:61:in fill_rbuff' /usr/local/lib/ruby/2.2.0/openssl/buffering.rb:301:ineof?'
/usr/local/lib/ruby/2.2.0/rexml/source.rb:235:in empty?' /usr/local/lib/ruby/2.2.0/rexml/parsers/baseparser.rb:148:inempty?'
/usr/local/lib/ruby/2.2.0/rexml/parsers/baseparser.rb:196:in pull_event' /usr/local/lib/ruby/2.2.0/rexml/parsers/baseparser.rb:184:inpull'
/usr/local/lib/ruby/2.2.0/rexml/parsers/sax2parser.rb:92:in parse' /var/bundle/ruby/2.2.0/gems/xmpp4r-0.5.6/lib/xmpp4r/streamparser.rb:91:inparse'
/var/bundle/ruby/2.2.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:75:in block in start' D, [2016-01-12T20:20:36.070707 #1] DEBUG -- : SENDING: </stream:stream> W, [2016-01-12T20:20:36.070881 #1] WARN -- : EXCEPTION: Errno::EPIPE Broken pipe /usr/local/lib/ruby/2.2.0/openssl/buffering.rb:326:insyswrite'
/usr/local/lib/ruby/2.2.0/openssl/buffering.rb:326:in do_write' /usr/local/lib/ruby/2.2.0/openssl/buffering.rb:391:in<<'
/var/bundle/ruby/2.2.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:346:in block in send_data' /var/bundle/ruby/2.2.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:344:insynchronize'
/var/bundle/ruby/2.2.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:344:in send_data' /var/bundle/ruby/2.2.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:378:insend'
/var/bundle/ruby/2.2.0/gems/xmpp4r-0.5.6/lib/xmpp4r/client.rb:80:in close' /var/bundle/ruby/2.2.0/gems/xmpp4r-0.5.6/lib/xmpp4r/stream.rb:89:inblock (2 levels) in start'
[2016-01-12 20:20:36 UTC] INFO: Disconnecting from HipChat.
[2016-01-12 20:20:36 UTC] INFO: Disconnecting from HipChat.

@sjernigan
Copy link

Duplication of #20

alindeman added a commit to alindeman/lita-hipchat that referenced this issue Feb 19, 2016
If the socket has already disconnected, e.g., we don't want to raise _another_
error (see litaio#34, litaio#20) when trying to close it cleanly.
alindeman added a commit to alindeman/lita-hipchat that referenced this issue Feb 21, 2016
If the socket has already disconnected, e.g., we don't want to raise _another_
error (see litaio#34, litaio#20) when trying to close it cleanly.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants