[#1031] Keep the replication test's admin and replication ports out of the ephemeral range - #1033
Open
vharseko wants to merge 1 commit into
Conversation
…lication ports out of the ephemeral range The third server's admin connector (34444) and replication port (38989) sit inside the Linux default net.ipv4.ip_local_port_range (32768-60999), so any outgoing connection on the runner can hold 34444 when setup tries to bind it — once caught by setup's port check, once as a start failure. Renumber the administrative ports of servers 2 and 3 next to server 1 (4444/4445/4446, 8989/8990/8991): contiguous, below the range, and a fourth server extends the block without re-checking where it starts. Fixes OpenIdentityPlatform#1031
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1031
Why
Test replicationnumbers its three serversN389 / N636 / N4444 / N8989. AtN=3two of the twelve ports — the admin connector34444and the replication port38989— land inside the Linux defaultnet.ipv4.ip_local_port_range(32768 60999), the block the kernel hands out as source ports for outgoing connections. Whatever on the runner happens to be dialling out at the wrong moment holds the port, and the third server cannot bind it.Seen twice on 2026-09-11, both at
Setup OpenDJ-3 with replication, both on JDBC-only branches whose sibling legs were green:build-maven (ubuntu-latest, 17)— caught by setup's own port check:ERROR: Unable to bind to port 34444.build-maven (ubuntu-latest, 21)— past the check, configured, thenError Starting Directory Server. Error code: 1after 5.5 s, the point at which a normal start binds its connection handlers.start-dsexit 1 there means the server's ownSystem.exit(1)on anInitializationException(a kill would leaveserver.startingin place and hangWaitForFileDelete); the only thing that differs between the identically configuredopendj2andopendj3is the port numbers.Only
34444was ever named, and that is what the kernel predicts:connect()autobinds ports of the parity of the range's lower bound (even),bind(0)takes the other parity —34444is even,38989is odd. Both move anyway; they live in the same block.What
Renumber the administrative ports of servers 2 and 3 into the block next to server 1:
Server 2's ports were below the boundary and not at risk; they move so the scheme stops being positional —
4444/4445/4446and8989/8990/8991are contiguous and a fourth server extends them without anyone re-checking where the ephemeral range starts. LDAP/LDAPS ports (1389/2389/3389,1636/2636/3636) are unchanged. None of the new numbers collides with the other ports of the same job (1389,1636,4444,5432,9042);8990occurs in the repository once, as aHostPortlabel inConnectFailureReporterTestthat never opens a socket. A comment above the step records the constraint.Verified
4445/8990and 2↔3 on4446/8991, both initializationsBase DN initialized successfully, both 100 000-entry checks passed, all instances stopped, no listeners left.if / name / run / timeout-minutes; no old number remains under.github/.Not in this PR
A diagnostic
if: failure()step dumpingopendj3/logs/server.outandss -tanp— the second failure's port was never named because the detail log it points at is gone (#1030). Worth adding separately so the next intermittent start failure explains itself.