Openfire Connecting Exception: remote-server-error(502) xmpperror connecting to 5222

北战南征 提交于 2019-12-12 04:36:18

问题


I working on chatApp. i am successfully implement xmpp chat using oenfire server past 2 month using asmack. but few hour ago i get below exception and till now i am unable to contact server.

192.168.0.1:5222 Exception: XMPPError connecting to 192.168.0.1:5222.; : remote-server-error(502)

i try to find solution on google, but not get any success,

below code using for contact openfire

ConnectionConfiguration connConfig = new ConnectionConfiguration(
                    Constants.TEST_HOST, Constants.PORT,
                    Constants.TEST_SERVICE);
            con = new XMPPConnection(connConfig);

            SASLAuthentication.supportSASLMechanism("PLAIN");
            connConfig.setSASLAuthenticationEnabled(true);
            con.connect();

how can i fix this problem. Thanks for help in advance


回答1:


After many research on this issue. i found to reason for this as above.

1. may be your firewall permissions not allow to connect sever.

2. may your socket setting or ip of server is change.

In my case- i restart my server. and remove firewall setting. Its resolved my problem

so please check your sever socket setting, server ip address and firewall permissions.

and also make sure that server with port 5222 (for device and 9090 for browser ) is always enable.



来源:https://stackoverflow.com/questions/26754832/openfire-connecting-exception-remote-server-error502-xmpperror-connecting-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!