Skip to content

Flaky InitOnLineTest: initializeExportMultiSS times out, leaked replication server port fails initializeImport #841

Description

@vharseko

Observed failure

CI run on PR #831 (build-maven (ubuntu-latest, 25)): https://github.com/OpenIdentityPlatform/OpenDJ/actions/runs/30817690702/job/91699408826

Two failures in org.opends.server.replication.InitOnLineTest. All other 8 matrix jobs passed, and the PR only touches example code (opendj-ldap-sdk-examples, opendj-embedded-server-examples), so the failure is unrelated to the change:

[ERROR] Tests run: 10, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 638.9 s <<< FAILURE! -- in org.opends.server.replication.InitOnLineTest
[ERROR]   InitOnLineTest.initializeExportMultiSS:1132->waitForInitializeTargetMsg:1080 » ThreadTimeout Method org.opends.server.replication.InitOnLineTest.initializeExportMultiSS() didn't finish within the time-out 600000
[ERROR]   InitOnLineTest.initializeImport:550->createReplicationServer:493 » Config Replication Server failed to start : could not bind to the listen port : 65523. Error : BindException(Address already in use) Another socket is listening on 127.0.0.1:65523

initializeExportMultiSS hung for the full 600 s TestNG timeout, blocked in a socket read waiting for an InitializeTargetMsg that never arrived:

at org.opends.server.replication.protocol.Session.read(Session.java:437)
at org.opends.server.replication.protocol.Session.receive(Session.java:403)
at org.opends.server.replication.service.ReplicationBroker.receive(ReplicationBroker.java:2457)
at org.opends.server.replication.service.ReplicationBroker.receive(ReplicationBroker.java:2410)
at org.opends.server.replication.InitOnLineTest.waitForInitializeTargetMsg(InitOnLineTest.java:1080)
at org.opends.server.replication.InitOnLineTest.initializeExportMultiSS(InitOnLineTest.java:1132)

Analysis

The second failure is a cascade of the first, not an independent problem:

  1. initializeExportMultiSS started RS(8) listening on port 65523 (msgID=204 ... started listening for new connections on address 0.0.0.0 port 65523), then hung waiting for the initialize-target message.
  2. On timeout, TestNG killed the test thread, so the test's cleanup never ran and RS(8) kept the port bound.
  3. The next test in the class, initializeImport, tried to create its replication server on the same port 65523 and failed with BindException(Address already in use).

So there are two things to address:

Related: #800, #803 (replication test listen port allocation).

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIreplicationtestsTest suites: fixing, enabling, un-disabling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions