Getting error while fetching archived messages(XEP

2019-02-20 06:10发布

问题:

Openfire version - 4.1.1(Which has XEP-0313 MAM support)
Smack version - 4.2.0-rc2-SNAPSHOT(Which has XEP-0313 MAM support)
Monitoring Service version - 1.5.4

After installing Monitoring Service plugin in Openfire, I've also eabled Message Archiving.

To fetch archived messages,

    MamManager mamManager = MamManager.getInstanceFor(mConnection);
    MamQueryResult mamQueryResult = mamManager.queryArchive(5);

Sent Stanza :

    <?xml version="1.0" encoding="UTF-8"?>
    <iq id="33F2H-15" type="set">
    <query
    xmlns="urn:xmpp:mam:1" queryid="f18e30a5-f70c-47a3-9c01-131b6936a780">
    <set
    xmlns="http://jabber.org/protocol/rsm">
    <max>5</max>
    </set>
    </query>
    </iq>

Received Stanza :

    <?xml version="1.0" encoding="UTF-8"?>
    <iq type="error" id="33F2H-15" to="abc@192.168.2.128/9jifslkilf">
    <query xmlns="urn:xmpp:mam:1" queryid="f18e30a5-f70c-47a3-9c01-131b6936a780">
    <set xmlns="http://jabber.org/protocol/rsm">
    <max>5</max>
    </set>
    </query>
    <error code="503" type="cancel">
    <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
    </error>
    </iq>

Questions :

  • Why there is an error of 503 - cancel - service-unavailable?

  • Is openfire server congfigured properly for MAM - XEP-0313 support, or am I missing something?

  • Is this an issue of smack(MamManager)?

May be it's possible duplicate of this, but that doesn't help much.