Skip to content

Unix socket not accessible when using --detached mode #364

@schickling

Description

@schickling

Unix socket not accessible when using --detached mode

Description

When starting process-compose with Unix socket mode (-U) and detached mode (--detached), the socket file appears to be created but is not accessible for client commands like process list.

Environment

  • Process Compose Version: v1.64.1
  • OS: Linux 6.1.35
  • Platform: linux

Steps to Reproduce

  1. Start process-compose with Unix socket and detached mode:
process-compose -U -u .process-compose.sock up -t=false --detached
  1. Verify the socket file exists:
ls -la .process-compose.sock
# Output: srwxr-xr-x 1 user users 0 Jul  5 15:22 .process-compose.sock
  1. Try to list processes:
process-compose -u .process-compose.sock process list

Expected Behavior

The process list command should connect to the Unix socket and return the list of running processes.

Actual Behavior

The command fails with:

FTL failed to list processes error="Get \"http://unix/processes\": dial unix .process-compose.sock: connect: no such file or directory"

Even though:

  • The socket file exists on the filesystem
  • The process-compose process is running
  • lsof shows the process has the socket open

Additional Information

  • The same issue occurs whether using -U alone or -U -u <path>
  • When running without --detached (just backgrounded with &), the socket still has the same issue
  • All managed processes (defined in process-compose.yaml) are running correctly
  • This happens consistently across multiple attempts

Workarounds Attempted

  1. Using explicit socket path with -u
  2. Running without --detached flag
  3. Setting PC_SOCKET_PATH environment variable

None of these resolved the socket communication issue.

Question

Is this a known limitation, a bug, or are we using the Unix socket feature incorrectly? The documentation suggests Unix sockets should work as a drop-in replacement for TCP mode, but we're unable to get client commands working with it.

Any guidance would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    doneDone, awaiting release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions