Skip to content

perf-metrics port 7000 conflict on Windows: No way to configure alternative port (svchost.exe often claims 7000) #705

@TheCEOCoreGroupMining

Description

@TheCEOCoreGroupMining

Describe the bug
When running Kaspad v1.0.1 (Windows 10, official binary), enabling the --perf-metrics flag causes Kaspad to always bind the Prometheus metrics server to 0.0.0.0:7000. On Windows, this port is often already occupied by system processes (commonly svchost.exe), resulting in the inability to access metrics and (sometimes) node startup failure.
There is currently no CLI flag or config file option to specify an alternative metrics port.

To Reproduce
Steps to reproduce the behavior:

  1. On Windows, ensure any process (like svchost.exe) is listening on port 7000
  2. Launch Kaspad with --perf-metrics
  3. Observe that Kaspad tries to bind 0.0.0.0:7000, but the port is occupied
  4. Metrics endpoint is unavailable and/or node startup fails

Expected behavior
Kaspad should provide a way to specify a custom port for the Prometheus metrics endpoint, either by CLI argument (such as --metrics-addr) or config file.

At a minimum, the software should warn the user or fail gracefully, rather than silently being inaccessible.

Screenshots
Not applicable (but happy to provide if needed).

Desktop (please complete the following information):
-OS: Windows 10 (x64, build 26100.4652)
-Kaspad version: v1.0.1 (latest)
-Install type: official release binary

Additional context
Tried launching with possible options like --metrics-addr and via TOML config file; Kaspad either errors with “unexpected argument” or ignores config key.

Checked open/closed issues and changelog; there is no workaround described for metrics port conflicts.

Netstat confirms port 7000 is held by Windows services (svchost.exe), which is default behavior on some Windows installations.

Metrics endpoint is not accessible, breaking Prometheus monitoring.

Request
Please implement a CLI flag and/or config file option to set the Prometheus metrics port, e.g. --metrics-addr=0.0.0.0:7010 or equivalent.
Alternatively, if such a setting already exists, please clarify its usage in documentation.

Thank you!

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