tags:

views:

417

answers:

4

Hi,

I'm trying to establish a connection to an XMPP server using smack.

ConnectionConfiguration cf = new ConnectionConfiguration("jabber.ccc.de");
cf.setTruststorePassword("changeme");
this.connection = new XMPPConnection(cf);
this.connection.connect();
this.connection.login("user", "password");

But whenever logging in I get an XMPPException (No response from the server.: ) and the socket gets closed.

Any ideas what's going wrong here?

Regards

A: 

Have you tried seeing what the actual XMPP data being sent to/from the server is?

Try adding this to your code at startup:

System.setProperty("smack.debugEnabled", "true");
XMPPConnection.DEBUG_ENABLED = true;
Christopher
Thanks, the server on the other side seems to act weird. I just set up my own Openfire server like sfussenegger suggested. I consider this Problem as solved now.Regards
raichoo
A: 

This problem was addressed by a person called Davanum; see the following link : http://davanum.wordpress.com/2007/12/31/android-just-use-smack-api-for-xmpp/

The problem is : you are behind a slow internet connection. You need to increase time out for packet reply in smack config.

Strangely, you can get this problem, only the first time, after a boot of the client system (windows).

Pilla Gurumurty Patrudu
A: 

Try this one.

ConnectionConfiguration cf = new ConnectionConfiguration("jabber.ccc.de",5222, "test");
cf.setTruststorePassword("changeme");
this.connection = new XMPPConnection(cf);
this.connection.connect();
this.connection.login("user", "password");
Pujan Srivastava