Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

Open Fire Connection failed: Unable to resolve host in Live Server

$
0
0

I my Android chat application

 

I have configured to local server and its works perfectly, with following code:

 

private final String mServiceName="192.168.0.118";
private final String mHostName="192.168.0.118";
private final int mPort = 5222;

 

But when I Change to Live Server, I am getting following error:

 

private final String mServiceName="example.com";

private final String mHostName="domain.example.com";

private final int mPort = 5222;

 

Log

org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: 'racoalert.tiatechusa.com:5222' failed because java.net.SocketTimeoutException: failed to connect to domain.example.com/198.0.111.216 (port 5222) after 30000ms

 

Code to connect to server is given below:

 

XMPPTCPConnectionConfiguration.Builder builder = XMPPTCPConnectionConfiguration.builder();

builder.setServiceName(mServiceName);

builder.setPort(mPort);

builder.setHost(mHostName);

builder.setDebuggerEnabled(true);

builder.setSendPresence(true);

builder.setResource(SampleApp.getDeviceID());

builder.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);


Viewing all articles
Browse latest Browse all 4979

Trending Articles