Repository navigation
[6.x] [Test] Pick spec ports outside the ephemeral port range - #292
Merged
jsvd merged 1 commit intoNov 4, 2026
Merged
Conversation
get_port picked a random port in 10000..65535, checked it was free and
released it before the plugin bound it. Ports above 32767 are in the
kernel's ephemeral range, so in between another socket could be handed
the same port ("could not bind ... Address already in use").
Pick from 10000..32767 instead, below both the Linux (32768-60999) and
macOS (49152-65535) ephemeral ranges.
Equivalent of the main-branch fix in logstash-plugins#291, adapted to 6.x's get_port.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Changelog and Version ManagementNo changelog or version changes detected. You can either update them manually or use a comment command to update them automatically on merge:
Omit the entry line to use the PR title. If multiple commands are posted, the last one wins. |
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.
Backport of #291 to 6.x, adapted to 6.x's spec helper.
get_portpicked a random port in10000..65535, checked it was free and released it before the plugin bound it. Ports above 32767 are in the kernel's ephemeral range, so in between another socket can be handed the same port, failing withcould not bind ... Address already in use. It now picks from10000..32767, below both the Linux (32768-60999) and macOS (49152-65535) ephemeral ranges. Spec-only change.Seen on 6.x, e.g.
tcp_spec.rb:296"should one message per connection" withAddress already in use: https://github.com/logstash-plugins/logstash-input-tcp/actions/runs/33371780619Locally on Logstash 9.5.5: 62 examples, 2 failures, 1 pending. Both failures (
:932unsupported client protocol message,:1083cipher suites) also fail on unmodified 6.x on macOS because of local OpenSSL/JDK differences; they're unrelated.🤖 Generated with Claude Code