I am just getting started with smack with openfire, but am having some really annoying, undebuggable issues.
When running two clients on the same machine (and same as the openfire server) I can get things to work. However, when I move one of the clients to another machine, even though I have opened all the necessary ports in the firewall, I cannot for the life of me login. Instead, I get this:
No response from the server.:
at org.jivesoftware.smack.SASLAuthentication.bindResourceAndEstablishSession(SASLA uthentication.java:324)
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 214)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:341)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:301)
at com.ootunes.icry.Connect.login(Connect.java:93)
at com.ootunes.icry.Record.listen(Record.java:239)
at com.ootunes.icry.Record.main(Record.java:231)
So, naturally, I turn to the debugger. Well, when I use the debugger, I don’t get the login issue, but I get another issue, namely, my MessageListener is not called when I receive a message!
Sure enough, turning debugging on somehow cancels the messagelistener, even though then I can see in the debugger that the message is being received!
So, to fix the above error, I am at a complete loss. I’ve tried turning off SASL, but I still get the same error above (yes, the SASLAuthentication ones!). I turned it off with this code:
ConnectionConfiguration config = new ConnectionConfiguration(server, 5222);
config.setSASLAuthenticationEnabled(false);
config.setSecurityMode(ConnectionConfiguration.SecurityMode.enabled);
and
connection = new XMPPConnection(config);
But nothing different happens. Nothing in the error log but debug log has this:
2008.06.26 01:23:04 NIOConnection: startTLS: using c2s
2008.06.26 01:23:07 AuthorizationManager: Trying Default Mapping.map(username)
2008.06.26 01:23:07 DefaultAuthorizationMapping: No realm found
2008.06.26 01:23:07 AuthorizationManager: Trying Default Policy.authorize(username , username)
2008.06.26 01:23:07 DefaultAuthorizationPolicy: Checking authenID realm
Please help!