Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to run multiple instances of earthly with different container names due to port bind issue #4090

Open
alexcb opened this issue May 3, 2024 · 1 comment
Labels
type:bug Something isn't working

Comments

@alexcb
Copy link
Collaborator

alexcb commented May 3, 2024

What went wrong?

earthly --buildkit-container-name=foo +base
earthly --buildkit-container-name=bar +base

will cause once instance to die with:

           buildkitd | Starting buildkit daemon as a docker container (foo)...
Error: build new buildkitd client: maybe start buildkitd: start: could not start buildkit: 1 error occurred:
	* command failed: docker run --privileged --env BUILDKIT_TLS_ENABLED=false --env BUILDKIT_MAX_PARALLELISM=20 --env BUILDKIT_DEBUG=false --env BUILDKIT_TCP_TRANSPORT_ENABLED=false --label dev.earthly.settingshash=e9fe7910efadcc66 --mount type=volume,source=earthly-cache,dst=/tmp/earthly --publish 127.0.0.1:8371:8371/tcp -d --pull missing --name foo docker.io/earthly/buildkitd:prerelease: exit status 125: 43c2888e5e326dd00585043393c672b129bb48c0a018dc445ef330bb613bfc1b
docker: Error response from daemon: driver failed programming external connectivity on endpoint foo (f934896c3c83a20737e48c0a2f8ebf359aeb5dc2159cccc552682fd9e3f146d1): Bind for 127.0.0.1:8371 failed: port is already allocated.: exit status 125

What should have happened?

a unique port should be picked automatically

What earthly version?

$ earthly --version
earthly version prerelease e640ac418062c5457500a656d200cf01dfee3284 linux/amd64; Ubuntu 23.10 (Mantic Minotaur)

Buildkit Logs

No response

Other Helpful Information

No response

@alexcb alexcb added the type:bug Something isn't working label May 3, 2024
@vladaionescu
Copy link
Member

It's possible to use different instances via installation name. That will also choose a different port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants