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


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.

<strong> Exception: XMPPError connecting to; : remote-server-error(502)</strong>

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.

<strong>1. may be your firewall permissions not allow to connect sever.</strong>

<strong>2. may your socket setting or ip of server is change.</strong>

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.


  • returns x with the n bits that begin at position p set to the rightmost n bits of y, leaving other b
  • How to specify the underlying type of an enum in Rust? [duplicate]
  • Integer construction variations
  • Calling a Method from Within a Ruby Class? (or is this rails magic)
  • java.io.EOFException: End of input at line 1 column 1
  • Difference of enum in C and Java
  • Some questions regarding Initialization Block in Java
  • getMeasuredHeight() returns 16777215 on Android 4.2.2
  • why '\\97' ascii value equals 55
  • QML ListElement pass list of strings
  • Salted Password Validation in PHP
  • How can I refer to a class from another project in the same Workspace in Eclipse/Java
  • android-NestDK stuck with pincode
  • GridBagLayout padding
  • How do CL commands build their exact parameter lists?
  • Controlling Prolog variable value selection
  • detecting connection lost in spark streaming
  • New-PSSession in an Azure-runbook (ARM)
  • qt how to know that a pushbutton is clicked?
  • Android mkdirs() sdcard do not work
  • Saving image to sd with current date and time in name doesn't work
  • Does Mobilefirst provide a provision to access web services directly?
  • Seeking advice on Jetty HttpClient Hang
  • Azure Cloud Service Web Role web pages do not load
  • Excel - Autoshape get it's name from cell (value)
  • Check if a string to interpolate provides expected placeholders
  • Google cloud sdk not working when python points python3
  • RestKit - RKRequestDelegate does not exist
  • Traverse Array and Display in markup
  • using HTMLImports.whenReady not working in chrome
  • Hits per day in Google Big Query
  • coudnt use logback because of log4j
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Linking SubReports Without LinkChild/LinkMaster
  • How can I remove ASP.NET Designer.cs files?
  • python draw pie shapes with colour filled
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • Is there any way to bind data to data.frame by some index?
  • How can i traverse a binary tree from right to left in java?
  • Android Heatmap on canvas or ImageView