I am having trouble connecting to Openfire (which I installed on my computer) when using Smack.
ConnectionConfiguration config = new ConnectionConfiguration("shin-pc" ,5222); config.setCompressionEnabled(true); config.setSASLAuthenticationEnabled(true); XMPPConnection connection = new XMPPConnection(config); connection.connect(); connection.login("test", "test");
When I try to debug or run, there is some error in the connect() .
Connection of XMPPError to localhost: 5222 .: remote-server-error (502) Connection of XMPPError to localhost: 5222. - called: java.net.SocketException: Permission denied.
I tried switching the hostname to "localhost", and it didnโt work either.
I have no experience in this XMPP business, so I assume this is a general problem for newbies or something like that ...
What could be the problem? How can I fix this so that the connection is successful?
source share