overmind icon indicating copy to clipboard operation
overmind copied to clipboard

listen unix ./.overmind.sock: bind: operation not supported

Open dudintv opened this issue 5 years ago • 10 comments
trafficstars

I'm trying to setup Overmind on the WSL (Linux inside Windows) Ubuntu 16.04. And, after this command:

root@big-pc:/mnt/c/rails/vizmarket# overmind s

I've got an error:

system    | Tmux socket name: overmind-vizmarket-f2ZGVMrcSIdyY0QKfLB0X_
system    | Tmux session ID: vizmarket
system    | Listening at ./.overmind.sock
overmind: listen unix ./.overmind.sock: bind: operation not supported

What should I do to make it works?

dudintv avatar Jun 07 '20 01:06 dudintv

Hey! Looks like Unix sockets don't work properly on WSL. I'll check this later.

As a workaround, I added ability to bind to TCP network instead of Unix socket to 2.2.0

DarthSim avatar Jul 16 '20 15:07 DarthSim

Hey @dudintv ! I'm trying to do the same here but I can't figure out what to start with. How did you install overmind in the first place ? I guess it's with the binary but I'm not sure what I should do with it. And then, does the DarthSim's solution work ? Could you give me a hint also on this subject please. I'm new to WSL and Linux (my mac just crashed), and I struggle to figure what should go where. Thx =)

Pagehey avatar Nov 05 '20 14:11 Pagehey

@Pagehey I've abandoned that and moved to my mac book. WSL provides too many shits. It could look like ok but at some moment it crashes unexpectedly.

dudintv avatar Nov 06 '20 13:11 dudintv

Same issue on macOS 11.2.3 with Docker 3.3.0 and SAM CLI 1.22.0 running sam: sam local start-api --warm-containers=EAGER --env-vars=env.json, works fine without --warm-containers=EAGER.

tmbs avatar Apr 14 '21 10:04 tmbs

@tmbs do you run sam with Overmind or Overmind with sam?

DarthSim avatar Apr 14 '21 11:04 DarthSim

Current Procfile ran with overmind s:

sam: sam local start-api --env-vars=env.json
tsc: npm run watch

tmbs avatar Apr 14 '21 13:04 tmbs

It is weird then as Overmind binds to the socket before running the processes, so processes shouldn't affect the binding.

DarthSim avatar Apr 14 '21 13:04 DarthSim

Hey! Looks like Unix sockets don't work properly on WSL. I'll check this later.

As a workaround, I added ability to bind to TCP network instead of Unix socket to 2.2.0

Can confirm that this is still an issue in 2.2.2.

overmind start
# system | Tmux socket name: overmind-[...]
# system | Tmux session ID: [...]
# system | Listening at ./.overmind.sock
# overmind: it looks like Overmind is already running. If it's not, remove ./.overmind.sock and try again
overmind --version
# Overmind version 2.2.2

tom-spalding avatar Jul 26 '21 18:07 tom-spalding

@dreamalligator This is WSL issue, so it can't be fixed inside Overmind. However, you're getting the error that tells you that you have already started an Overmind instance in the current dir. That's strange.

DarthSim avatar Aug 02 '21 14:08 DarthSim

Thanks @DarthSim. From turning computer off, I assume there is no cleanup step when not manually closing Overmind. Maybe I can add a script when my computer turns on to remove it, or whatever is best practice.

edit:

made the following alias function :shrug:

overmind() {
  if [[ $@ == "start" ]]; then
    [ -e .overmind.sock ] && rm -f .overmind.sock
    command overmind start
  else
    command overmind "$@"
  fi
}

edit edit:

suggestion from a friend:

function om() {
  OVERMIND_SOCKET="/tmp/.overmind-$(echo $PWD | md5sum | cut -f1 -d' ').sock" overmind "$@"
}

tom-spalding avatar Aug 02 '21 15:08 tom-spalding