-
Notifications
You must be signed in to change notification settings - Fork 94
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
Inconsistent "BadUnexpectedError" from OpenSecureChannel #197
Comments
I can't reproduce this locally. Can you take a Wireshark capture of the connection attempt when it fails? |
Occurs 8 times before finally connecting |
It looks like the TCP connection is aborted on the client's side before a response is received. Can you try running |
FYI Platform is Ubuntu 24.04, .NET 8.0.110 |
I don't see any disconnects in this capture, did it work fine? If so, it may be related to Ubuntu or the docker setup. The initial connection with security disabled is blocking, so I don't see anything that would cause a timing issue. The only error I can find is the TCP connection gets cut on the client side and the client doesn't receive any response from the server. |
I’m happy to dig into this further, would you be able to point out where this would be most likely to occur and any logging that could be done to track this down? |
LibUA/NET Core/TestClient/Program.cs Line 137 in 0794efd
This is the method in the UA client: LibUA/NET Core/LibUA/Client.cs Line 134 in 0794efd
Incoming bytes are consumed here, perhaps check this for failures: LibUA/NET Core/LibUA/Client.cs Line 1382 in 0794efd
If a message fails to process due to an error, this will trigger: LibUA/NET Core/LibUA/Client.cs Line 1207 in 0794efd
If your environment closes the connection, this will trigger: LibUA/NET Core/LibUA/Client.cs Line 1127 in 0794efd
|
Before I start I just wanted to say thank you for making this library, this is a much more accessible alternative to the official repo. This issue is the only thing currently giving me pause.
client.OpenSecureChannel(MessageSecurityMode.None, SecurityPolicy.None, null);
Irregularly returns
BadUnexpectedError
when connecting to Omron NJ PLC embedded OPC UA Server. I say irregularly because it seems to depend on the configuration the code is run in - the issue almost never occurs in debug, sometimes in release, and quite often when running in docker.Any insight here would be helpful, I'm thinking this might be a race condition of some kind
The text was updated successfully, but these errors were encountered: