anthropics / anthropics/claude-quickstarts

(MacOS) Ports are not available: 5900

Aberta
#147 4 comentários 3 reações 0 responsáveis Ver no GitHub
bug computer use docker
Linguagem predominante
TypeScript
Estrelas
17.7k
Forks
3k
Merge médio
5h 13min
PRs com merge (30d)
3

Descrição

Executing the (minimally tweaked) `docker run` command from the README.md:

```bash
docker run -d \
-e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
-v "$(pwd)":/host \
-p 5900:5900 \
-p 8501:8501 \
-p 6080:6080 \
-p 8080:8080 \
--name "$CONTAINER_NAME" \
-it "$IMAGE_NAME"

28e..43e
docker: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:5900 -> 0.0.0.0:0: listen tcp 0.0.0.0:5900: bind: address already in use.
```

Inspecting, ...
```bash
> lsof -i :5900
Password:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
launchd 1 root 11u IPv6 0xc679adcb0b88da06 0t0 TCP *:rfb (LISTEN)
launchd 1 root 12u IPv4 0xdaeb2706f944b831 0t0 TCP *:rfb (LISTEN)
launchd 1 root 14u IPv6 0xc679adcb0b88da06 0t0 TCP *:rfb (LISTEN)
launchd 1 root 15u IPv4 0xdaeb2706f944b831 0t0 TCP *:rfb (LISTEN)
```

It turns out that I have to disable screen-sharing on macOS to free this port:

Screenshot 2024-11-01 at 20 42 30

I think it's a mistake to re-use a port that macOS has, by default, reserved, given that you are free to use ANY port you wish.

It does seem odd to me that in 2024 the best solution still seems to be "Pick a random 16-bit integer and hope nobody else on your OS picked the same one". Very retro. hey ho...

I think it would make much more sense to have a .ports file and make the ports dynamic. And to use different numbers for external and internal. That would make the code easier to work with.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.