Spark is not showing changed user from openfire group

We have Openfire 4.6.4 server, build 2bc37e6 on Centos 8 with MySQL 8.0.21 integrated with AD Windows 2019 std and user are using Spark 2.9.4.
When a user group change is made in AD and query in Openfire the change is made after 1 hour which is normal according to openfire cache parameters.
The problem is that for users on Spark, it’s not showing the change made. User remains in old group
Do you have any cache settings in openfire that should be configured so that it updates and the spark picks up the change made?

Antonio

I don’t think that, even if Openfire becomes aware of the new change, that this change is automatically pushed to all connected clients. Do the changes show up after the user logs out and in again? If not, does restarting Openfire (and obviously, the client) work?

Hello.
Even if you log out or close the spark, it still shows the user who was removed from the AD group. If you search for the user on openfire I no longer exist.
What I identified is that if I clear all openfire cache, close the spark and open it again, it no longer shows the user removed from the AD group.
It’s something from the openfire cache that should clear or refresh after a while and it’s not doing that.
I want to avoid having to restart the server or stop the openfire service.
Are there any parameters at the cache level in openfire that clears after a certain time?

Each cache has a distinct configuration that defines if, and if so, after what time, it is refreshed. You can see the configuration in the Openfire admin console, as shown here:


If this is fixed by a cache reset, then it is very likely that your problem will eventually go away - but it could take several hours to a day, depending on your current cache configuration.

You can configure individual caches by setting properties. The template for the property name that controls the maximum lifetime of cache entries is:

cache.<cachename>.maxLifetime

It takes a numeric value that represents an amount of milliseconds.

You’ll have to deduce the cachename value from the source code of Openfire. Most of them are listed in https://github.com/igniterealtime/Openfire/blob/master/xmppserver/src/main/java/org/jivesoftware/util/cache/CacheFactory.java#L124. Here, you’ll see that the name for the User Cache, for example, is userCache.

I’m not exactly sure what caches affect your problem, but you can experiment to find out. You might need a combination of a few caches. All of them is overkill though. My guesses would include group, groupMeta, username2roster, and username2rosterItems.