IMD SolutionComputing LibraryShop main store

Troubleshooting

CODESYS Edge Gateway unreachable after reboot while runtime runs

Remote access and virtualization Published 5 min read By IMD Solution engineering team

Short answer

When CODESYS Edge Gateway drops from green to red after a reboot while the runtime and local visualization still work, treat the gateway registration and network path separately from the controller application. Re-registering the Edge Gateway with the CODESYS Remote Automation Server from a local engineering workstation restores remote access when the local runtime remains healthy.

A workstation monitor showing a scan of reachable devices with one on another subnet, cabled to a compact PLC on a DIN rail
On this page
  1. Confirm surviving paths before changing settings
  2. Separate process state from gateway reachability
  3. Trace each hop along the engineering route
  4. Restore access via the remote automation server
  5. Isolate kernel serial log errors
  6. Worked example and decision by case
  7. Questions asked

When a CODESYS Edge Gateway shows unreachable after a reboot while the controller runtime and local web visualization keep running, isolate the gateway registration and network path from the control application first. Connecting the Edge Gateway to the CODESYS Remote Automation Server from an onsite engineering workstation restores remote access when the local runtime and transport path are healthy.

Keep the scope of this guidance clear: for Edge Gateways prior to version 3.5.21.0, remote TCP communication behavior is tied to the LocalAddress setting under [CmpGwCommDrvTcp] in Gateway.cfg, where 127.0.0.1 limits local access, a specific adapter address binds one interface, and 0.0.0.0 allows remote access, as documented in the CODESYS Security Advisory 2025-02 documentation. Separation of control networks behind a firewall and user management with strong passwords are part of that same advisory baseline. If you run into subnet routing or VPN path questions on adjacent gateways, see how a VPN gateway on a controller routes you to the machine LAN or site-to-site VPN up but the SCADA PC cannot reach the remote PLC. When a compact box computer in a cabinet needs replacement rather than a software fix, you can evaluate an industrial mini PC as a hardware fallback.

Confirm surviving paths before changing settings #

Start by listing every path that still works after the reboot so you do not blame the whole node for a single broken route. A separate remote management agent or a local browser session to the web visualization proves the host and local visualization are alive, but neither proves that engineering traffic reaches the gateway or controller.

  • Out-of-band management path: Verify the node has power, Ethernet link status, and a reachable remote management session so you can inspect system state without driving to the line.
  • Local visualization path: Confirm the local browser session still loads the running visualization screen, which shows the local runtime and web endpoint are serving.
  • Engineering gateway path: Note whether the previously used gateway entry stays red or fails to resolve from the remote engineering workstation.
  • Network configuration baseline: Check the active network interface, IP address, subnet mask, default route, and DNS settings against commissioning records before editing gateway parameters.

Separate process state from gateway reachability #

A running background daemon is not the same as an active remote engineering route. The controller runtime can execute control logic normally while the gateway lacks an upstream connection or an active registration with the automation server.

  • Service and log check: Inspect the running status and startup messages of the runtime and edge gateway processes rather than assuming a running process means healthy upstream connectivity.
  • Clock alignment: Record current system time and timezone on the node so kernel and service timestamps line up with failed remote connection attempts.
  • Maintenance discipline: Avoid stopping or restarting the control runtime outside an approved maintenance window when machine operation depends on it.

Trace each hop along the engineering route #

Work through the connection chain step by step instead of guessing firewall or gateway faults from one end.

| Hop | What to check | Pass condition | | --- | --- | --- | --- | | Engineering client to gateway | Selected gateway target and address | Client connects to the intended gateway rather than a stale profile | | Node to automation server | Outbound reachability, name resolution, and port rules | Node can reach the automation server endpoint | | Automation server to gateway | Gateway registration and online state | Edge Gateway appears registered and connected on the server | | Gateway to runtime | Target runtime selection and session response | Engineering client reaches the runtime and application |

Restore access via the remote automation server #

When direct gateway reachability fails after a restart, re-establishing registration through the CODESYS Remote Automation Server from a local engineering workstation provides a clean recovery path.

  1. Open the node over the surviving management connection and confirm IP routing and DNS resolution to the automation server.
  2. Connect a workstation running licensed CODESYS software from the manufacturer or an authorized distributor to the local network.
  3. Inspect the current Edge Gateway configuration and server assignment before modifying settings.
  4. Follow the manufacturer's documented procedure to connect and register the Edge Gateway to the target CODESYS Remote Automation Server.
  5. Switch the remote engineering workstation to the automation server gateway and verify a live connection to the controller runtime.

Isolate kernel serial log errors #

If serial errors appear in the kernel log after the reboot, treat them as a separate diagnostic track unless field I/O or serial communications show a fault. Do not alter serial port settings solely because log lines appeared during the same restart window.

  • Capture full log context: Save the complete kernel log lines around boot and the failed gateway attempt, keeping boot-relative and wall-clock timestamps clear.
  • Compare against baseline: Diff the post-reboot log against a known good startup log to spot new driver, interface, or timing messages.
  • Check field I/O separately: Verify module and serial I/O behavior in the application and hardware diagnostics so real field faults are not masked or misdiagnosed.
  • Collect support diagnostics: Generate an SOS report before further changes overwrite logs if the cause remains unclear after gateway recovery.

Worked example and decision by case #

Suppose a reboot at 08:15:00 leaves the local visualization reachable, the control runtime active, and the direct Edge Gateway entry red, while the remote management session stays up and the kernel log shows 12 serial error lines after boot compared with 0 lines at commissioning. The delta in serial log lines is 12 - 0 = 12 lines, and the number of working non-gateway checks is 2 out of 2 baseline checks (100% of checked local/management paths).

  • Direct gateway red, runtime and visualization healthy: Re-register the Edge Gateway with the CODESYS Remote Automation Server from an onsite workstation and connect through the automation server gateway.
  • Automation server route working, serial log errors still present: Keep the working remote engineering route, inspect field I/O and serial diagnostics separately, and gather an SOS report if unexplained serial errors continue.
  • Local network or server path broken: Fix IP address, routing, DNS, or firewall rules first before re-attempting gateway registration.

Questions asked

Does a green gateway indicator guarantee controller reachability?

No. A green status shows the gateway endpoint responds at that stage of the path, not that your engineering session reaches the target controller runtime or active application. Verify that you can open and monitor the intended controller after selecting the gateway.

Should you restart the controller runtime to fix a red Edge Gateway?

Do not restart the controller runtime unless an approved maintenance window allows interrupting machine operation. If the runtime and local visualization keep running, start by checking gateway service logs and registering the Edge Gateway with the remote automation server.

How do you handle kernel serial errors alongside a gateway outage?

Preserve the full kernel log entries around boot and the gateway failure with both boot-relative and wall-clock timestamps before changing any serial settings. Check field I/O behavior separately, and generate an SOS report if the errors persist after gateway recovery.

Keep reading

  • Troubleshooting

    Why an edge PC freezes when telemetry stops but CPU is low

    When telemetry stops while CPU stays low and the local console is frozen, the edge PC is running out of memory, not losing its network: in the reported installation a remote-access agent (TeamViewer) grew resident memory until the system locked. Stop and disable that service with systemctl, confirm the htop trend stays flat, then fix the two ports that share one subnet and one gateway.

    Edge computing and IIoT

  • Troubleshooting

    Edge gateway shows offline: check the 3.5.16 requirement

    An edge gateway that flipped from green to offline most likely sits on 3.5.15 while the Automation Server lists Edge Gateway 3.5.16.0 or higher as the runtime system requirement. Read the installed version first, then remove and re-add the gateway, replace it through the service tool, update to 3.5.16.0 or higher, and escalate through a CODESYS Store support question if it stays red.

    Edge computing and IIoT

  • Troubleshooting

    Error 21609 after relay.ewon.biz shutdown: fix Ewon mail alarms

    Error 21609 is not a fault in your Ewon configuration: the relay.ewon.biz SMTP server was shut down in mid-June 2020. Point the Ewon at relay.talk2m.com and link it to a Talk2M account in eCatcher. If the new server returns error 21703, the account link or the Ewon's socket path is missing; sms.talk2m.com is closed too, so text alerts need a separate email-to-SMS service or a GETHTTP call.

    Remote access and virtualization