I have an openfire server setted up on my local machine. I am trying to connect this server, but getting \"No response from server\" error. Not sure why?
I have spar
I have increased the reply timeout and it worked like charm.
SmackConfiguration.setPacketReplyTimeout(10000);
though not sure why I need to do so when the server is installed on the same machine.
Did you notice the error:
7-30 01:01:02.835: W/System.err(424): java.security.KeyStoreException: KeyStore jks implementation not found
07-30 01:01:02.835: W/System.err(424): at java.security.KeyStore.getInstance(KeyStore.java:134)
07-30 01:01:02.835: W/System.err(424): at org.jivesoftware.smack.ServerTrustManager.<init>(ServerTrustManager.java:61)
07-30 01:01:02.835: W/System.err(424): at org.jivesoftware.smack.XMPPConnection.proceedTLSReceived(XMPPConnection.java:839)
07-30 01:01:02.835: W/System.err(424): at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:268)
07-30 01:01:02.835: W/System.err(424): at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
07-30 01:01:02.835: W/System.err(424): at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:71)
make sure to fix the truststore implementation! If you are using aSmack for example with
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
connectionConfiguration.setTruststoreType("AndroidCAStore");
connectionConfiguration.setTruststorePassword(null);
connectionConfiguration.setTruststorePath(null);
} else {
connectionConfiguration.setTruststoreType("BKS");
String path = System.getProperty("javax.net.ssl.trustStore");
if (path == null)
path = System.getProperty("java.home") + File.separator + "etc"
+ File.separator + "security" + File.separator
+ "cacerts.bks";
connectionConfiguration.setTruststorePath(path);
}
Source