Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPC UA silently fails to handle subscription response #642

Closed
ottlukas opened this issue Nov 9, 2022 · 2 comments
Closed

OPC UA silently fails to handle subscription response #642

ottlukas opened this issue Nov 9, 2022 · 2 comments
Assignees
Labels
bug java Pull requests that update Java code MAJOR OPC-UA https://plc4x.apache.org/users/protocols/opcua.html

Comments

@ottlukas
Copy link
Contributor

ottlukas commented Nov 9, 2022

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.

Imported from Jira PLC4X-342. Original Jira may contain additional context.
Reported by: ldywicki.

@splatch
Copy link
Contributor

splatch commented Dec 18, 2023

Its going to be addressed by #1007.

@splatch splatch assigned splatch and unassigned hutcheb Dec 18, 2023
@splatch splatch added java Pull requests that update Java code OPC-UA https://plc4x.apache.org/users/protocols/opcua.html and removed driver-opc-ua labels Jul 5, 2024
@splatch
Copy link
Contributor

splatch commented Jul 5, 2024

This issue should be addressed in PR mentioned above.
@ottlukas Please spin freeopcua tests again and reopen issue if its still valid.

@splatch splatch closed this as completed Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug java Pull requests that update Java code MAJOR OPC-UA https://plc4x.apache.org/users/protocols/opcua.html
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants