xmppjs / hubot-xmpp

XMPP adapter for Hubot
181 stars 101 forks source link

Remote server not found #39

Closed abbert closed 10 years ago

abbert commented 11 years ago
<presence to="hubot@server/72d0caab" from="hubot/Hubot" type="error" xmlns:stream="http://etherx.jabber.org/streams"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></presence>

The bot is online but doesn't respond in room.. anyone any idea?

abbert commented 11 years ago

When communicating directly with hubot, hubot responds nicely.

Nevon commented 10 years ago

I have the same problem. Any ideas?

To be more specific, my bot connects to the server just fine, and responds if you talk to him directly. However, joining a room fails. I get the following output:

[Fri Dec 20 2013 15:44:08 GMT+0100 (CET)] INFO { username: 'tommy.brunn@OUR_HOST',
  password: '********',
  host: 'OUR_HOST',
  port: undefined,
  rooms: [ { jid: 'ROOM_NAME', password: false } ],
  keepaliveInterval: 30000,
  legacySSL: undefined,
  preferredSaslMechanism: undefined }
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] INFO Hubot XMPP client online
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] INFO Hubot XMPP sent initial presence
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Joining ROOM_NAME/Rocket
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Loading scripts from /Users/tommybrunn/Development/hubot/rocket/scripts
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Loading scripts from /Users/tommybrunn/Development/hubot/rocket/src/scripts
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] WARNING The HUBOT_AUTH_ADMIN environment variable not set
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/auth.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/events.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/google-images.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/help.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/httpd.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/leif.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/maps.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/momma.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/pugme.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/roles.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/rules.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/storage.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/translate.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/scripts/youtube.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] ERROR [xmpp error]<presence to="tommy.brunn@OUR_HOST/d2fb7ffa" from="tarik.amar@scmfrance.fr" type="error" xmlns:stream="http://etherx.jabber.org/streams"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></presence>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] ERROR [xmpp error]<presence to="tommy.brunn@OUR_HOST/d2fb7ffa" from="diego.roccia@subito.it" type="error" xmlns:stream="http://etherx.jabber.org/streams"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></presence>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="iChat_30ED0649" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="guillaume.mirambeau@OUR_HOST/Festi" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="iChat_4846CBC2" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="thomas.kirchesch@OUR_HOST/Thomass MacBook Air" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="iChat_57A53729" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="annika.redlich@OUR_HOST/Admin’s MacBook Air" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="iChat_5150D326" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="francesco.tutti@OUR_HOST/MBAir" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="sd113" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="stephanie.roger@OUR_HOST/494f40aa" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="jabber:iq:version"/></iq>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Loading hubot-scripts from /Users/tommybrunn/Development/hubot/rocket/node_modules/hubot-scripts/src/scripts
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/node_modules/hubot-scripts/src/scripts/redis-brain.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/node_modules/hubot-scripts/src/scripts/shipit.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/node_modules/hubot-scripts/src/scripts/sensitive.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/node_modules/hubot-scripts/src/scripts/remember.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/node_modules/hubot-scripts/src/scripts/excuse.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/node_modules/hubot-scripts/src/scripts/reload.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Parsing help for /Users/tommybrunn/Development/hubot/rocket/node_modules/hubot-scripts/src/scripts/github-activity.coffee
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Loading external-scripts from npm packages
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] ERROR [xmpp error]<presence to="tommy.brunn@OUR_HOST/d2fb7ffa" from="tarik.amar@scmfrance.fr" type="error" xmlns:stream="http://etherx.jabber.org/streams"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></presence>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] ERROR [xmpp error]<presence to="tommy.brunn@OUR_HOST/d2fb7ffa" from="diego.roccia@subito.it" type="error" xmlns:stream="http://etherx.jabber.org/streams"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></presence>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="iChat_442B7743" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="patrick.rente@OUR_HOST/Patrick’s Mac mini" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="iChat_3A2ADEF2" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="marc.neander@OUR_HOST/marcair" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="iChat_60629820" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="jonathan.tutti@OUR_HOST/Jonathan&apos;s MacBook Air" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] ERROR [xmpp error]<presence to="tommy.brunn@OUR_HOST/d2fb7ffa" from="ROOM_NAME/Rocket" type="error" xmlns:stream="http://etherx.jabber.org/streams"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></presence>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG [received iq] <iq to="tommy.brunn@OUR_HOST/d2fb7ffa" type="get" id="3866" from="oscar.enriquez@OUR_HOST/Gajim" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG Successfully connected to Redis
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] INFO Data for brain retrieved from Redis
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="iChat_3222F29A" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="robbie@OUR_HOST/Robbie" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
[Fri Dec 20 2013 15:44:12 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="iChat_5F5701BD" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="ahmed@OUR_HOST/Ahmed’s MacBook Air" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
[Fri Dec 20 2013 15:44:12 GMT+0100 (CET)] DEBUG [received iq] <iq type="get" id="iChat_3BACA1B3" to="tommy.brunn@OUR_HOST/d2fb7ffa" from="anajulia@OUR_HOST/Ana’s MacBook Air" xmlns:stream="http://etherx.jabber.org/streams"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>

The following environment variables are set:

export HUBOT_XMPP_USERNAME="tommy.brunn@OUR_HOST"
export HUBOT_XMPP_PASSWORD="MY_PASSWORD"
export HUBOT_XMPP_ROOMS="ROOM_NAME"
export HUBOT_XMPP_HOST="OUR_HOST"
export HUBOT_LOG_LEVEL="debug"
markstory commented 10 years ago
[Fri Dec 20 2013 15:44:11 GMT+0100 (CET)] ERROR [xmpp error]<presence to="tommy.brunn@OUR_HOST/d2fb7ffa" from="ROOM_NAME/Rocket" type="error" xmlns:stream="http://etherx.jabber.org/streams"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></presence>

Seems pretty relevant.

Nevon commented 10 years ago

Well, yes, but I couldn't figure out why that was. I have, however, figured it out now. It seems that the host for rooms is different from the normal host. For example, while I would normally connect to "jabber.host.com", when I connect to a room I have to connect to "room@conference.jabber.host.com".

What I did to get around it was to add another option that I called roomHost, which I then added in the joinRoom function, so that instead of setting the presence to room/botname, I set it to room@conference.jabber.host.com/botname.

larrycai commented 10 years ago

@nevon thanks, I met the same problem with openfire and adding the hostname in the room solves this problem.

Will be nice it was stated in the guideline.

Surely it will be better it to append this host name in code directly.

Nevon commented 10 years ago

@larrycai The problem with that is that the hostname can be different from the host you're connecting to, as in my case. I think it's fine the way it is, but the documentation should be updated to reflect that you should add the hostname to the room names in your configuration.

markstory commented 10 years ago

I can update the docs to that effect.