Skip to content

Unix socket becomes ghost after disconnect — nym-vpnc commands hang indefinitely #5486

@cuttle-agent

Description

@cuttle-agent

Describe the bug

After running nym-vpnc disconnect, the Unix socket /var/run/nym-vpn.sock enters a state where ss reports it as listening, but ls cannot find the file and nym-vpnc commands time out indefinitely. The daemon logs show "Ready to connect" but never responds to CLI messages on the socket.

To Reproduce

  1. Start nym-vpnd, connect successfully with nym-vpnc connect
  2. Run nym-vpnc disconnect
  3. Attempt any subsequent nym-vpnc command — all hang indefinitely
  4. ss -lx | grep nym shows the socket listening, but ls /var/run/nym-vpn.sock returns "No such file or directory"

Root cause (suspected)

After disconnect, the daemon appears to retain a bound file descriptor to the socket while the filesystem entry is removed. This creates a "ghost socket" — the abstract Unix socket is still bound in the daemon file descriptor table, but new clients cannot connect because the filesystem path does not exist. connect() system calls succeed (the kernel finds the bound socket via the fd), but the daemon does not process incoming messages.

Expected behavior

nym-vpnc disconnect should cleanly close the connection and leave the daemon in a state where subsequent commands work without requiring a full daemon restart.

Workaround

sudo systemctl stop nym-vpnd
sudo rm -f /var/run/nym-vpn.sock
sudo systemctl start nym-vpnd

After this, nym-vpnc commands respond normally.

Environment

  • OS: Ubuntu 26.04 (kernel 7.0.0-22-generic)
  • NymVPN version: 1.30.0
  • Install method: tarball for nym-vpnd, .deb for nym-vpnc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions