hubotio / hubot

A customizable life embetterment robot.
https://hubotio.github.io/hubot/
MIT License
16.64k stars 3.75k forks source link

going offline after some time #657

Closed Jaglag closed 10 years ago

Jaglag commented 10 years ago

Hi,

the bot just going offline after some time of idle and i dont know how to fix that:

[Sat Feb 22 2014 13:41:31 GMT+0100 (CET)] DEBUG [received iq]  iq type="get" id="111-111111" from="robertsspaceindustries.com" to="usernam@robertsspaceindustries.com/7fbb6dc0" xmlns:stream="http://etherx.jabber.org/streams"><ping xmlns="urn:xmpp:ping"/ /iq

 [Sat Feb 22 2014 13:41:31 GMT+0100 (CET)] DEBUG [sending pong] iq to="robertsspaceindustries.com" from="usernam@robertsspaceindustries.com/7fbb6dc0" type="result" id="111-111111"/

 [Sat Feb 22 2014 13:46:34 GMT+0100 (CET)] DEBUG Received offline event
 [Sat Feb 22 2014 13:46:34 GMT+0100 (CET)] DEBUG Received offline event

sometimes it takes 30min sometime over 2 hours then he´s going offline i dont know exactly which server version this is i think its a modded version for this game: https://robertsspaceindustries.com/faq/xmpp-setup but i can connect via pidgin or any other xmpp client without special settings or something else and idle for hours! only the bot disconnects Im in a channel via bitlbee over a znc with mirc too without any problems.

thats some parts of my pidgin connection log:

 jabber: Sending (ssl) (user@robertsspaceindustries.com/ee4db276): iq type='result' id='127:sendIQ' to='general@channels.robertsspaceindustries.com/Semtecs' query xmlns='http://jabber.org/protocol/disco#info' node='http://pidgin.im/#I22W7CegORwdbnu0ZiQwGpxr0Go=' identity category='client' type='pc' name='Pidgin'/><feature var='jabber:iq:last'/ feature var='jabber:iq:oob'/ feature var='urn:xmpp:time'/ feature var='jabber:iq:version'/ feature var='jabber:x:conference'/ feature var='http://jabber.org/protocol/bytestreams'/ feature var='http://jabber.org/protocol/caps'/ feature var='http://jabber.org/protocol/chatstates'/ feature var='http://jabber.org/protocol/disco#info'/ feature var='http://jabber.org/protocol/disco#items'/ feature var='http://jabber.org/protocol/muc'/ feature var='http://jabber.org/protocol/muc#user'/ feature var='http://jabber.org/protocol/si'/ feature var='http://jabber.org/protocol/si/profile/file-transfer'/ feature var='http://jabber.org/protocol/xhtml-im'/ feature var='urn:xmpp:ping'/ feature var='urn:xmpp:attention:0'/ feature var='urn:xmpp:bob'/ feature var='urn:xmpp:jingle:1'/ feature var='urn:xmpp:avatar:metadata'/ feature var='urn:xmpp:avatar:data'/><feature var='urn:xmpp:avatar:metadata+notify'/ feature var='http://jabber.org/protocol/mood'/ feature var='http://jabber.org/protocol/mood+notify'/ feature var='http://jabber.org/protocol/tune'/ feature var='http://jabber.org/protocol/tune+notify'/ feature var='http://jabber.org/protocol/nick'/ feature var='http://jabber.org/protocol/nick+notify'/ feature var='http://jabber.org/protocol/ibb'/ /query /iq

here connecting a user to the channel:

(13:05:46) jabber: Recv (ssl)(371): presence to="user@robertsspaceindustries.com/ee4db276" from="general@channels.robertsspaceindustries.com/user" type="unavailable" c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="https://candy-chat.github.io/candy/" ver="kR9jljQwQFoklIvoOmy/GAli0gA=" x xmlns="http://jabber.org/protocol/muc#user" item affiliation="member" role="none"/ /x /presence

And this is the bot:

(13:05:55) jabber: Recv (ssl)(1): 
(13:05:55) jabber: Recv (ssl)(238): presence to="user@robertsspaceindustries.com/ee4db276" from="imperium@channels.robertsspaceindustries.com/user" type="unavailable" x xmlns="http://jabber.org/protocol/muc#user" item affiliation="member" role="none"/ /x /presence

here a ping via pidgin:

(13:40:14) jabber: Sending (ssl) (user@robertsspaceindustries.com/ee4db276):  iq type='get' id='purplebca203ac' ping xmlns='urn:xmpp:ping iq
(13:40:14) jabber: Recv (ssl)(1):
(13:40:14) jabber: Recv (ssl)(86): iq type="result" id="purplebca203ac" to="user@robertsspaceindustries.com/ee4db276"/

and 1 warning via pidgin:

(13:09:40) jabber: <show/> present on presence, but type is not default ('available')

and here the leave log from basebot:

(13:48:44) jabber: Recv (ssl)(238): presence to="user@robertsspaceindustries.com/ee4db276" from="channel@channels.robertsspaceindustries.com/username" type="unavailable" x xmlns="http://jabber.org/protocol/muc#user" item affiliation="member" role="none x /presence
Jaglag commented 10 years ago

i have standard setup with just the base scripts inside and hubot-xmpp module. nothing else

export HUBOT_XMPP_USERNAME=username@robertsspaceindustries.com export HUBOT_XMPP_PASSWORD=pass in here export HUBOT_XMPP_ROOMS=roomname@channels.robertsspaceindustries.com export HUBOT_XMPP_HOST=xmpp.robertsspaceindustries.com export HUBOT_XMPP_PORT=5222

patcon commented 10 years ago

Are you hosting on heroku? If so, idling is a known issue with a solution in the docs and here: https://github.com/github/hubot/issues/366#issuecomment-10615132

Hopefully that helps!

EDIT: If that answers your question, then feel free to close this

Jaglag commented 10 years ago

Hi, Its Not hosted on heroku im hosting it on centos6 server, and hosted hubot there too with irc module without any problem.

Jaglag commented 10 years ago

a workaround like: if hubot receive offline message --> restart hubot instead of going offline would be nice