News:

  • April 29, 2026, 04:41:54 AM

Login with username, password and session length

Author Topic: Modbus Port Forward Fails  (Read 12908 times)

Bolt

  • Hero Member
  • *****
  • Posts: 594
Modbus Port Forward Fails
« on: February 06, 2025, 12:49:52 PM »
I have a BRX behind a StrideLinx VPN router with port forwarding on 502 enabled. This allows devices on customer's LAN to access the BRX via Modbus TCP. This morning, it stopped working from all devices. Test-NetConnection [ip address] -p 502 showed failed. -p 80 did work. Have another StrideLinx at same site, it passes the Test-NetConnection on port 502. Rebooted the router, no difference. Rebooted the BRX, everything goes back to working. PLC had been powered up for about 82 days with no issues. Anything I can check in the BRX's registers to help troubleshoot? If not, what about next time before rebooting?

Bolt

  • Hero Member
  • *****
  • Posts: 594
Re: Modbus Port Forward Fails
« Reply #1 on: February 06, 2025, 12:55:15 PM »
I guess I probably should have checked ModbusTCPServer.ActiveSessions? The system is set to a max of 16 connections, 1800 seconds timeout. OS is 2.9.5.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Modbus Port Forward Fails
« Reply #2 on: February 06, 2025, 03:56:20 PM »
I don't think the best diags are in that firmware version. If you were to update to 2.10.x and this happens again, there are definitely some things we'd love to see.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 594
Re: Modbus Port Forward Fails
« Reply #3 on: February 07, 2025, 01:49:18 PM »
Okay, I will update when the opportunity arises. Do you have a list of registers I should check before triggering the REBOOT instruction next time?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Modbus Port Forward Fails
« Reply #4 on: February 07, 2025, 02:19:28 PM »
Okay, I will update when the opportunity arises. Do you have a list of registers I should check before triggering the REBOOT instruction next time?

There are two bits, ST300 and ST301, that trigger diagnostic dumps. ST300 dumps info about the network packet frames in use. The critical data gets dumped to a long range of DSTs. DST98 and DST99 contain the number of frames currently in use, DST100-DST199 contains a table that is a distillation of the types, source/dest ports, and counts of everything in the stack. DST200 contains the raw contents of one of the frames, but I don't recall the details of it. Generally the best things to do is create a data view with ST300, DST98 and DST99 in decimal, and DST100-DST1?? in hex. Enabling DST300 will start dumping.

DST301 just dumps some resource usage info, memory stuff and socket counts, into DST200-DST205. Viewing that in decimal is easiest.

I'll tend to check ST301 first, then do the network dump ST300. Since they share some registers, you can't do both at the same time.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO