0
点赞
收藏
分享

微信扫一扫

XMPP/Smack/Openfire javax.net.ssl.SSLException: Received fatal alert: internal_e




在xmpp协议通信中,用smack框架登录非本地openfire服务器的时候,出现javax.net.ssl.SSLException: Received fatal alert: internal_error异常信息。原因是登录他网openfire服务器出现登录延时(在没有成功链接到openfire服务器),然后就进行登录login操作的时候,就会出现这个异常。

 

解决办法

1、在链接openfire服务器后,线程休眠一段时间,再进行登录login操作。
……
connection.connect();
Thread.sleep(3000);connection.login(user, pass);
……
 
2、设置setPacketReplyTimeout参数
......
SmackConfiguration.setPacketReplyTimeout(PACKET_REPLY_TIMEOUT);
config = new ConnectionConfiguration(SERVER, PORT);......
注意:如果设置了休眠时间或setPacketReplyTimeout参数后还是出现错误,请讲时间设置再大些看看

参考官方解答:http://community.igniterealtime.org/message/206443#206443

举报

相关推荐

0 条评论