conflict
communication
auth_error
ai_generated
partial
<stream:error><conflict xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error>
ID: communication/xmpp-stream-error-conflict
80%修复率
84%置信度
1证据数
2024-02-28首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| RFC 6120 | active | — | — | — |
| Ejabberd 23.10 | active | — | — | — |
| Prosody 0.12 | active | — | — | — |
| Openfire 4.8 | active | — | — | — |
根因分析
XMPP服务器在第二个资源以相同优先级和资源名称绑定时,或用户账户被管理员禁用时,以冲突错误终止流。
English
XMPP server terminates a stream with a conflict error when a second resource binds with the same priority and resource name, or when the user's account is disabled by an admin.
官方文档
https://datatracker.ietf.org/doc/html/rfc6120#section-4.9.3解决方案
-
Set a unique resource name for each client connection. In the XMPP client, generate a random resource string (e.g., 'home-12345', 'mobile-abcde') instead of using a fixed name like 'client' or leaving it blank.
-
Check if the user account is disabled or banned on the server. On Ejabberd, run 'ejabberdctl check_account user@domain' and 'ejabberdctl ban_account user@domain' to verify status.
无效尝试
常见但无效的做法:
-
Disable all other XMPP clients for the same user
60% 失败
The conflict is caused by resource binding, not the number of clients; even two clients with different resource names can coexist
-
Restart the XMPP server to clear the conflict state
90% 失败
The conflict is a per-session issue; restarting the server does not prevent the client from reconnecting with the same resource name
-
Change the server's port from 5222 to 5223 (legacy SSL)
100% 失败
The port does not affect resource binding logic; the conflict error is stream-level, not transport-level