Contact List (Roster) Sharing autoswitches back to “Disable”

Good day.
I have Openfire 4.7.1 on Rocky Linux 8.5 integrated with Active Directory.

Database and Version: MySQL 5.5.5-10.3.32-MariaDB
JDBC Driver: MySQL Connector/J
JDBC Driver Version: mysql-connector-java-8.0.28

Users and groups display correctly.

After switching on “Enable contact list group sharing” for any group, setting contact list group name, share group with all users, it works ok for several minutes (spark shows all groups) then the switch goes to “Disable contact list group sharing”. After that spark shows no groups.

Is it possible to force it to enabled state?

I cannot think of a functional reason why this would automatically switch back. Please review your Openfire log files. Something must be going wrong. Maybe Openfire fails to persist some settings in the database?

I couldn’t solve the issue. Had to use embedded database instead of MariaDB and problem is gone.

This suggests some kind of permission issue with writing to the database. Most of Openfire does not make any difference between any of the databases that can be used.

Good to hear that you found a way around the issue though!

Good Day. I’m back with this issue. Now I have a new server:
Rocky Linux 9.3; Openfire 4.8.0 with AD users;
Java Version: 21.0.2 Oracle Corporation – Java HotSpot™ 64-Bit Server VM;
Appserver: jetty/10.0.18

Database and Version: MySQL 5.5.5-10.5.22-MariaDB
JDBC Driver: MySQL Connector/J
JDBC Driver Version: mysql-connector-j-8.2.0 (Revision: 06a1f724497fd81c6a659131fda822c9e5085b6c)
DB Connection URL: jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true&characterEncoding=UTF-8&characterSetResults=UTF-8&serverTimezone=UTC
DB User: openfire@localhost
Transaction Support: Yes
Transaction Isolation Level: TRANSACTION_READ_COMMITTED
Supports multiple connections open at once: Yes
In read-only mode: No


User openfire@localhost has all privileges granted on openfire database.
How to make this work?

There are errors in the log file:

2024.01.28 21:14:54.785 ERROR [Jetty-QTP-AdminConsole-5163]: org.jivesoftware.openfire.group.DefaultGroupPropertyMap - Data truncation: Incorrect string value: '\xD0\x98\xD0\xA2' for column `openfire`.`ofGroupProp`.`groupName` at row 1
com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect string value: '\xD0\x98\xD0\xA2' for column `openfire`.`ofGroupProp`.`groupName` at row 1 

2024.01.28 21:14:54.801 ERROR [Jetty-QTP-AdminConsole-5163]: org.jivesoftware.openfire.group.AbstractGroupProvider - Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='
java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='

2024.01.28 21:14:54.802 ERROR [Jetty-QTP-AdminConsole-5163]: org.jivesoftware.openfire.event.GroupEventDispatcher - Cannot invoke "String.equals(Object)" because "currentValue" is null
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "currentValue" is null

There is a warn too:

2024.01.28 21:14:54.826 WARN [Jetty-QTP-AdminConsole-5163]: org.jivesoftware.openfire.security.DefaultSecurityAuditProvider - Error trying to insert a new row in ofSecurityAuditLog:
com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect string value: '\xD0\x98\xD0\xA2' for column `openfire`.`ofSecurityAuditLog`.`summary` at row 1