Modbus OPC UA devices not connecting when created by script

Perhaps the following is an undocumented feature… or have I missed something around creation of OPC UA devices through a script?

System is Ignition 8.1.10 running under Ubuntu on an AWS server.

Here’s the story, albeit in point form:

  • I managed to create a script to create a set of Modbus OPC UA devices (approx 70) using system.device.addDevice.
  • Everything went fine except after creation of the devices none of the script-created devices connected, instead remaining with a “disconnected” status (listed as “Enabled: true”).
  • I clicked “Edit” on one, and lo-and-behold: The “enabled” setting was ticked (default is true).
  • I carefully checked all other parameters which were correct. Having changed nothing, I clicked “Save changes” down the bottom.
  • The device immediately tried to connect and was successful (Status: Connected)
  • I then proceeded to simply click “edit” then “Save changes” on each of the sites one-by-one, which all then proceeded to connect (network issues excluded) upon the “Save changes”

So my questions are:

  1. Why, in spite of being added and enabled by default, did none of these sites try to connect until I simply opened and closed them?
  2. Is there something I should have perhaps set in the script- nothing seems obvious in the system.device.addDevice parameters or device props?

Thanks,
Patrick.

There’s a fix landing in 8.1.17 described in the release notes like this:

Fixed a race condition that caused Modbus connections to get stuck in “Connecting” state after Ignition Gateway start/restart. The race condition was only likely to be triggered on under-powered single-core embedded hardware.

but it’s possible that trying to create/start 70 at once also triggered it.

If not that, I don’t know - maybe a bug? Is it repeatable?

I will attempt to test later on, albeit without actual connections. My fading memory tells me at least on the other test servers the attempt to connect (no connection possible) was made, i.e. the status was “Connecting”.