Skip to content

failed to restart workload due to address already in use #3920

@amirejaz

Description

@amirejaz

If a workload transitions to the error state (for example, due to a system sleep/wake cycle, changing from unauthenticated to running from Desktop, or potentially other scenarios), restarting the workload fails.

The failure occurs because the proxy process remains running after the workload enters the error state. When attempting to restart, the workload tries to bind to the same port, which results in an address already in use error.

Expected Behavior

When a workload transitions to the error state:

  • The proxy process should be properly terminated, or
  • Restart logic should handle an existing proxy instance gracefully.

Restarting the workload should not fail due to a stale proxy holding the port.

Actual Behavior

Restart fails with a port binding error:

7:56AM  ERROR  Workload X failed with error: failed to start transport: failed to listen: listen tcp 127.0.0.1:50202: bind: address already in use
Error: failed to restart workload X: failed to start transport: failed to listen: listen tcp 127.0.0.1:50202: bind: address already in use

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