MongooseIM icon indicating copy to clipboard operation
MongooseIM copied to clipboard

No response from Account Owner Service Discovery

Open theanhoo opened this issue 5 years ago • 7 comments

MongooseIM version: 3.3.0 Installed from: source Erlang/OTP version: 20 Smack version: 4.3.0

Account Owner Service Discovery

Sent <iq to='[email protected]' id='svjUw-46' type='get'><query xmlns='http://jabber.org/protocol/disco#info' node='http://jabber.org/protocol/tune'></query></iq> but did not get any response from server.

Stack: org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 60000ms (~60s). Waited for response using: IQReplyFilter: iqAndIdFilter (AndFilter: (OrFilter: (IQTypeFilter: type=error, IQTypeFilter: type=result), StanzaIdFilter: id=svjUw-46)), : fromFilter (OrFilter: (FromMatchesFilter (full): [email protected], FromMatchesFilter (full): null)). at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:265) at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:219) at org.jivesoftware.smackx.pubsub.PubSubManager.getNode(PubSubManager.java:240) at org.jivesoftware.smackx.pep.PEPManager.publish(PEPManager.java:157)

Is there anything missing / wrong with my mongooseim.cfg?

  { mod_caps, [ 
    { cache_size, 1000 },
    { cache_life_time, 86 }
  ] },

  { mod_pubsub, [
    { host, "pubsub.@HOST@" },
    { access_createnode, all },
    { ignore_pep_from_offline, true },
    { backend, rdbms },
    { last_item_cache, mnesia },
    { max_items_node, 10 },
    { nodetree, <<"tree">> },
    { plugins, [ 
      <<"flat">>,
      <<"pep">>,
      <<"push">> 
    ] }
  ] },

theanhoo avatar Jun 12 '19 13:06 theanhoo

Hi @theanhoo

Your IQ doesn't look like a valid request. Take a look at the example in XEP. There is no node attribute. Please try to send the query without it.

fenek avatar Jun 12 '19 13:06 fenek

Thank you very much.

theanhoo avatar Jun 12 '19 13:06 theanhoo

FWIW the request is valid, c.f. XEP-0060 5.3. Also, even if it wouldn't be valid, an entity has to send an IQ response back in order to stay XMPP compliant.

Flowdalic avatar Jun 14 '19 14:06 Flowdalic

I am sorry to have to re-open this, but the feedback I get from Smack is that the request is valid according to XEP-0060 5.3

Please advise.

Many thanks in advance.

theanhoo avatar Jun 14 '19 14:06 theanhoo

Two comments:

  1. Your server should always respond to IQ requests as per the Core XMPP specification: An entity that receives an IQ request of type "get" or "set" MUST reply with an IQ response of type "result" or "error". The response MUST preserve the 'id' attribute of the request (or be empty if the generated stanza did not include an 'id' attribute).
  2. See https://xmpp.org/extensions/xep-0060.html#entity-info Example 13 and 15 for valid disco#info requests with a node. Since a PEP account is just a PubSub node, it applies for PEP as well. I'd just ignore the node attribute in PEP (for disco#info) and return the same identities and features as are returned for the PEP account.

sco0ter avatar Jun 14 '19 14:06 sco0ter

@fenek Is there somewhere in MongooseIM 3.3.0 I can patch to change this behaviour?

Many thanks in advance.

theanhoo avatar Jun 16 '19 03:06 theanhoo

I've added a ticket to investigate this issue to our internal backlog.

fenek avatar Oct 07 '19 13:10 fenek