Ewon 2005CD disconnect proxy port after 1 hour connection


We have a ewon 2005CD firmware 11_2s2 that use a proxy port to forward port 502 Wan to port 502 Lan. After approx. 1h the port disconnects. After a few seconds it is possible to reconnect again until the next 1h. Without Ewon between the client and server application everything works fine. We already set parameter MaxCallDu to zero without result. There are no errors or warnings present in the logfiles. Any ideas?

Can you send us a backup.tar file of the device with support files included?

See attachment,

Regards, Jan


I think the issue may be the code that you have in the cyclic section. Can you try turning off the BASIC IDE section or move it into the Init section instead and see if it’s still getting that err- out of memory issue? I think this may be related to the disconnections/reboots

I will remove the complete Basic section and try again. The original Ewon with the issue, that is present at the customer, hasn’t that code onboard.

(We made a copy of the setup to a second Ewon to simulate / find the error at the office). The simulation took place at 17/12 and today. I will let you know the results.

Thanks for the update, I’ll keep an eye out for your response

Removing the complete basic section didn’t make any difference. After 1h (WAN / internet) connection the port was closed. Exactly 1h later the same. I shifted the port at the WAN side to 2790 instead of 502, but that also didn’t make any difference.

Can you send me another backup of the device so I can check if you’re getting any different errors now?

See attachment,

Note: Startup Ewon for test at 5/1/2021 12:46 ewon time. File Ewon3 change wanport 502 to 2790.

eWON2&SupFiles.tar (105 KB)

eWON3&SupFiles.tar (105 KB)

Can you try and upgrade the firmware on the device to 11.3 and see if that seems to help?

Updated to 11.3, no difference, every hour disconnects the port forwarding.

I’ll have to try and escalate this issue and see if the dev team has any other ideas for this one. Did this device work without any issues in the past and this just recently became an issue?

We didn’t use the proxy in past not really (only VPN function for service), but a new customer use the proxy function for permanent datalogging (Ewon as ‘firewall’ and sometimes remote VPN service).

So after complains of the customer we simulated the setup and found out that indeed every hour the connection disconnect.


Here’s what my colleague recommended:

It still has some empty line in cyclic section, it might be best to remove these lines as well.

But the worst point for me is: he is using port which could be in conflict with the port used by the eWON itself.

21, 80, 81, 502

Also may be it’s simply the Max socket number which are not enought, try to increase it.


I removed the empty lines and also removed all proxy entries except one entry that uses port 2790. Only one socket connection is active (1 client, 1 server)

The ports that Ewon uses are set to the default value. After 1h or multiples of the ethernet internet connection time, the connection is shutdown. (EwonScrSh.png)

Also included is a wireshark picture, which shows that there is suddenly a FIN command (port shutdown) is given at the Ewon side ( to the client (

Here’s what my colleague said, I think we may have a program that would help grab the wireshark capture but I’m waiting on him to give me more information on that program

"You have left the socket at 5, you can see it At 30

This PNG is not enough as it could be the device itself which close the link, can we have the wireshark pick on LAN side when the issue occurs?

This to see which of the eWON or the device close the link."

It turns out that the program we have won’t work on the older cd2005 devices so he was saying you’d need to use a PC with a hub on the LAN side and grab another capture if possible

I will try to take a wireshark log at the LAN side.

Thanks let me know what you find out

I have a wireshark log that has the Lan and Wan side together. Client Ewon Wan Ewon Lan Modbus server

At time 3220 there is silence at the LAN port, after 5 seconds silence the modbus server terminates the connection.

WS12012021_LANWANSel.pcapng (14.1 MB)