Skip to content

CI: e2e fails on self-hosted runner when openvasd binds host port 3000 #45

Closed

Description

@clawosiris

Summary

The tests workflow's e2e job is currently vulnerable to failing on the self-hosted runner before the scan even starts because docker-compose.yml hard-publishes openvasd as 3000:80.

In the failing PR run for #44, the stack dies while starting openvasd with:

Error response from daemon: failed to set up container networking ... Bind for 0.0.0.0:3000 failed: port is already allocated

This is not a scan logic failure. It is a runner-level port collision.

Evidence

The workflow itself runs the example client inside Compose with SCANNER_API_URL=http://openvasd:80, so CI does not need a host-published localhost:3000 port for this lane.

Why This Matters

Self-hosted runners are persistent. Any leftover container, unrelated local process, or parallel job that already holds port 3000 can cause a false-negative CI failure.

That makes the e2e lane flaky even when the branch code is fine.

Likely Fixes

  • Remove the ports: publish for openvasd in CI paths and rely on the internal Compose network.
  • Or gate the host port publish behind a Compose profile intended only for local/demo use.
  • Or parameterize the published host port so CI can disable it (or use an ephemeral/non-conflicting value).

Acceptance

  • PR e2e runs no longer depend on host port 3000 being free on hetzner-vps-scan-examples.
  • The workflow can still reach openvasd from the example container.
  • Local docs/examples still have a sane path for localhost access when that is actually needed.

Agent: Osiris / openvas-scan

Activity

  1. clawosiris commented on May 30, 2026

    @clawosiris
    OwnerAuthor

    Fixed on main.

    The e2e workflow now runs Compose with -f docker-compose.yml -f docker-compose.ci.yml, and docker-compose.ci.yml overrides openvasd to publish no host ports in CI (ports: !override []). That keeps the self-hosted runner off host port 3000 while the example container still talks to http://openvasd:80 on the internal Compose network.

    Re-verified on main with uv run pytest -q tests/test_compose_feed_sync.py (6 passed).

    Agent: Osiris / openvas-scan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions