XMPP 服务器 Openfire 的 Emoji 支持问题

本文介绍了如何解决Openfire XMPP服务器在处理Emoji字符时出现的问题,并详细解释了修改MXParser.java文件的具体步骤。同时,还提供了在MySQL中存储Emoji字符所需的utf8mb4字符集配置方法。

在为领航信息开发 eMessage 支持的时候,我们曾使用著名的开源 XMPP 服务器软件 Openfire。但在使用中遇到了几个问题,并通过修改源代码将这些问题解决掉了。接下来的几篇文章,我会介绍一下这些问题并讲述是如何解决掉的。

先介绍一下背景。XMPP 是一个开放的即时通讯协议,非常不错,有很多开源软件实现了 XMPP 协议,Openfire 算是实现得比较全的,而且安装配置比较容易。其他比较流行的开源 XMPP 服务器还有 Tigase 和 ejabberd。我们现在已经切换到了 ejabberd 上,毕竟 WhatsApp 最初也使用的是 ejabberd 嘛,呵呵。读者如果有兴趣,我也可以跟大家讲讲这几个 XMPP 服务器的区别和潜在问题。

问题描述

Emoji 现在基本已经成为一种工业事实标准,最早在日本流行,由日本的 DoKoMo 等运营商支持,后来苹果在 iOS 中支持了这一技术,最终变得全世界流行起来。Emoji 使用了一些 UNICODE 字符集中尚未定义的码位来表示一个个的表情图案。和一般的字体不同,应用程序在遇到这些字符的时候,需要使用位图来显示对应的表情图标,而不是直接使用字体中定义的字型来显示(当然,也可以用字体来显示 Emoji 字符,比如某些 Linux 控制台就可以显示部分 Emoji 字符)。前者可以是彩色的,而后者只能是某个特定的颜色。所以,要显示 Emoji 就要在应用程序中做扩展,在输出这些特定字符的时候做特殊处理,将其用对应的表情位图显示出来。让客户端应用支持 Emoji 并不是很难的工作,Android 的短信应用不支持 Emoji,但支持预先定义的特定字符序列来表示特定的表情,比如将“:)”显示成笑脸。处理这种字符序列的方法和处理 Emoji 表情的方法本质上一样的。

在使用 Openfire 作为 XMPP 服务器,将表示 Emoji 的 UNICODE 字符发送给其他用户的时候,就会出现问题。问题的原因在于 Emoji 使用的 UNICODE 字符集码位尚未被 UNICODE 标准化组织标准化,而 Openfire 会将 Emoji 字符看成是不符合标准的字符而直接忽略掉或者干脆断开客户端的连接。因此,要解决这个问题,其实相当容易,通过搜索引擎可以很快找到了解决方案。

解决方案

在 Openfire 3.8.2 版本源代码术中,修改 openfire_src/src/java/org/jivesoftware/openfire/net 目录下的 MXParser.java 文件的最后一个函数:
        /**
         * Makes sure that each individual character is a valid XML character.
         * 
         * Note that when MXParser is being modified to handle multibyte chars correctly, this method needs to change (as
         * then, there are more codepoints to check).
         */
    @Override
    protected char more() throws IOException, XmlPullParserException {
        final char codePoint  = super.more(); // note - this does NOT return a codepoint now, but simply a (single byte) char
acter!
                if ((codePoint == 0x0) ||  // 0x0 is not allowed, but flash clients insist on sending this as the very first 
character of a stream. We should stop allowing this codepoint after the first byte has been parsed.
                                (codePoint == 0x9) ||
                                (codePoint == 0xA) ||
                                (codePoint == 0xD) ||
                                ((codePoint >= 0x20) && (codePoint <= 0xD7FF)) ||
                                ((codePoint >= 0xE000) && (codePoint <= 0xFFFD))) {
                         return codePoint;
                throw new XmlPullParserException("Illegal XML character: " + Integer.parseInt(codePoint+"", 16));
    }
先看看这个函数的作用。如注释所言,这个函数用来判定特定字符是否是一个合法的 XML 字符。XML 一般要求按照 UTF8 编码的方式存储和传输字符,在程序处理时,会直接转换成 UNICODE 的 UCS 形式,这样便于程序做处理。

在 Linux 控制台上运行 $ man utf8 命令,你可以迅速知悉 UNICODE 码位范围以及和 UTF-8 编码之间的对应关系:
       The following byte sequences are used to represent a character.  The sequence to be used depends on the  UCS  code
       number of the character:

       0x00000000 - 0x0000007F:
           0xxxxxxx

       0x00000080 - 0x000007FF:
           110xxxxx 10xxxxxx

       0x00000800 - 0x0000FFFF:
           1110xxxx 10xxxxxx 10xxxxxx

       0x00010000 - 0x001FFFFF:
           11110xxx 10xxxxxx 10xxxxxx 10xxxxxx

       0x00200000 - 0x03FFFFFF:
           111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx

       0x04000000 - 0x7FFFFFFF:
           1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx

从上面的对应关系就可以知悉,UNICODE 可能的码位(code point 或者 code number)最大可以到 0x7FFFFFFF!而 Openfire 判断是否为合法 XML 字符的范围只到 0xFFFD!显然,不能显示正确处理 Emoji 字符的原因是 Openfire 将用来表示 Emoji 字符的那些码位范围给当成非法 XML 字符了。一种比较简单粗暴的修改办法是:
        /**
         * Makes sure that each individual character is a valid XML character.
         * 
         * Note that when MXParser is being modified to handle multibyte chars correctly, this method needs to change (as
         * then, there are more codepoints to check).
         */
    @Override
    protected char more() throws IOException, XmlPullParserException {
        final char codePoint  = super.more(); // note - this does NOT return a codepoint now, but simply a (single byte) char
acter!
                if ((codePoint == 0x0) ||  // 0x0 is not allowed, but flash clients insist on sending this as the very first 
character of a stream. We should stop allowing this codepoint after the first byte has been parsed.
                                (codePoint == 0x9) ||
                                (codePoint == 0xA) ||
                                (codePoint == 0xD) ||
                                ((codePoint >= 0x20) && (codePoint <= 0xFFFD)) ||
                                ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF))) {
                        return codePoint;
                }

                throw new XmlPullParserException("Illegal XML character: " + Integer.parseInt(codePoint+"", 16));
    }
但马上有高手指出,这个方法太粗暴了,可能带来一些安全隐患(参见: http://community.igniterealtime.org/thread/48846),所以更加正确的方法是:

                if ((codePoint == 0x0) ||  // 0x0 is not allowed, but flash clients insist on sending this as the very first character of a stream. We should stop allowing this codepoint after the first byte has been parsed.
                               (codePoint == 0x9) ||
                               (codePoint == 0xA) ||
                               (codePoint == 0xD) ||
                               ((codePoint >= 0x20) && (codePoint <= 0xD7FF)) ||
                               ((codePoint >= 0xE000) && (codePoint <= 0xFFFD)) ||
                               ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF))) {
                               ((codePoint >= 0xE000) && (codePoint <= 0xFFFD))) {
                        validCodepoint = true;
                }
                else if (Character.isLowSurrogate(codePoint)) {
                        if (highSurrogateSeen) {
                                validCodepoint = true;
                        } else {
                                throw new XmlPullParserException("Low surrogate '0x " + String.format("%x", (int) codePoint) + " without preceeding high surrogate");
                        }
                }
                else if (Character.isHighSurrogate(codePoint)) {
                        highSurrogateSeen = true;
                        // Return here so that highSurrogateSeen is not reset
                        return codePoint;
                 }

                 if (validCodepoint)
	                        return codePoint;
	         throw new XmlPullParserException("Illegal XML character: " + Integer.parseInt(codePoint+"", 16));

有了上述修改,你的 Openfire 服务器就可以正确处理 Emoji 了。Openfire 最新的版本是 3.9.1,估计已经修改掉这个问题了吧,但本人未确认。

在 MySQL 中存储 Emoji 字符

没想到,为了在 MySQL 数据库中保存 Emoji 字符,需要使用 MySQL 5.5 以上版本引入的 utf8mb4 的字符集。原来 MySQL 的 utf8 字符集只支持编码为一个、两个字节或者三个字节的情形,也就是 UNICODE  UCS 编码范围为 0 到 0xFFFD 这种情形。要支持超过这个范围的 UTF8 编码字符,就需要使用 MySQL 5.5 中引入的 utf8mb4 字符集。从名字中可以看出,这个字符集专门用来支持单个 UNICODE 的 UTF8 编码长度达到四个字节的情形。当然,超过也许也是可以的。至于为什么不能直接用 utf8 编码来兼容这些字符,我就不知道了,也许是历史原因吧。

大家可以用“mysql utf8mb4”为关键词搜索一下就知道如何设置/配置 mysql 来支持这个字符集了。但是,要让 openfire 能够和 mysql 正确打交道,还需要升级一下 openfire 使用的 JAVA mysql 数据库连接器(connnector),要升级到最新的版本。否则,如果使用老的 mysql 数据库连接器,会出现无法理解 utf8mb4 字符集的情形。

吐槽一下,我实在是不能理解为什么 MySQL 要引入 utf8mb4 这个字符集,难不成将来还需要引入 utf8mb6、utf8mb8 这样的字符集不成?哪位大侠可以帮我解答这个疑惑?

后记

俺是不太喜欢 JAVA 语言的,至今未能使用 JAVA 语言完整编写过一个程序,这实在是本人二十多年码农生涯的一大遗憾,但打打补丁这事儿还是可以做做的。下一篇文章给大家介绍一个针对 Openfire 服务器在集群环境下处理 SOCKS5 代理的问题,就修改了几行代码,但解决了一个大问题。

敬请期待。

[root@yfw ~]# cd /opt/openfire [root@yfw openfire]# cd ~/openfire-plugin-build [root@yfw openfire-plugin-build]# rm -rf src/RestApiPlugin.java [root@yfw openfire-plugin-build]# mkdir -p src [root@yfw openfire-plugin-build]# cat > src/RestApiPlugin.java << 'EOF' > public class RestApiPlugin implements org.jivesoftware.openfire.container.Plugin { > > static { > System.out.println("[PLUGIN-DEBUG] 💡 静态块执行:RestApiPlugin 类已被 JVM 加载!"); ugin.class"));em.out.println("[PLUGIN-DEBUG] 📦 类资源位置: " + RestApiPlugin.class.getResource("RestApiPlu > } > > public RestApiPlugin() { > System.out.println("[PLUGIN-DEBUG] 🆕 构造函数执行:RestApiPlugin 实例已创建"); > } > > @Override > public void initializePlugin(org.jivesoftware.openfire.container.PluginManager manager, java.io.File pluginDirectory) { ath()); System.out.println("[PLUGIN-DEBUG] 🎉 插件初始化成功!插件目录: " + pluginDirectory.getAbsolutePa > } > > @Override > public void destroyPlugin() { > System.out.println("[PLUGIN-DEBUG] 🔌 插件已销毁"); > } > } > EOF [root@yfw openfire-plugin-build]# # 编译 [root@yfw openfire-plugin-build]# /usr/lib/jvm/java-11-openjdk/bin/javac \ > -source 11 -target 11 \ > -cp "/opt/openfire/lib/xmppserver-4.9.2.jar" \ > -d classes \ > src/RestApiPlugin.java [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# # 打包 [root@yfw openfire-plugin-build]# jar cf restapi.jar -C classes . [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# # 清除旧插件和缓存 [root@yfw openfire-plugin-build]# rm -rf /opt/openfire/plugins/restapi [root@yfw openfire-plugin-build]# rm -rf /opt/openfire/work/plugins/restapi* [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# # 部署 [root@yfw openfire-plugin-build]# mkdir -p /opt/openfire/plugins/restapi [root@yfw openfire-plugin-build]# cp restapi.jar /opt/openfire/plugins/restapi/ [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# # 写入 plugin.xml(确保没问题) [root@yfw openfire-plugin-build]# cat > /opt/openfire/plugins/restapi/plugin.xml << 'EOF' > <?xml version="1.0" encoding="UTF-8"?> > <plugin> > <className>RestApiPlugin</className> > <name>REST API Plugin</name> > <description>Simple REST API Plugin with Debug Logs</description> > <author>Admin</author> > <version>1.0.0</version> > <date>2025-10-03</date> > <minServerVersion>4.0.0</minServerVersion> > </plugin> > EOF [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# # 权限 [root@yfw openfire-plugin-build]# chown -R openfire:openfire /opt/openfire/plugins/restapi [root@yfw openfire-plugin-build]# chmod -R 755 /opt/openfire/plugins/restapi [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# # 重启 [root@yfw openfire-plugin-build]# systemctl restart openfire [root@yfw openfire-plugin-build]# [root@yfw openfire-plugin-build]# # 查看日志 [root@yfw openfire-plugin-build]# tail -f /opt/openfire/logs/openfire.log at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?] 2025.10.03 04:31:49.782 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Shutting down plugins ... 2025.10.03 04:31:49.782 INFO [Thread-2]: org.jivesoftware.openfire.container.PluginManager - Shutting down. Unloading all loaded plugins... 2025.10.03 04:31:49.789 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Shutting down 54 modules ... 2025.10.03 04:31:49.962 INFO [shutdown-thread-0]: org.jivesoftware.openfire.pubsub.DefaultPubSubPersistenceProvider - Flushing write cache to database 2025.10.03 04:31:49.966 INFO [shutdown-thread-0]: org.jivesoftware.openfire.OfflineMessageStore - Offline message cleaning - Stop old timer if started 2025.10.03 04:31:49.980 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Openfire stopped 2025.10.03 04:31:51.473 INFO [main]: org.jivesoftware.openfire.XMPPServer - Registering shutdown hook (standalone mode) 2025.10.03 04:31:52.088 INFO [main]: org.jivesoftware.util.cache.ConsistencyMonitor - Applying configuration for cache consistency check. Enabled: false 2025.10.03 04:31:52.110 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing Servers Cache 2025.10.03 04:31:52.112 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing Components Cache 2025.10.03 04:31:52.113 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing Users Cache 2025.10.03 04:31:52.113 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing AnonymousUsers Cache 2025.10.03 04:31:52.114 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing User Sessions 2025.10.03 04:31:52.118 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Roster 2025.10.03 04:31:52.121 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for RosterItems 2025.10.03 04:31:52.139 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing Result Listeners 2025.10.03 04:31:52.142 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Multicast Service 2025.10.03 04:31:52.147 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Offline Message Size 2025.10.03 04:31:52.150 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for VCard 2025.10.03 04:31:52.254 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Privacy Lists 2025.10.03 04:31:52.258 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for File Transfer Cache 2025.10.03 04:31:52.334 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Offline Presence Cache 2025.10.03 04:31:52.335 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Last Activity Cache 2025.10.03 04:31:52.339 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for User 2025.10.03 04:31:52.339 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Remote Users Existence 2025.10.03 04:31:52.352 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Components Sessions 2025.10.03 04:31:52.353 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Connection Managers Sessions 2025.10.03 04:31:52.353 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Incoming Server Session Info Cache 2025.10.03 04:31:52.353 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Sessions by Hostname 2025.10.03 04:31:52.353 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Client Session Info Cache 2025.10.03 04:31:52.355 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Directed Presences 2025.10.03 04:31:52.356 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created local-only cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for PEPServiceManager 2025.10.03 04:31:52.358 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for File Transfer 2025.10.03 04:31:52.361 INFO [main]: org.jivesoftware.openfire.pubsub.PubSubPersistenceProviderManager - Loading PubSub persistence provider: class org.jivesoftware.openfire.pubsub.CachingPubsubPersistenceProvider. 2025.10.03 04:31:52.363 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Published Items 2025.10.03 04:31:52.364 INFO [main]: org.jivesoftware.openfire.pubsub.CachingPubsubPersistenceProvider - Loading PubSub persistence provider to delegate to: class org.jivesoftware.openfire.pubsub.DefaultPubSubPersistenceProvider. 2025.10.03 04:31:52.368 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Default Node Configurations 2025.10.03 04:31:52.381 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Disco Server Features 2025.10.03 04:31:52.386 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Disco Server Items 2025.10.03 04:31:52.386 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Components 2025.10.03 04:31:52.612 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created local-only cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Entity Capabilities 2025.10.03 04:31:52.612 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created local-only cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Entity Capabilities Users 2025.10.03 04:31:52.662 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created local-only cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Group (Shared) Metadata Cache 2025.10.03 04:31:52.666 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Group 2025.10.03 04:31:52.667 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Group Metadata Cache 2025.10.03 04:31:52.700 INFO [main]: org.jivesoftware.openfire.pubsub.PubSubModule - 发布–订阅域:pubsub.localhost 2025.10.03 04:31:52.711 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for MUC Service Pings Sent 2025.10.03 04:31:52.713 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for MUC History 2025.10.03 04:31:52.717 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for MUC Service 'conference' Rooms 2025.10.03 04:31:52.717 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for MUC Service 'conference' Room Statistics 2025.10.03 04:31:52.723 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for MUC Service 'lobby' Rooms 2025.10.03 04:31:52.723 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for MUC Service 'lobby' Room Statistics 2025.10.03 04:31:52.733 INFO [main]: org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl - Rescheduling user idle task, recurring every PT15M 2025.10.03 04:31:52.738 INFO [main]: org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl - 多用户聊天域:conference.localhost 2025.10.03 04:31:52.757 INFO [main]: org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl - Rescheduling user idle task, recurring every PT15M 2025.10.03 04:31:52.759 INFO [main]: org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl - 多用户聊天域:lobby.localhost 2025.10.03 04:31:52.792 INFO [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - Plugin 'restapi' was removed from the file system. 2025.10.03 04:31:52.797 INFO [main]: org.jivesoftware.openfire.XMPPServer - Openfire 4.9.2 [2025年10月3日 上午4:31:52] 2025.10.03 04:31:52.794 ERROR [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - An unexpected exception occurred: java.lang.NullPointerException: null at org.jivesoftware.openfire.container.PluginManager.unloadPlugin(PluginManager.java:883) ~[xmppserver-4.9.2.jar:4.9.2] at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:305) [xmppserver-4.9.2.jar:4.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?] 2025.10.03 04:31:52.998 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for LDAP UserDN 2025.10.03 04:31:53.526 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'ANONYMOUS' SASL mechanism. 2025.10.03 04:31:53.526 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'CRAM-MD5' SASL mechanism. 2025.10.03 04:31:53.526 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'DIGEST-MD5' SASL mechanism. 2025.10.03 04:31:53.526 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'EXTERNAL' SASL mechanism. 2025.10.03 04:31:53.527 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'GSSAPI' SASL mechanism. 2025.10.03 04:31:53.527 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'JIVE-SHAREDSECRET' SASL mechanism. 2025.10.03 04:31:53.527 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'PLAIN' SASL mechanism. 2025.10.03 04:31:53.527 INFO [main]: org.jivesoftware.openfire.net.SASLAuthentication - Support added for the 'SCRAM-SHA-1' SASL mechanism. 2025.10.03 04:31:53.568 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Remote Server Configurations 2025.10.03 04:32:12.807 INFO [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - Plugin 'restapi' was removed from the file system. 2025.10.03 04:32:12.808 ERROR [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - An unexpected exception occurred: java.lang.NullPointerException: null at org.jivesoftware.openfire.container.PluginManager.unloadPlugin(PluginManager.java:883) ~[xmppserver-4.9.2.jar:4.9.2] at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:305) [xmppserver-4.9.2.jar:4.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?] 2025.10.03 04:32:32.810 INFO [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - Plugin 'restapi' was removed from the file system. 2025.10.03 04:32:32.810 ERROR [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - An unexpected exception occurred: java.lang.NullPointerException: null at org.jivesoftware.openfire.container.PluginManager.unloadPlugin(PluginManager.java:883) ~[xmppserver-4.9.2.jar:4.9.2] at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:305) [xmppserver-4.9.2.jar:4.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?] 2025.10.03 04:32:52.811 INFO [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - Plugin 'restapi' was removed from the file system. 2025.10.03 04:32:52.811 ERROR [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - An unexpected exception occurred: java.lang.NullPointerException: null at org.jivesoftware.openfire.container.PluginManager.unloadPlugin(PluginManager.java:883) ~[xmppserver-4.9.2.jar:4.9.2] at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:305) [xmppserver-4.9.2.jar:4.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?] 2025.10.03 04:33:12.813 INFO [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - Plugin 'restapi' was removed from the file system. 2025.10.03 04:33:12.813 ERROR [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - An unexpected exception occurred: java.lang.NullPointerException: null at org.jivesoftware.openfire.container.PluginManager.unloadPlugin(PluginManager.java:883) ~[xmppserver-4.9.2.jar:4.9.2] at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:305) [xmppserver-4.9.2.jar:4.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?] 2025.10.03 04:33:32.814 INFO [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - Plugin 'restapi' was removed from the file system. 2025.10.03 04:33:32.814 ERROR [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - An unexpected exception occurred: java.lang.NullPointerException: null at org.jivesoftware.openfire.container.PluginManager.unloadPlugin(PluginManager.java:883) ~[xmppserver-4.9.2.jar:4.9.2] at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:305) [xmppserver-4.9.2.jar:4.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?] 2025.10.03 04:33:52.816 INFO [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - Plugin 'restapi' was removed from the file system. 2025.10.03 04:33:52.816 ERROR [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - An unexpected exception occurred: java.lang.NullPointerException: null at org.jivesoftware.openfire.container.PluginManager.unloadPlugin(PluginManager.java:883) ~[xmppserver-4.9.2.jar:4.9.2] at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:305) [xmppserver-4.9.2.jar:4.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?] 2025.10.03 04:34:12.817 INFO [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - Plugin 'restapi' was removed from the file system. 2025.10.03 04:34:12.817 ERROR [PluginMonitorTask-2]: org.jivesoftware.openfire.container.PluginMonitor - An unexpected exception occurred: java.lang.NullPointerException: null at org.jivesoftware.openfire.container.PluginManager.unloadPlugin(PluginManager.java:883) ~[xmppserver-4.9.2.jar:4.9.2] at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:305) [xmppserver-4.9.2.jar:4.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?]
10-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值