OPC connection displays tags from the wrong OPC server

Hi,
I recently came across a really strange issue with one of my OPC connections (MACHINE01, fantasy name).

The OPC server endpoint is

opc.tcp://MACHINE01:4840

At some point, when browsing the tags of this connection from the Designer, I wasn’t seeing MACHINE01 tags anymore. Instead, I was actually seeing the ones from another OPC server I had connected (MACHINE02).

opc.tcp://MACHINE02:4840/AxesBrainOPC_UA

As a consequence, all the tags from MACHINE01 that I had previously imported were giving me a “Bad_NodeIdUnknown“ error.

The first thing I did was create a new connection in UAExpert for that OPC server, and everything looked fine: I could see MACHINE01's tags as expected. So I assumed the OPC server itself was working correctly.

To fix it, I opened the OPC connection configuration page in the Gateway:

Config > Opc > OPC Connection > MACHINE01 > More > endpoint

Then I clicked Next through the wizard until the end, and finally clicked Save Changes.
After doing this, everything went back to normal.

All of these devices work with DHCP, without reservations, and they have an 8‑hour lease time, so their IP addresses can of course change during the day/week.

One hypothesis I came up with is that Ignition might keep some internal cache of the IP addresses resolved from hostnames, and that this cache may become out of sync with the real IPs.
Another possibility is that we might be resolving the hostname incorrectly.

Does anyone have an idea of what could have happened?

Thanks!

Insanity

3 Likes

Thanks Kevin.
I’m aware it’s not ideal — this setup is inherited.
Still, I’m trying to understand whether DHCP alone could explain the behavior I saw, or if Ignition might have cached an old DNS resolution.
If you have any insight on that part, it would be super helpful.

Yes, I think there's multiple places in the stack where this DNS resolution could get cached with varying expiration times.

Your OS, the network infrastructure providing DNS, Java...

I do think that Ignition's OPC UA connection configuration should probably include the server URI, at least optionally and automatically filled in when the server is configured via online discovery, and use that to make sure the server can't get changed out from underneath it like this when all other settings are equivalent. That would just leave you with a faulted connection until it was reset, but that's better than a connection to the wrong server.

1 Like

:100:

Oy!