Skip to content

Implement gateway proper error handling when can't listen on port #288

@teon

Description

@teon

Description

If gateway can't bind an a port it doesn't return a proper error bug crashes:

defguard-gateway-1  | 
defguard-gateway-1  | thread 'main' (1) panicked at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.50.0/src/signal/unix.rs:71:53:
defguard-gateway-1  | failed to create UnixStream: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
defguard-gateway-1  | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Implement a proper error handling and error message:

Can't bind to port XXX - please check if there maybe other services are running at this port, or if gateway has proper system privileges (seccomp or apparmor).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Development ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions