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
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.