gui*_*uik 8 openfire localhost smack
我有一个实现Smack 4.1.7的Java应用程序,我将其用作Openfire 4.0.2的模拟客户端.目前,Openfire正在我的localhost上运行.Smack可以使用此连接正确登录和验证:
XMPPTCPConnectionConfiguration conf = XMPPTCPConnectionConfiguration.builder()
.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)
.setServiceName(XMPP_HOST_NAME) // equals xmppDomain on server
.setUsernameAndPassword("user1", "pwd1")
.setResource("tester")
.setDebuggerEnabled(true)
.build();
Run Code Online (Sandbox Code Playgroud)
现在当Smack尝试创建或加入MUC时,请求超时(SmackException $ NoResponseException)和Openfire记录以下内容:
2016.07.03 18:58:54 org.jivesoftware.openfire.spi.RoutingTableImpl -
Unable to route packet. Packet should only be sent to available sessions and the
route is not available.
<presence id="WrkXH-6" from="user1@localhost/tester" to="user1@localhost/tester">
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.igniterealtime.org/projects/smack" ver="NfJ3flI83zSdUDzCEICtbypursw="/>
</presence>
2016.07.03 18:58:54 org.jivesoftware.openfire.spi.RoutingTableImpl -
Failed to route packet to JID: user1@localhost/tester packet:
<presence id="WrkXH-6" from="user1@localhost/tester" to="user1@localhost/tester">
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.igniterealtime.org/projects/smack" ver="NfJ3flI83zSdUDzCEICtbypursw="/>
</presence>
Run Code Online (Sandbox Code Playgroud)
我在服务器端和客户端都使用了"localhost","127.0.0.1"和我的机器名称作为XMPP_HOST_NAME,我不断收到同样的错误.任何帮助,将不胜感激.
我发现了问题和错误。如何处理:
Openfire 有 2 个值:
http.connection.timeout
http.socket.timeout
Run Code Online (Sandbox Code Playgroud)
如果属性中未提供,则两者都设置为默认值 2000/3000/5000 毫秒。
因此,需要通过管理控制台(或数据库)将此值设置为更高的值,例如 15000/20000 或更多(如果需要)。
此外,在 Openfire 4.0.2(也可能是旧版本)中,index.jsp中有一个调用来检查rssfeed(默认情况下启用),但此调用会将这些值重置为 3000,因此基本上超时将是无用的。
禁用 rssfeed 设置为false
rss.enabled
Run Code Online (Sandbox Code Playgroud)
然后重新启动Openfire。
| 归档时间: |
|
| 查看次数: |
571 次 |
| 最近记录: |