Spark Disconnects

I wouldn’t change default values unless they should help with a specific problem. I don’t think you need to change anything with such low number of users.

Haven’t seen such error yet. Are you putting server’s IP address into Spark’s domain window? Do you have 5222 port opened on the server?

Yes, 5222 port is opened, in Spark’s domain window i put DNS-address. I don’t think this could be the reason of problem… What means this error?

2016.11.15 16:38:08 org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x000005E2: nio socket, server, /192.100.100.221:1532 => 0.0.0.0/0.0.0.0:5222)

I don’t know what this error means, but in the other log it shows that it can’t process dns lookup. Are you able to ping that dns name from the client’s pc?

Yes, the dns address is pinged from the local network but Internet is unavailable, even though the client connects, clients can connect from the Internet. The problem is that the Spark hangs for a couple seconds and then reconnects for 11 seconds. Replacing the dns addresses on the ip address does not solve the problem. There is a new error:

2016.11.16 08:51:43 org.jivesoftware.openfire.net.SocketUtil - Unable to create a socket connection to XMPP domain ‘***’ using remote host: ***:5269. Cause: *** (a full stacktrace is logged on debug level)
2016.11.16 08:51:43 org.jivesoftware.openfire.net.SocketUtil - Unable to create a socket connection to XMPP domain ‘***’: Unable to connect to any of its remote hosts.
2016.11.16 08:51:43 org.jivesoftware.openfire.session.LocalOutgoingServerSession[Authenticate local domain: ‘ubuntu’ to remote domain: ‘***’] - Unable to authenticate: Fail to create new session.

2016.11.16 08:51:43 org.jivesoftware.openfire.session.LocalOutgoingServerSession[Create outgoing session for: ubuntu to ***] - Unable to create new session: Cannot create a plain socket connection with any applicable remote host

Yes, the dns address is pinged from the local network but Internet is unavailable, even though the client connects, clients can connect from the Internet.

Do you mean that clients can connect on the local network, but cannot connect from the outside (from the internet)?

Is ‘ubuntu’ your server’s name? Are you putting ‘ubuntu’ into Domain field to connect? This might work in a local network, but that’s not a proper domain for internet (should be something like example.com, or chat.example.com). Using external IP could work (if you have 5222 port opened in your firewall/router and forwarded it to the machine running your server). Then you should put ubuntu as Domain and on the Advanced settings page put IP as a host.

But i don’t understand why 5269 port is mentioned in the log. This is a server to server port. You should explain better your setup and what you are trying to achieve…

Do you mean that clients can connect on the local network, but cannot connect from the outside (from the internet)?

No,clients can connect on the LAN,and from the internet.

Is ‘ubuntu’ your server’s name? Are you putting ‘ubuntu’ into Domain field to connect? This might work in a local network, but that’s not a proper domain for internet (should be something like example.com, or chat.example.com). Using external IP could work (if you have 5222 port opened in your firewall/router and forwarded it to the machine running your server). Then you should put ubuntu as Domain and on the Advanced settings page put IP as a host.
Yes, ubuntu is the name server, but the domain I insert “jabber -******.ml” is a free domain that is registered to the external IP of our organization. clients connect,but the problem in permanent reconnects and freezes Spark.

But i don’t understand why 5269 port is mentioned in the log. This is a server to server port. You should explain better your setup and what you are trying to achieve…
Yes, ubuntu is the name server, but the domain I insert “jabber -******.ml” is a free domain that is registered to the external IP of our organization. clients connect,but the problem in permanent reconnects and freezes spark . can openfire disconnects or cannot connect to DNS server?

P.S. I have a new errors…

2016.11.17 10:27:55 org.jivesoftware.openfire.net.SocketReader - Closing session due to incorrect hostname in stream header. Host: jabber.kalina. Connection: org.jivesoftware.openfire.net.SocketConnection@4d5df7b1 socket: Socket[addr=/127.0.0.1,port=43680,localport=5269] session: null

2016.11.17 10:27:55 org.jivesoftware.openfire.net.SocketReader - Closing session due to incorrect hostname in stream header. Host: jabber.kalina. Connection: org.jivesoftware.openfire.net.SocketConnection@43c3d64c socket: Socket[addr=/127.0.0.1,port=43682,localport=5269] session: null

2016.11.17 10:27:55 org.jivesoftware.openfire.server.ServerDialback[Acting as Originating Server: Create Outgoing Session from: ubuntu to RS at: jabber.kalina (port: 5269)] - Unable to create a new outgoing session

2016.11.17 10:27:55 org.jivesoftware.openfire.session.LocalOutgoingServerSession[Create outgoing session for: ubuntu to jabber.kalina] - Unable to create a new session: Dialback (as a fallback) failed.

2016.11.17 10:27:55 org.jivesoftware.openfire.session.LocalOutgoingServerSession[Authenticate local domain: ‘ubuntu’ to remote domain: ‘jabber.kalina’] - Unable to authenticate: Fail to create new session.

jabber.kalina is the wrong name!

There was one problem. Clients are disconnected, and then warn.log error appears:

2016.11.17 16:30:16 org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x00001D24: nio socket, server, /192.100.100.221:1205 => 0.0.0.0/0.0.0.0:5222)
org.apache.mina.core.write.WriteToClosedSessionException
at org.apache.mina.filter.ssl.SslFilter.exceptionCaught(SslFilter.java:544)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextExceptionCaught(D efaultIoFilterChain.java:461)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1100(DefaultIoFilt erChain.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.exceptionCaug ht(DefaultIoFilterChain.java:760)
at org.apache.mina.core.filterchain.IoFilterAdapter.exceptionCaught(IoFilterAdapte r.java:102)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextExceptionCaught(D efaultIoFilterChain.java:461)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireExceptionCaught(Defau ltIoFilterChain.java:451)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.clearWriteRequestQueue( AbstractPollingIoProcessor.java:646)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPolli ngIoProcessor.java:590)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeSessions(Abstract PollingIoProcessor.java:560)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$800(AbstractPoll ingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractP ollingIoProcessor.java:1132)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

okay…I will attach the log file,where the error occurs so many times…
warn.log.zip (6705 Bytes)

  1. On Admin Console Server Name is ubuntu? If this is not a production server yet, then rerun the setup and rename the server to jabber.domain.ml. Then go to TLS/SSL Certificates menu > Manage Store Contents and delete certificates for ubuntu. If your clients connect to jabber.domain.ml, then your server should have the same name. Of course, your users will then have usernames like user@jabber.domain.ml and not user@ubuntu.

  2. If you don’t want to rename the server, then as i have suggested before, put ubuntu into Domain field in Spark instead of jabber.domain.ml and on the Advanced menu put external IP as a host for external users and internal IP for internal users (maybe external IP will work for internals users also, not sure, maybe even just using ubuntu will work for internal users, if that name is resovable in the local network).

  3. Go to Server Settings > Server to Server and disable 5269 port if you don’t need it. It seems that your server is trying to make S2S connection with some jabber.kalina server (maybe that’s another Openfire server running in your network?).

OK,look… I reinstalled Ubuntu, installed the server again, gave him the domain name “jabber-***.ml”, in TLS/SSL Certificates only for “jabber-***.ml”. Replace the IP address yesterday had no effect, and disable S2S connections. And in the log anyway, today after reinstalling the error occurred:

2016.11.19 10:58:52 org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x00000041: nio socket, server, /192.100.100.221:1077 => 0.0.0.0/0.0.0.0:5222)
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:273)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:44)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoP rocessor.java:690)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPolling IoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPolling IoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPoll ingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractP ollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2016.11.19 10:58:52 org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x00000042: nio socket, server, /192.100.100.221:56863 => 0.0.0.0/0.0.0.0:5222)
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:273)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:44)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoP rocessor.java:690)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPolling IoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPolling IoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPoll ingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractP ollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Are you using Java 7 on Ubuntu? This error looks similar to [OF-1116] Java 7 incompatibility - IgniteRealtime JIRA

The one in the ticket should be fixed in 4.0.3, but maybe that’s another error with Java 7. What Java does it show in Admin Console? If you are using Java 7, try switching to Java 8.

Java Version: 1.8.0_111 Oracle Corporation – Java HotSpot™ 64-Bit Server VM

could this be due to the fact that the server version is 4.0.2? But I’m afraid to update,because the server may be incompatible with the php settings…

I don’t think so.

The las message in warn.log:

2016.11.21 13:58:54 org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x0000030A: nio socket, server, /192.100.100.221:45329 => 0.0.0.0/0.0.0.0:5222)
java.io.IOException: Connection timed out
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:273)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:44)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoP rocessor.java:690)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPolling IoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPolling IoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPoll ingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractP ollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

connection timed out… the server resets the connection, all clients reconnecting, this happens with a different period of time. I don’t understand why this is happening…can a java programmer can answer this question?

I found out what is the cause of reconnection. When a user connects from Internet, all users who are already connected reconnecting! On the local users is not covered. The reason for this strange behavior of the server? Why it closes the connection after a new connection?

Anything logged in Openfire logs at that moment? When the outside client connects.

Recently been reconnecting customers in 06:22 CET. In the Openfire logs nothing, but at 06:37 the error occurred:

2016.11.25 14:37:37 org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x00000E3B: nio socket, server, /192.100.100.221:1492 => 0.0.0.0/0.0.0.0:5222)
java.io.IOException: Connection timed out

2016.11.25 11:03:57 org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x00000B94: nio socket, server, null => 0.0.0.0/0.0.0.0:5222)

org.apache.mina.core.write.WriteToClosedSessionException

and it was during the reconnection of all customers

These errors were already posted before, so nothing new here. I have no ideas why it disconnects your clients.

Are your users in AD?

no,the users are stored in MySQL database…

well… I installed it on a virtual machine Ubuntu 16.04.5,open fire 4.0.3, java version 8,default-jre-headless, and users still periodically disconnected) I noticed one feature when connecting a local user, or to turn them off (which is very rare) the other users are disconnected,and in the logs there is nothing

the problem is solved. The reason was that on the edge of the computer where Kerio,has been shut down clients that connect to the external IP address of the openfire

1 Like