powered by Jive Software

Spark 2.8.3 Openfire 4.1.1 connection errors

Running on Windows 10. I had trouble with the original Spark 2.7. There are some 50 users. I’m not sure what version of Spark they use. I installed Openfire 4.1.1 on a different server. I installed Spark 2.8.3 on my computer. I was getting an error about certificates so I checked “accept all certificates”. Now I’m getting “unknown connection error. Please check the log file”. But the log file is empty. It shouldn’t be this hard.

Logs are stored here C:\Users\User\AppData\Roaming\Spark\logs

Is your server on a different machine than Spark? What is your server’s name and what do you put into domain field on Spark’s login screen?

Yes, the log file is at that location. It’s empty. To log in I use the username and IP address (port 5222). The domain is blank. But, there is a new wrinkle. I hadn’t noticed before. If the domain is blank the login link is disabled.

Domain part can’t be empty. I suppose you put IP in the Advanced menu? What is you Openfire server’s name (XMPP Domain Name: in Admin Console)? You should put that into Domain field.

I put the domain name in and got “unknown connection error. Please check the log file”. I went into advanced and unchecked “accept all certificates”. Now I’m getting “unable to view certificate”. But the log file is not empty. I rechedked the “accept all certificates” box.

2017.02.02 23:05:08 org.jivesoftware.openfire.FlashCrossDomainHandler - Could not listen on port: 5229

java.net.BindException: Address already in use: JVM_Bind

at java.net.DualStackPlainSocketImpl.bind0(Native Method)

at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)

at java.net.AbstractPlainSocketImpl.bind(Unknown Source)

at java.net.PlainSocketImpl.bind(Unknown Source)

at java.net.ServerSocket.bind(Unknown Source)

at java.net.ServerSocket.(Unknown Source)

at org.jivesoftware.openfire.FlashCrossDomainHandler.startServer(FlashCrossDomainH andler.java:102)

at org.jivesoftware.openfire.FlashCrossDomainHandler.access$000(FlashCrossDomainHa ndler.java:36)

at org.jivesoftware.openfire.FlashCrossDomainHandler$1.run(FlashCrossDomainHandler .java:59)

at java.lang.Thread.run(Unknown Source)

2017.02.02 23:05:18 org.jivesoftware.openfire.spi.MINAConnectionAcceptor[socket_c2s] - Error starting: 5222

java.net.BindException: Address already in use: bind

at sun.nio.ch.Net.bind0(Native Method)

at sun.nio.ch.Net.bind(Unknown Source)

at sun.nio.ch.Net.bind(Unknown Source)

at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)

at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)

at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.j ava:198)

at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.j ava:51)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor.registerHandles(Abstract PollingIoAcceptor.java:547)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor.access$400(AbstractPolli ngIoAcceptor.java:68)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.run(AbstractPol lingIoAcceptor.java:422)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

2017.02.02 23:05:19 org.jivesoftware.openfire.spi.MINAConnectionAcceptor[socket_c2s_ssl] - Error starting: 5223

java.net.BindException: Address already in use: bind

at sun.nio.ch.Net.bind0(Native Method)

at sun.nio.ch.Net.bind(Unknown Source)

at sun.nio.ch.Net.bind(Unknown Source)

at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)

at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)

at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.j ava:198)

at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.j ava:51)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor.registerHandles(Abstract PollingIoAcceptor.java:547)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor.access$400(AbstractPolli ngIoAcceptor.java:68)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.run(AbstractPol lingIoAcceptor.java:422)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

2017.02.02 23:05:19 org.jivesoftware.openfire.spi.LegacyConnectionAcceptor - Error starting: 5269

java.net.BindException: Address already in use: JVM_Bind

at java.net.DualStackPlainSocketImpl.bind0(Native Method)

at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)

at java.net.AbstractPlainSocketImpl.bind(Unknown Source)

at java.net.PlainSocketImpl.bind(Unknown Source)

at java.net.ServerSocket.bind(Unknown Source)

at java.net.ServerSocket.(Unknown Source)

at org.jivesoftware.openfire.net.BlockingAcceptingMode.(BlockingAcceptingMod e.java:47)

at org.jivesoftware.openfire.net.SocketAcceptThread.(SocketAcceptThread.java :58)

at org.jivesoftware.openfire.spi.LegacyConnectionAcceptor.start(LegacyConnectionAc ceptor.java:53)

at org.jivesoftware.openfire.spi.ConnectionListener.start(ConnectionListener.java: 217)

at org.jivesoftware.openfire.spi.ConnectionManagerImpl.startListeners(ConnectionMa nagerImpl.java:303)

at org.jivesoftware.openfire.spi.ConnectionManagerImpl.access$100(ConnectionManage rImpl.java:51)

at org.jivesoftware.openfire.spi.ConnectionManagerImpl$1.pluginsMonitored(Connecti onManagerImpl.java:292)

at org.jivesoftware.openfire.container.PluginManager.firePluginsMonitored(PluginMa nager.java:1042)

at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor .java:323)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.runAndReset(Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301 (Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknow n Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

That’s error log for Openfire? It seems that your 5222 port (and others) are already in use by some other program, that’s why clients can’t connect to it. Maybe you have two instances of Openfire running and fighting for that port. Reboot the server and check with some app like netstat or TCPview what is using those ports.

These are the log entries from the Openfire server for today:

2017.02.04 19:22:39 org.jivesoftware.openfire.FlashCrossDomainHandler - Could not listen on port: 5229

java.net.BindException: Address already in use: JVM_Bind

at java.net.DualStackPlainSocketImpl.bind0(Native Method)

at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)

at java.net.AbstractPlainSocketImpl.bind(Unknown Source)

at java.net.PlainSocketImpl.bind(Unknown Source)

at java.net.ServerSocket.bind(Unknown Source)

at java.net.ServerSocket.(Unknown Source)

at org.jivesoftware.openfire.FlashCrossDomainHandler.startServer(FlashCrossDomainH andler.java:102)

at org.jivesoftware.openfire.FlashCrossDomainHandler.access$000(FlashCrossDomainHa ndler.java:36)

at org.jivesoftware.openfire.FlashCrossDomainHandler$1.run(FlashCrossDomainHandler .java:59)

at java.lang.Thread.run(Unknown Source)

2017.02.04 19:23:04 org.jivesoftware.openfire.spi.MINAConnectionAcceptor[socket_c2s] - Error starting: 5222

java.net.BindException: Address already in use: bind

at sun.nio.ch.Net.bind0(Native Method)

at sun.nio.ch.Net.bind(Unknown Source)

at sun.nio.ch.Net.bind(Unknown Source)

at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)

at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)

at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.j ava:198)

at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.j ava:51)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor.registerHandles(Abstract PollingIoAcceptor.java:547)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor.access$400(AbstractPolli ngIoAcceptor.java:68)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.run(AbstractPol lingIoAcceptor.java:422)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

2017.02.04 19:23:04 org.jivesoftware.openfire.spi.MINAConnectionAcceptor[socket_c2s_ssl] - Error starting: 5223

java.net.BindException: Address already in use: bind

at sun.nio.ch.Net.bind0(Native Method)

at sun.nio.ch.Net.bind(Unknown Source)

at sun.nio.ch.Net.bind(Unknown Source)

at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)

at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)

at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.j ava:198)

at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.j ava:51)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor.registerHandles(Abstract PollingIoAcceptor.java:547)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor.access$400(AbstractPolli ngIoAcceptor.java:68)

at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.run(AbstractPol lingIoAcceptor.java:422)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

2017.02.04 19:23:04 org.jivesoftware.openfire.spi.LegacyConnectionAcceptor - Error starting: 5269

java.net.BindException: Address already in use: JVM_Bind

at java.net.DualStackPlainSocketImpl.bind0(Native Method)

at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)

at java.net.AbstractPlainSocketImpl.bind(Unknown Source)

at java.net.PlainSocketImpl.bind(Unknown Source)

at java.net.ServerSocket.bind(Unknown Source)

at java.net.ServerSocket.(Unknown Source)

at org.jivesoftware.openfire.net.BlockingAcceptingMode.(BlockingAcceptingMod e.java:47)

at org.jivesoftware.openfire.net.SocketAcceptThread.(SocketAcceptThread.java :58)

at org.jivesoftware.openfire.spi.LegacyConnectionAcceptor.start(LegacyConnectionAc ceptor.java:53)

at org.jivesoftware.openfire.spi.ConnectionListener.start(ConnectionListener.java: 217)

at org.jivesoftware.openfire.spi.ConnectionManagerImpl.startListeners(ConnectionMa nagerImpl.java:303)

at org.jivesoftware.openfire.spi.ConnectionManagerImpl.access$100(ConnectionManage rImpl.java:51)

at org.jivesoftware.openfire.spi.ConnectionManagerImpl$1.pluginsMonitored(Connecti onManagerImpl.java:292)

at org.jivesoftware.openfire.container.PluginManager.firePluginsMonitored(PluginMa nager.java:1042)

at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor .java:323)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.runAndReset(Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301 (Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknow n Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Here is a screen shot from the log folder on the Spark client machine"

Nothing I can find is using 5222 on the server. The following is from a netstat on the client;

Active Connections

Proto Local Address Foreign Address State

TCP 10.251.32.110:56033 msnbot-65-52-108-185:https ESTABLISHED

TCP 10.251.32.110:56637 998.998.999.9:5222 CLOSE_WAIT

CORRECTION: The server shows 5222 used by im.exe

Also, I ran this on the client;

C:\WINDOWS\system32>telnet 998.998.999.99:5222

Connecting To 208.118.249.89:5222…Could not open connection to the host, on port 23: Connect failed

im.exe is not a part of Openfire. Maybe you were trying some other software before Openfire and it is left over and still running. Try getting rid of that im.exe process. Then delete Openfire logs (at Openfire\logs directory), delete all the Spark logs in its directory. Then start Openfire and try connecting with Spark. If it doesn’t work, then check Openfire logs and Spark logs (both error and warn).

Looked a little harder (TcpView) and found that Icewarp has a process im.exe using 5222. So I changed Openfire and Spark to use 8222 and everything is working just fine. Thank you for your help.

Good. Though, you said before, that you have 50 users. They will have to change the port also. Maybe it is easier to change the port in that other application (5222 is a standard for xmpp servers and clients).