Skip to content

Fix port and block problem for Opossum #2851

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

Merged
merged 6 commits into from
Jul 20, 2025
Merged

Fix port and block problem for Opossum #2851

merged 6 commits into from
Jul 20, 2025

Conversation

drwetter
Copy link
Collaborator

@drwetter drwetter commented Jul 18, 2025

This fixes #2847 .

It was falsely assumed that the http head command blocks when port 80 is not available but actucally the exec for the socket is the culprit.

This PR changes that so that the exec is put in the background.

Another change is that $node is still used but the port is stripped of which lead to the problem raised in #2847. We use $node instead of $NODE has we can recycle the http_head[er]_printf() later.

http_header_printf()was renamed to http_head_printf() as there's also an http_head() and an http_get()

What is your pull request about?

  • Bug fix
  • Improvement
  • New feature (adds functionality)
  • Breaking change (bug fix, feature or improvement that would cause existing functionality to not work as expected)
  • Typo fix
  • Documentation update
  • Update of other files

If it's a code change please check the boxes which are applicable

  • For the main program: My edits contain no tabs, indentation is five spaces and any line endings do not contain any blank chars
  • I've read CONTRIBUTING.md and Coding_Convention.md
  • I have tested this fix or improvement against >=2 hosts and I couldn't spot a problem
  • I have tested this new feature against >=2 hosts which show this feature and >=2 host which does not (in order to avoid side effects) . I couldn't spot a problem
  • For the new feature I have made corresponding changes to the documentation and / or to help()
  • If it's a bigger change: I added myself to CREDITS.md (alphabetical order) and the change to CHANGELOG.md

drwetter added 6 commits July 18, 2025 18:18
This fixes #2847 .

It was falsely assumed that the http head command blocks when port 80 is not available but
actucally the exec for the socket is the culprit.

This PR changes that so that the exec is put in the background.

Another change is that $node is still used but the port is stripped of which
lead to the problem raised in #2847. We use $node instead of $NODE has we
can recycle the `http_head[er]_printf()` later.

`http_header_printf()`was renamed to `http_head_printf()` as there's also an `http_head()`
and an `http_get()`
As `wait_kill()` returns with 0 when a TCP reset is encountered
and the process is not killed, we need to open the socket again
in a sub shell. Which is safe in the foreground.

If then the subshell returns with 0 we can safely connect to
port 80.
@drwetter drwetter merged commit e62949d into 3.3dev Jul 20, 2025
4 checks passed
@drwetter drwetter deleted the fix_2847 branch July 20, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Using a port suffix for the URI causes some file descriptor errors
1 participant