Smack over BOSH

Hi I am using Smack 4.2.4 for my android app and openfire 3.10.2 for the server. I was trying to setup BOSH connection but Smack gave me the error output below.

E/SmackConnection: SmackException: Timeout reached for the connection to null:0.
07-17 18:02:26.431 8500-8697/com.hj.circles W/System.err: org.jivesoftware.smack.SmackException: Timeout reached for the connection to null:0.
07-17 18:02:26.431 8500-8697/com.hj.circles W/System.err: at org.jivesoftware.smack.bosh.XMPPBOSHConnection.connectInternal(XMPPBOSHConnection.java:202)
07-17 18:02:26.431 8500-8697/com.hj.circles W/System.err: at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:383)
07-17 18:02:26.431 8500-8697/com.hj.circles W/System.err: at com.hj.circles.xmpp.SmackConnection.connect(SmackConnection.java:372)
07-17 18:02:26.431 8500-8697/com.hj.circles W/System.err: at com.hj.circles.xmpp.SmackConnection.run(SmackConnection.java:467)
07-17 18:02:26.431 8500-8697/com.hj.circles W/System.err: at android.os.Handler.handleCallback(Handler.java:815)
07-17 18:02:26.432 8500-8697/com.hj.circles W/System.err: at android.os.Handler.dispatchMessage(Handler.java:104)
07-17 18:02:26.432 8500-8697/com.hj.circles W/System.err: at android.os.Looper.loop(Looper.java:194)
07-17 18:02:26.432 8500-8697/com.hj.circles W/System.err: at android.os.HandlerThread.run(HandlerThread.java:61)

I have used bosh-test.jar provided by some fellow and the connection to my server seemed successful.

I don’t know what is wrong with my android code. I pasted the code snippet below for examination.
BOSHConfiguration.Builder builder = BOSHConfiguration.builder();
builder.setUsernameAndPassword(“username”,“password”)
.setFile("/http-bind/")
.setXmppDomain(“airjh.com”)
.setResource(“mobile”)
.setHostAddress(“airjh.com”)
.setPort(80)
.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)
.setDebuggerEnabled(true);
mSmackConnection = new XMPPBOSHConnection(builder.build());

Hope someone could figure this problem out.

Maybe the port (or server) is incorrect. In your snippet it’s 7070, in your code its 80.

The bosh-test.jar I used to connect to my server is via port 80. And it worked. Thanks anyway.

Anyone knows how to solve this problem?

Does anyone knows any ideas about this problem?