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

Port conflicts reported with Docker Desktop for macOS and Appsody stack #505

Closed
helenmasters opened this issue Feb 5, 2020 · 0 comments · Fixed by #508
Closed

Port conflicts reported with Docker Desktop for macOS and Appsody stack #505

helenmasters opened this issue Feb 5, 2020 · 0 comments · Fixed by #508
Assignees
Milestone

Comments

@helenmasters
Copy link
Contributor

helenmasters commented Feb 5, 2020

Errors reported in Slack by some users when using appsody run. The error was as follows:

Running development environment...
Pulling docker image docker.io/appsody/java-openliberty:0.1
Running command: docker pull docker.io/appsody/java-openliberty:0.1
0.1: Pulling from appsody/java-openliberty
Digest: sha256:ba3b40b83ba4166316ceac8c5b9fc2bb9809d9452ad1ef7c56d672f904bb8f45
Status: Image is up to date for appsody/java-openliberty:0.1
docker.io/appsody/java-openliberty:0.1
Running command: docker run --rm -p 7777:7777 -p 9080:9080 -p 9443:9443 --name hello-dev -u 501:20 -e APPSODY_USER=501 -e APPSODY_GROUP=20 -v /Users/emily/.m2/repository:/mvn/repository -v /Users/emily/demos/hello/.:/project/user-app -v appsody-controller-0.3.4:/.appsody -t --entrypoint /.appsody/appsody-controller docker.io/appsody/java-openliberty:0.1 --mode=run
[Container] docker: Error response from daemon: driver failed programming external connectivity on endpoint hello-dev (c7cd774c8fab853f31f94efee4e639189cb6b77de7501a4c0bc669fbb7defe60): Error starting userland proxy: listen tcp 0.0.0.0:9443: bind: address already in use.
[Error] Error in 'appsody run': exit status 125

You can use appsody run … -p 9444:9443 and access the app on port 9444 instead, or appsody run ... -P to automatically assign a free port.

If you do this, it is reported that once past appsody run, appsody deploy then failed with the same error.

The process using the port is embedded Kubernetes in Docker Desktop.

It seems that Docker for Desktop’s Kubernetes locks up port 9443. There is nothing Appsody can do about this. The workarounds are stated above, but to summarize:

  • Shutdown Kubernetes within your Docker for Desktop. You will need to start it back up in order to deploy to it or deploy to a different Kubernetes instance.
  • Run with -p 9444:9443 or -P

This issue has been raised in order to document the workaround in our docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant