# Kepserver Connection Reset

**URL:** <https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [January 12, 2024, 1:28pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187 "2024-01-12T13:28:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 12, 2024, 1:28pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/1 "2024-01-12T13:28:22Z")

</div>

Kepsever EX 6.15 and Ignition 8.1.33 Vision  
Kepserver Connection reset at more or less regular intervals ( 5 sec).  
I have never seen this before.

java.net.SocketException: Connection reset

at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(Unknown Source)

at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source)

at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:254)

at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)

at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357)

at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)

at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)

at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)

at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)

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

Where to look into at first?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 12, 2024, 1:41pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/2 "2024-01-12T13:41:27Z")

</div>

That's the kind of thing I'd expect from a "deep packet inspection" firewall. It sees a little bit of traffic, analyzes it, and kills it off.

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 12, 2024, 1:56pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/3 "2024-01-12T13:56:59Z")

</div>

I have turn off the Firewall for trial.  
Got the same logs (different numbers):

java.net.SocketException: Connection reset

at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(Unknown Source)

at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source)

at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:254)

at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)

at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357)

at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)

at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)

at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)

at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)

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

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 12, 2024, 2:18pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/4 "2024-01-12T14:18:41Z")

</div>

> [@d.vasilev](#):
>
> I have turn off the Firewall

I don't know of any operating system that **has** a deep packet inspection firewall, much less one you can turn off. Do you mean you got your IT group to ensure the path between your gateway and your OPC server has no such firewall?

You will likely need to perform a packet capture to see what else might be going on, but connection resets come from outside Ignition.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 12, 2024, 2:21pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/5 "2024-01-12T14:21:15Z")

</div>

> [@d.vasilev](#):
>
> I have turn off the Firewall for trial.

Is Kepware running on a different computer? Did you turn it off on that one?

This does look like a network or firewall issue.

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 12, 2024, 4:03pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/6 "2024-01-12T16:03:03Z")

</div>

Ignition and Kepserver run on the same machine.

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 12, 2024, 4:27pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/7 "2024-01-12T16:27:14Z")

</div>

Yes, I used IT department help. I guess it needs deeper packets investigation.

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 14, 2024, 12:48pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/8 "2024-01-14T12:48:23Z")

</div>

I collected Wireshark captures, however I cannot figure out what is the reason Kepserver to alterate its state "Faulted" to "Connected" to Ignition.  
Any opinion?  
[Ignition\_Kepserver\_Wireshark\_Capture.pcapng](https://forum.inductiveautomation.com/uploads/short-url/bl4ivQZ0ndu5RGzAgoPBBCB81Qt.pcapng) (5.0 MB)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 14, 2024, 1:20pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/9 "2024-01-14T13:20:08Z")

</div>

Is Kepware crashing or restarting?

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 14, 2024, 1:33pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/10 "2024-01-14T13:33:01Z")

</div>

If it was crashing, would it be able to reconnect? I do not really how to distinguish "Faulted" from crashing in this case.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 14, 2024, 1:40pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/11 "2024-01-14T13:40:22Z")

</div>

"Faulted" is just a term Ignition uses for a connection that was lost.

In the capture I can see you successfully connect, a couple seconds of traffic occurs (not sure what it is, you have security for the connection enabled), then Kepware abruptly closes the connection. The next few reconnect attempts fail immediately with TCP RST, then it eventually succeeds and this pattern repeats.

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 14, 2024, 1:44pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/12 "2024-01-14T13:44:33Z")

</div>

Yes, this is exactly what happens.  
In this moment, all machines are offline (it is 3:43 PM here, Sunday, no shifts), just one machine that uses Codesys 2.3 driver in Kepserver is online. The traffic you have seen, Kevin, is from that machine.  
Somethig important: if I use Quick Client in Kepserver, that machine never crashes, I was monitoring that all the morning, so Kepserver to the machine connection is not interrupted.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 14, 2024, 1:45pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/13 "2024-01-14T13:45:44Z")

</div>

I think you need to get in touch with Kepware support. I don't really have any idea what's going on and it doesn't look like a problem on the Ignition side.

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 14, 2024, 1:47pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/14 "2024-01-14T13:47:33Z")

</div>

I did, couple of times. Issue has not been resolved the last 2 years.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 14, 2024, 6:23pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/15 "2024-01-14T18:23:24Z")

</div>

Does Kepware not have its own logging action? Are there no clues there?

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 15, 2024, 6:40am UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/16 "2024-01-15T06:40:06Z")

</div>

@pturmel, I have tons of emails. Kepware assume it is Microsoft issue.  
Another assumption is related to Codesys 2.3 driver, if those 12 machines we have, connected by this driver, are disabled, the connection is stable and not interrupted.  
The PLCs are ELAU C400, kind of legacy already. Codesys V3 cannot be used for that PLC.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 15, 2024, 4:25pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/17 "2024-01-15T16:25:12Z")

</div>

Ah, yeah, that sounds like a Codesys problem. Sorry.

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 15, 2024, 4:29pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/18 "2024-01-15T16:29:53Z")

</div>

The problem starts after the weekend, after the machines have been stopped for more 24 hours. During normal week the connection is fine. So the question is why such connection cannot be re-established?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 15, 2024, 4:48pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/19 "2024-01-15T16:48:05Z")

</div>

> [@d.vasilev](#):
>
> is why such connection cannot be re-established?

Sounds like a Codesys problem. 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [January 15, 2024, 4:53pm UTC](https://forum.inductiveautomation.com/t/kepserver-connection-reset/84187/20 "2024-01-15T16:53:16Z")

</div>

I am thinking of restarting Kepserver Runtime service on timer.
