Uploaded image for project: 'Apache PLC4X'
  1. Apache PLC4X
  2. PLC4X-342

OPC UA silently fails to handle subscription response

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.9.1
    • None
    • Driver-OPC-UA
    • None

    Description

      While test of OPC UA simulator coming from freeopcua I found out that our client doesn't work with it. Maybe it is an issue of how they encode payload, maybe it is inconsistency in the spec, not sure - the end result is that actual response processing error gets swallowed and driver hangs.

      Guilty code is in OpcuaSubscriptionHandle:

      for (MonitoredItemCreateResult result : responseMessage.getResults().toArray(new MonitoredItemCreateResult[0])) {
          if (OpcuaStatusCode.enumForValue(result.getStatusCode().getStatusCode()) != OpcuaStatusCode.Good) {
              LOGGER.error("Invalid Field {}, subscription created without this field", fieldNames.get((int) result.getMonitoredItemId()));
          } else {
              LOGGER.debug("Field {} was added to the subscription", fieldNames.get((int) result.getMonitoredItemId() - 1)); // !monitored item id might be inconsistent!
          }
      }
      

      Copy of traffic causing issue in attachment.

      Attachments

        1. image-2022-05-16-05-02-37-149.png
          24 kB
          Ben Hutcheson
        2. Monitored Item Server Side ID.png
          32 kB
          Ben Hutcheson
        3. opcua_monitored_item_wrong_index..pcapng
          3 kB
          Łukasz Dywicki

        Activity

          People

            hutcheb Ben Hutcheson
            ldywicki Łukasz Dywicki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: