Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User is sometimes not notified of his subscription in a pubsub node when it's done using server component #1275

Closed
satishck1992 opened this issue Aug 30, 2016 · 3 comments
Assignees

Comments

@satishck1992
Copy link

satishck1992 commented Aug 30, 2016

What version of ejabberd are you using?

15.06

What operating system (version) are you using?

Ubuntu 14.04

How did you install ejabberd (source, package, distribution)?

Source

What did not work as expected? Are there error messages in the log? What
was the unexpected behavior? What was the expected result?

Users are not sent the subscribed stanza when they are sent from the external component. We first create a pubsub node using

<iq to='pubsub.mm.io'
    type='set'
    from='admin@mm.io'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <create node='DIS_147256478218%165%%' />
    <configure>
      <x xmlns='jabber:x:data'
         type='submit'>
        <field var='pubsub#access_model'
               type='list-single'>
          <value>open</value>
        </field>
        <field var='pubsub#deliver_payloads'
               type='boolean'>
          <value>1</value>
        </field>
        <field var='pubsub#notify_retract'
               type='boolean'>
          <value>1</value>
        </field>
        <field var='pubsub#persist_items'
               type='boolean'>
          <value>0</value>
        </field>
        <field var='pubsub#presence_based_delivery'
               type='boolean'>
          <value>0</value>
        </field>
        <field var='pubsub#subscribe'
               type='boolean'>
          <value>1</value>
        </field>
        <field var='pubsub#publish_model'
               type='list-single'>
          <value>publishers</value>
        </field>
        <field var='pubsub#title'
               type='text-single'>
          <value>testgroup</value>
        </field>
        <field var='pubsub#notification_type'
               type='text-single'>
          <value>normal</value>
        </field>
        <field var='pubsub#send_last_published_item'
               type='text-single'>
          <value>never</value>
        </field>
      </x>
    </configure>
  </pubsub>
</iq>

after that affiliations are added with

<iq to='pubsub.mm.io'
    type='set'
    from='admin@mm.io'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
    <affiliations node='DIS_147256478218%165%%'>
      <affiliation jid='be90fa41f5@mm.io'
                   affiliation='owner' />
      <affiliation jid='7dda7efc8d@mm.io'
                   affiliation='owner' />
    </affiliations>
  </pubsub>
</iq>

and then the subscription notification using

<iq to='pubsub.mm.io'
    type='set'
    from='admin@mm.io'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
    <subscriptions node='DIS_147256478218%165%%'>
      <subscription jid='pubsub.mm.io'
                    node='DIS_147256478218%165%%'
                    subscription='subscribed' />
      <subscription jid='be90fa41f5@mm.io'
                    node='DIS_147256478218%165%%'
                    subscription='subscribed' />
      <subscription jid='7dda7efc8d@mm.io'
                    node='DIS_147256478218%165%%'
                    subscription='subscribed' />
    </subscriptions>
  </pubsub>
</iq>

are sent
Although checking the logs in the debug mode, everything is working, the client does not receive the subscription packet some times.

@satishck1992
Copy link
Author

Hi,
Since the above mentioned approach was not reliable, we tried sending direct messages from the server component to the user, however that also failed. Running ejabberd in debugger mode shows the following:
2016-08-31 18:26:17.195 [debug] <0.627.0>@ejabberd_receiver:process_data:349 Received XML on stream = <<"DIS_147264815283%165%%0d34ecb4-47a9-4ffc-afd8-7b064ea7d8bemime_typetodddddddtime1472631060">>
to {jid,<<"70385c15c9">>,<<"mm.io">>,<<>>,<<"70385c15c9">>,<<"mm.io">>,<<>>}
packet {xmlel,<<"message">>,[{<<"to">>,<<"70385c15c9@mm.io">>},{<<"from">>,<<"admin@mm.io">>},{<<"type">>,<<"chat">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"DIS_147264815283%165%%">>}]},{xmlel,<<"thread">>,[],[{xmlcdata,<<"0d34ecb4-47a9-4ffc-afd8-7b064ea7d8be">>}]},{xmlel,<<"properties">>,[{<<"xmlns">>,<<"http://www.jivesoftware.com/xmlns/xmpp/properties">>}],[{xmlel,<<"property">>,[],[{xmlel,<<"name">>,[],[{xmlcdata,<<"mime_type">>}]},{xmlel,<<"value">>,[{<<"type">>,<<"string">>}],[{xmlcdata,<<"toddddddd">>}]}]},{xmlel,<<"property">>,[],[{xmlel,<<"name">>,[],[{xmlcdata,<<"time">>}]},{xmlel,<<"value">>,[{<<"type">>,<<"string">>}],[{xmlcdata,<<"1472631060">>}]}]}]},{xmlel,<<"request">>,[{<<"xmlns">>,<<"urn:xmpp:receipts">>}],[]}]}
destinations [<<"41f6d49f5c@mm.io">>,<<"70385c15c9@mm.io">>,<<"e6b9c51593@mm.io">>]
to {jid,<<"70385c15c9">>,<<"mm.io">>,<<>>,<<"70385c15c9">>,<<"mm.io">>,<<>>}
to {jid,<<"70385c15c9">>,<<"mm.io">>,<<>>,<<"70385c15c9">>,<<"mm.io">>,<<>>}
to {jid,<<"70385c15c9">>,<<"mm.io">>,<<>>,<<"70385c15c9">>,<<"mm.io">>,<<>>}
to {jid,<<"70385c15c9">>,<<"mm.io">>,<<"Smack">>,<<"70385c15c9">>,<<"mm.io">>,<<"Smack">>}
after that this particular xml is not logged anywhere, and is not delivered to the client. Does using external component have any effect on the sending of the message ?

@cromain cromain self-assigned this Sep 6, 2016
@cromain
Copy link
Contributor

cromain commented Aug 3, 2017

Using external component should not affect pubsub messaging.
You should check possible component connection issue.
I'm closing this tread, please reply if you still have such troubles with 17.07

@cromain cromain closed this as completed Aug 3, 2017
@lock
Copy link

lock bot commented Jun 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants