ejabberd development
  1. ejabberd development
  2. EJAB-1494

PEP items not stored (message with empty <items /> element sent)

    Details

      Description

      When publishing a PEP event

      <iq type="set" id="sid_116">
          <pubsub xmlns="http://jabber.org/protocol/pubsub">
            <publish node="http://jabber.org/protocol/mood">
              <item id="current">
                <mood xmlns="http://jabber.org/protocol/mood">
                  <distracted/>
                </mood>
              </item>
            </publish>
          </pubsub>
        </iq>
      
        <iq xmlns="jabber:client" from="admin@192.168.63.138/eyeCU-pc"
           type="result" to="admin@192.168.63.138/eyeCU-pc" id="sid_116">
          <pubsub xmlns="http://jabber.org/protocol/pubsub">
            <publish xmlns="http://jabber.org/protocol/pubsub" node="http://jabber.org/protocol/mood">
              <item xmlns="http://jabber.org/protocol/pubsub" id="current"/>
            </publish>
          </pubsub>
        </iq>
      

      Correct PEP notification message recieved:

        <message xmlns="jabber:client" from="admin@192.168.63.138/eyeCU-pc"
            type="headline" to="admin@192.168.63.138/eyeCU-pc">
          <event xmlns="http://jabber.org/protocol/pubsub#event">
            <items xmlns="http://jabber.org/protocol/pubsub#event" node="http://jabber.org/protocol/mood">
              <item xmlns="http://jabber.org/protocol/pubsub#event" id="current">
                <mood xmlns="http://jabber.org/protocol/mood">
                  <distracted xmlns="http://jabber.org/protocol/mood"/>
                </mood>
              </item>
            </items>
          </event>
          <addresses xmlns="http://jabber.org/protocol/address">
            <address xmlns="http://jabber.org/protocol/address" type="replyto" jid="admin@192.168.63.138/eyeCU-pc"/>
          </addresses>
        </message>
      

      But when going OFFLINE, then ONLINE, message with empty <items /> element recieved:

        <message xmlns="jabber:client" from="admin@192.168.63.138/eyeCU-pc"
            to="admin@192.168.63.138/eyeCU-pc">
          <event xmlns="http://jabber.org/protocol/pubsub#event">
            <items xmlns="http://jabber.org/protocol/pubsub#event" node="http://jabber.org/protocol/mood"/>
          </event>
        </message>
      

      Also, an attempt to retract the item:

        <iq type="set" id="sid_131">
          <pubsub xmlns="http://jabber.org/protocol/pubsub">
            <retract node="http://jabber.org/protocol/mood" notify="1">
              <item id="current"/>
            </retract>
          </pubsub>
        </iq>
      

      Failed with 404 error code:

      <iq xmlns="jabber:client" from="admin@192.168.63.138/eyeCU-pc"
           type="error" to="admin@192.168.63.138/eyeCU-pc" id="sid_131">
          <error xmlns="jabber:client" type="cancel" code="404">
            <item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
          </error>
          <pubsub xmlns="http://jabber.org/protocol/pubsub">
            <retract xmlns="http://jabber.org/protocol/pubsub" node="http://jabber.org/protocol/mood" notify="1">
              <item xmlns="http://jabber.org/protocol/pubsub" id="current"/>
            </retract>
          </pubsub>
        </iq>
      

        Activity

        Hide
        Karim Gemayel (Inactive)
        added a comment -

        The 'pubsub#persist_items' and 'pubsub#send_last_published_item" are independant : « A service MAY cache the last item published to a node (even if the "persistent-items" option is set to false) ».

        Show
        Karim Gemayel (Inactive)
        added a comment - The 'pubsub#persist_items' and 'pubsub#send_last_published_item" are independant : « A service MAY cache the last item published to a node (even if the "persistent-items" option is set to false) ».
        Hide
        Konstantin Kozlov
        added a comment -

        Well... Once again.
        XEP-0163, section 4.3.3, paragraph 2 says:

        When a PEP service receives initial presence [14] from a subscriber's resource including XEP-0115 information that indicates an interest in the data format, it MUST generate a notification containing at least the last published item for that node and send it to the newly-available resource; see below under Sending the Last Published Item.

        Rigth now, eJabberd sends blank notification event (with empty <items /> element), so at least this paragraph is violated. I don't know if this is bacause of "pubsub#persist_items" set to '0' by default or for some other reason. The fact is the PEP doesn't work (at least for me).

        Show
        Konstantin Kozlov
        added a comment - Well... Once again. XEP-0163, section 4.3.3, paragraph 2 says: When a PEP service receives initial presence [14] from a subscriber's resource including XEP-0115 information that indicates an interest in the data format, it MUST generate a notification containing at least the last published item for that node and send it to the newly-available resource; see below under Sending the Last Published Item. Rigth now, eJabberd sends blank notification event (with empty <items /> element), so at least this paragraph is violated. I don't know if this is bacause of "pubsub#persist_items" set to '0' by default or for some other reason. The fact is the PEP doesn't work (at least for me).
        Hide
        Karim Gemayel (Inactive)
        added a comment -

        Have you set the 'last_item_cache' option to 'true' in ejabberd.cfg ?

        Show
        Karim Gemayel (Inactive)
        added a comment - Have you set the 'last_item_cache' option to 'true' in ejabberd.cfg ?
        Hide
        Konstantin Kozlov
        added a comment -

        Tried it right now.
        Now is somewhat better, but not good yet.
        Now, on sending "Available" presence I receive last published item. But on attempt to delete the item I still have "item-not-found" error:

        >>>> yagiza@192.168.63.138/eyeCU 22:12:20 +35484 >>>>
          <iq type="set" id="sid_79">
            <pubsub xmlns="http://jabber.org/protocol/pubsub">
              <publish node="http://jabber.org/protocol/mood">
                <item id="current">
                  <mood xmlns="http://jabber.org/protocol/mood">
                    <hungry/>
                  </mood>
                </item>
              </publish>
            </pubsub>
          </iq>
        
        <<<< yagiza@192.168.63.138/eyeCU 22:12:20 +16 <<<<
          <iq xmlns="jabber:client" from="yagiza@192.168.63.138/eyeCU" type="result" to="yagiza@192.168.63.138/eyeCU" id="sid_79">
            <pubsub xmlns="http://jabber.org/protocol/pubsub">
              <publish xmlns="http://jabber.org/protocol/pubsub" node="http://jabber.org/protocol/mood">
                <item xmlns="http://jabber.org/protocol/pubsub" id="current"/>
              </publish>
            </pubsub>
          </iq>
        
        <<<< yagiza@192.168.63.138/eyeCU 22:12:20 +15 <<<<
          <message xmlns="jabber:client" from="yagiza@192.168.63.138/eyeCU" type="headline" to="yagiza@192.168.63.138/eyeCU">
            <event xmlns="http://jabber.org/protocol/pubsub#event">
              <items xmlns="http://jabber.org/protocol/pubsub#event" node="http://jabber.org/protocol/mood">
                <item xmlns="http://jabber.org/protocol/pubsub#event" id="current">
                  <mood xmlns="http://jabber.org/protocol/mood">
                    <hungry xmlns="http://jabber.org/protocol/mood"/>
                  </mood>
                </item>
              </items>
            </event>
            <addresses xmlns="http://jabber.org/protocol/address">
              <address xmlns="http://jabber.org/protocol/address" type="replyto" jid="yagiza@192.168.63.138/eyeCU"/>
            </addresses>
          </message>
        
        >>>> yagiza@192.168.63.138/eyeCU 22:12:31 +11594 >>>>
          <iq type="set" id="sid_80">
            <pubsub xmlns="http://jabber.org/protocol/pubsub">
              <retract node="http://jabber.org/protocol/mood" notify="1">
                <item id="current"/>
              </retract>
            </pubsub>
          </iq>
        
        <<<< yagiza@192.168.63.138/eyeCU 22:12:31 +31 <<<<
          <iq xmlns="jabber:client" from="yagiza@192.168.63.138/eyeCU" type="error" to="yagiza@192.168.63.138/eyeCU" id="sid_80">
            <error xmlns="jabber:client" type="cancel" code="404">
              <item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
            </error>
            <pubsub xmlns="http://jabber.org/protocol/pubsub">
              <retract xmlns="http://jabber.org/protocol/pubsub" node="http://jabber.org/protocol/mood" notify="1">
                <item xmlns="http://jabber.org/protocol/pubsub" id="current"/>
              </retract>
            </pubsub>
          </iq>
        

        So, now I'm unable to delete the item!

        So, now I have 2 questions:
        1. Why in the rescent version of eJabberd with default configuration I have absolutely unoperable PEP?
        2. Why even when I modified the configuration, setting 'last_item_cache' PEP option to 'true', I still have unoperable PEP?

        Show
        Konstantin Kozlov
        added a comment - Tried it right now. Now is somewhat better, but not good yet. Now, on sending "Available" presence I receive last published item. But on attempt to delete the item I still have "item-not-found" error: >>>> yagiza@192.168.63.138/eyeCU 22:12:20 +35484 >>>> <iq type="set" id="sid_79"> <pubsub xmlns="http://jabber.org/protocol/pubsub"> <publish node="http://jabber.org/protocol/mood"> <item id="current"> <mood xmlns="http://jabber.org/protocol/mood"> <hungry/> </mood> </item> </publish> </pubsub> </iq> <<<< yagiza@192.168.63.138/eyeCU 22:12:20 +16 <<<< <iq xmlns="jabber:client" from="yagiza@192.168.63.138/eyeCU" type="result" to="yagiza@192.168.63.138/eyeCU" id="sid_79"> <pubsub xmlns="http://jabber.org/protocol/pubsub"> <publish xmlns="http://jabber.org/protocol/pubsub" node="http://jabber.org/protocol/mood"> <item xmlns="http://jabber.org/protocol/pubsub" id="current"/> </publish> </pubsub> </iq> <<<< yagiza@192.168.63.138/eyeCU 22:12:20 +15 <<<< <message xmlns="jabber:client" from="yagiza@192.168.63.138/eyeCU" type="headline" to="yagiza@192.168.63.138/eyeCU"> <event xmlns="http://jabber.org/protocol/pubsub#event"> <items xmlns="http://jabber.org/protocol/pubsub#event" node="http://jabber.org/protocol/mood"> <item xmlns="http://jabber.org/protocol/pubsub#event" id="current"> <mood xmlns="http://jabber.org/protocol/mood"> <hungry xmlns="http://jabber.org/protocol/mood"/> </mood> </item> </items> </event> <addresses xmlns="http://jabber.org/protocol/address"> <address xmlns="http://jabber.org/protocol/address" type="replyto" jid="yagiza@192.168.63.138/eyeCU"/> </addresses> </message> >>>> yagiza@192.168.63.138/eyeCU 22:12:31 +11594 >>>> <iq type="set" id="sid_80"> <pubsub xmlns="http://jabber.org/protocol/pubsub"> <retract node="http://jabber.org/protocol/mood" notify="1"> <item id="current"/> </retract> </pubsub> </iq> <<<< yagiza@192.168.63.138/eyeCU 22:12:31 +31 <<<< <iq xmlns="jabber:client" from="yagiza@192.168.63.138/eyeCU" type="error" to="yagiza@192.168.63.138/eyeCU" id="sid_80"> <error xmlns="jabber:client" type="cancel" code="404"> <item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> </error> <pubsub xmlns="http://jabber.org/protocol/pubsub"> <retract xmlns="http://jabber.org/protocol/pubsub" node="http://jabber.org/protocol/mood" notify="1"> <item xmlns="http://jabber.org/protocol/pubsub" id="current"/> </retract> </pubsub> </iq> So, now I'm unable to delete the item! So, now I have 2 questions: 1. Why in the rescent version of eJabberd with default configuration I have absolutely unoperable PEP? 2. Why even when I modified the configuration, setting 'last_item_cache' PEP option to 'true', I still have unoperable PEP?
        Hide
        Christophe Romain
        added a comment -

        default PEP node setup changed to set item storage. less optimized default, but simpler setup.

        Show
        Christophe Romain
        added a comment - default PEP node setup changed to set item storage. less optimized default, but simpler setup.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Start Date:
              Days since last comment:
              43 weeks ago

              Issue deployment