powered by Jive Software

Openfire 4.1.3 not broadcasting presence updates to roster members

I have built a system that uses the OpenFire XMPP server to relay presence and “command” messages in an IoT sort of environment. There are devices that monitor various sensors and update their XMPP presence so that other, central, management dashboard devices can show that information in a realtime display at a central management station. All of the devices (the “remote” monitoring devices as well as the central management station) belong to the same group and are in each others’ “roster.” We are using the RESTAPI plugin for creating users and groups and managing the group membership. Everything generally works very well. The monitors and management stations are Android tablets. The monitors are written in Java using the Smack library, where the management stations are written in Xamarin.Android and use the Matrix XMPP library.

Occasionally, we will see that the presence updates from some (but not all) of the remote monitor devices will not be reflected on the management station, but they are reflected on the “Sessions” view in the OpenFire management console. We intercept the raw incoming and outgoing XMPP XML fragments on the management station device and output them on the android log to see the actual XMPP stanzas come over the wire, and when this behavior occurs, the management stations simply do not receive the presence stanzas from the affected remote monitoring devices. Sometimes, everything will snap back into place after a period of time. Other times, simply restarting the management station app will get things back working.

I am well and truly stumped by this behavior and don’t really know where to start to look for a possible cause. The OpenFire logs (error, warn, info, debug) don’t appear to be too much help, either.

Any suggestions on how to better instrument our apps or how to decipher the OpenFire logs would be most helpful.



Any ideas on this? Some additional information is that eventually the presence updates will start flowing again.

Bueller? Bueller? This problem has persisted into v4.1.5 now.

Oh, but we can “chat” among users whose presence info is not being forwarded.

Guus has been actively attempting to reproduce this issue. Please provide a listing of Rest API endpoints you are calling and some estimate as to how frequently they are called over a day

Hi Daryl. My colleague Van Thompson has been keeping me apprised of his conversation with Guus. The RESTAPI endpoints we use the most are

/users (POST and PUT)

/users/{username}/groups (POST, DELETE)

/groups (POST)

We’ve worked around the problem to avoid using the /groups and /users/{userName}/groups resources, and have taken to just using the /users/{userName}/roster ones (POST and DELETE).

As to frequency, a total of dozens of times per day with approximately 20 or so connected clients in our test environments.

Does that help?



could you please let me know how you are generating presebce packets or you are loggging out and logging again from remot device prehapse i can give you better solution

The presence stanzas are generated via the Smack and Matrix XMPP SDK’s. We are not manually doing anything to manipulate them. We do add a “status” component to the presence stanzas that is basically just a serialized JSON string containing certain bits of context. The devices are continuously logged in to the server except if the “remotes” are explicitly removed from the monitoring scheme because they have nothing to monitor.