xmppjs / hubot-xmpp

XMPP adapter for Hubot
181 stars 103 forks source link

Ping returns error #97

Open beerygaz opened 8 years ago

beerygaz commented 8 years ago
DEBUG [sending ping] <iq type="get"><ping xmlns="urn:xmpp:ping"/></iq>
ERROR [xmpp error]<iq from="za.domain.com" to="bot@za.domain.com/ec4aad13f98f0716b9f673088b4165daecc55530" type="error" xmlns:stream="http://etherx.jabber.org/streams"><ping xmlns="urn:xmpp:ping"/><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

I'm very new to trying to work with both hubot and XMPP, but this looks to me like my XMPP server does not support the ping service?

markstory commented 8 years ago

That looks like what is going on to me as well. I'm not really sure what to do about that, as the ping requests are used to keep the connection alive. Ejabberd and OpenFire close connections without those ping requests.

beerygaz commented 8 years ago

Is there a way to turn them off? I'm running the Cisco Jabber server and from what I can see there's no need for the ping requests to keep the connection open. It would sure help stop the logs from filling up!

Sent from my iPhone

On 18 Nov 2015, at 14:31, Mark Story notifications@github.com wrote:

That looks like what is going on to me as well. I'm not really sure what to do about that, as the ping requests are used to keep the connection alive. Ejabberd and OpenFire close connections without those ping requests.

— Reply to this email directly or view it on GitHub.

markstory commented 8 years ago

There isn't presently a way to turn off the ping requests.

shumphrey commented 8 years ago

We also get these error message, running an ancient ejabberd. We also didn't get time outs when we used an older version of hubot-xmpp that didn't generate these errors.

beerygaz commented 8 years ago

Stephen given I’m very new to this, where did you add the id: ‘hubby-xmpp’ line? I assume:

ping = new ltx.Element('iq', type: 'get') ping = new ltx.Element('iq', type: 'get', id: 'hubot-xmpp’)

I still get the following:

ERROR [xmpp error]

On 25 Nov 2015, at 16:57, Steven Humphrey notifications@github.com wrote:

It looks like #93 https://github.com/markstory/hubot-xmpp/pull/93 fixes these error messages for me. I no longer get the ping error message if I modify xmpp.coffee and add id: 'hubot-xmpp'

— Reply to this email directly or view it on GitHub https://github.com/markstory/hubot-xmpp/issues/97#issuecomment-159632209.

shumphrey commented 8 years ago

I had already deleted my comment about id, it doesn't fix these ping errors.

pixelrebel commented 8 years ago

@beerygaz @shumphrey Have you guys seen my pull request (https://github.com/markstory/hubot-xmpp/pull/93) that addresses this issue?

shumphrey commented 8 years ago

@pixelrebel I believe the two are separate issues, I added an id to the ping request and still get the errors. As far as I can tell, your PR fixes an error where the jabber server understands ping but needs an id, and this error is where the jabber server doesn't understand pings at all?

This error message says "service unavailable", yours says "missing 'id'"