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

"The server certificate is different from the EndpointDescription" errors and crashes #868

Closed
Tracked by #912
ainglessi opened this issue Dec 6, 2024 · 10 comments
Closed
Tracked by #912
Assignees
Labels
bug Something isn't working

Comments

@ainglessi
Copy link
Contributor

Describe the bug
Starting 22 November the gateway crashes roughly every 15 minutes when connected to the Sample Server (open62541) with 'Umati::Exceptions::ClientNotConnected' error (see logs below).

To Reproduce
Steps to reproduce the behavior:

  1. Use Sample Server container image version sha256:65f65cf51b4bc8269625d6d503be31b9e50e8365fbe7e060a3fc85ff6e6636f3
  2. Use gateway image version sha256:31445c2a51904c00af976d98f00b45aded319a8a8ad6f63abf49d5073a0ea4b9 (commit ac97bd3) or newer.
  3. See error in logs and gateway crashing

Expected behavior
Works fine with gateway image sha256:bc655b69bbab29beeb16d25540d42370707104ffcbfcd9e4861fa548f883707b and older.

Screenshots
Screenshot 2024-11-27 124041
Untitled

Environment:

Public sample-server and dashboard-opcua-client images in Docker 27.4.0-rc.3 on Debian 12 VM.

Log

2024-12-04 09:52:32,448 [DashboardOpcUaClient] INFO std::shared_ptr<ModelOpcUa::StructureBiNode> Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(BiDirTypeMap_t&, const ModelOpcUa::BrowseResult_t&, const std::weak_ptr<ModelOpcUa::StructureBiNode>&, ModelOpcUa::ModellingRule_t, bool):255 Current size BiDirectionalTypeMap: 500
[2024-12-04 09:53:18.750 (UTC+0000)] error/client       The server certificate is different from the EndpointDescription
[2024-12-04 09:53:18.750 (UTC+0000)] error/client       Processing the message returned the error code BadSecurityChecksFailed
[2024-12-04 09:53:18.750 (UTC+0000)] info/channel       TCP 6   | SC 7470       | SecureChannel closed
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        Received Publish Response for a non-existant subscription
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        Received Publish Response for a non-existant subscription
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        Received Publish Response for a non-existant subscription
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        Received Publish Response for a non-existant subscription
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        Received Publish Response for a non-existant subscription
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        Received Publish Response for a non-existant subscription
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        Received Publish Response for a non-existant subscription
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        Received Publish Response for a non-existant subscription
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        Received Publish Response for a non-existant subscription
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        Received Publish Response for a non-existant subscription
[2024-12-04 09:53:18.750 (UTC+0000)] warn/client        skip verifying ApplicationURI for the SecurityPolicy http://opcfoundation.org/UA/SecurityPolicy#None
[2024-12-04 09:53:18.754 (UTC+0000)] info/network       TCP 8   | Opening a connection to "server-cpp" on port 4840
[2024-12-04 09:53:18.754 (UTC+0000)] info/client        Client Status: ChannelState: Connecting, SessionState: Created, ConnectStatus: Good
2024-12-04 09:53:18,754 [DashboardOpcUaClient] INFO void Umati::OpcUa::stateCallback(UA_Client*, UA_SecureChannelState, UA_SessionState, UA_StatusCode):39 Client is connecting
2024-12-04 09:53:18,754 [DashboardOpcUaClient] INFO void Umati::OpcUa::stateCallback(UA_Client*, UA_SecureChannelState, UA_SessionState, UA_StatusCode):78 Session created
[2024-12-04 09:53:18.754 (UTC+0000)] info/network       TCP 6   | Socket closed
2024-12-04 09:53:18,754 [DashboardOpcUaClient] INFO void Umati::OpcUa::stateCallback(UA_Client*, UA_SecureChannelState, UA_SessionState, UA_StatusCode):45 Client hello sent
2024-12-04 09:53:18,754 [DashboardOpcUaClient] INFO void Umati::OpcUa::stateCallback(UA_Client*, UA_SecureChannelState, UA_SessionState, UA_StatusCode):78 Session created
2024-12-04 09:53:18,754 [DashboardOpcUaClient] ERROR void Umati::OpcUa::OpcUaClient::connectionStatusChanged(UA_Int32, UA_ServerState):686 Disconnected.

terminate called after throwing an instance of 'Umati::Exceptions::ClientNotConnected'
  what():  Need connected client.
@ainglessi ainglessi added the bug Something isn't working label Dec 6, 2024
@GoetzGoerisch
Copy link
Member

@ccvca can you have a look please.
@ainglessi you have a suspected commit from upstream, could you add this here?

@ainglessi
Copy link
Contributor Author

ainglessi commented Dec 6, 2024

Suspected culprit: open62541/open62541@afcf6d0. It's server-related though.

@wlkrm
Copy link
Contributor

wlkrm commented Jan 31, 2025

@ainglessi is this solved?
open62541/open62541#7043

@ainglessi
Copy link
Contributor Author

The line

error/client The server certificate is different from the EndpointDescription

is not there any more, but

error/client Processing the message returned the error code BadSecurityChecksFailed

is still there and the gateway still crashes.

May be another issue.

@wlkrm
Copy link
Contributor

wlkrm commented Jan 31, 2025

Ah ok will look into that

@wlkrm
Copy link
Contributor

wlkrm commented Feb 11, 2025

@ainglessi, this was not reproducible anymore?
I cannot reproduce this with revert-431

@ainglessi
Copy link
Contributor Author

I've been running revert-431 with the latest server for a couple of days now, the error hasn't popped up.

@wlkrm
Copy link
Contributor

wlkrm commented Feb 13, 2025

Ok, would you considered this bug as "fixed" then?

@ainglessi
Copy link
Contributor Author

I think we can close it, keeping in mind that it may be reopened in case the error can be reproduced again.

@ainglessi
Copy link
Contributor Author

Can not reproduce reliably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants