Skip to content

Server disconnects client after ~45 minutes with no chance to reconnect #3413

@barnstee

Description

@barnstee

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

I reported this issue before and at the time it was first confirmed and later resolved as not repo. The behavior is the same as before: The server disconnects the client the first time the security token is renewed. Subsequent reconnection attempts of the client are rejected.

Expected Behavior

Server successfully renews the security token and the client maintains its connection.

Steps To Reproduce

  1. Clone the repo https://github.com/digitaltwinconsortium/ManufacturingOntologies
  2. Open the "Station" solution in Visual Studio and update the OPC UA sack NuGets to the latest ones.
  3. Compile and run at least 4 instances of the station, 3 configured in "Station" mode ("assembly", "test" and "packaging") and one configured in "MES" mode.
  4. Let the MES connect to the 3 Stations and wait ~45 minutes while checking the logs.
  5. You will eventually see the error:
    Id: BadNotConnected
    Description: BadNotConnected

BadNotConnected
--- at Opc.Ua.Bindings.UaSCUaBinaryClientChannel.QueueConnectOperation(WriteOperation operation, Int32 timeout, IServiceRequest request)
--- at Opc.Ua.Client.Session.BeginPublish(Int32 timeout)
========================================
OPC UA Stack: 12/11/2025 15:44:39.190 Unexpected error sending publish request.
BadNotConnected 'BadNotConnected'

Environment

- OS:
- Environment:
- Runtime:
- Nuget Version:
- Component:
- Server:
- Client:

Anything else?

We really need to start running long running tests as part of the normal CI/CD pipeline fo the stack to avoid customers finding these issues!

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug was identified and should be fixed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions