You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the docker run uses multiple host ports, including potentially user-declared ones from .gitpod.yml, it can easily get into a situation where they conflict. However, the reported error to the user is
time="2022-12-16T18:57:57-08:00" level=error msg="[starting] workspace image done" duration=357.860717ms failure="docker: Error response from daemon: driver failed programming external connectivity on endpoint rungp-1671245876866762152 (1d3b07052b0809dc49d4a0ae7dcdb3bfc017f706ae675a091e640ad068034768): Bind for 0.0.0.0:8080 failed: port is already allocated."
without any context of why that happened or what action the user can take to resolve it
Execute run-gp (optionally with a bunch of --verbose to see what's up)
Observe the bad outcome because "--ide-port int port to expose open vs code server (default 8080)" and the 8080 port in .gitpod.yml collide in the docker run -p 8080:22999 ... -p 8080:8080 workspace-image:latest (it could have happened with the SSHPort, also, it just happened that the getting-started repo and the default IDEPort collided
Expected behavior
My patched version emits:
time="2022-12-16T19:08:08-08:00" level=warning msg="unable to Start Workspace: PortForwarding collision on 8080 (originally 8080) with opts.IDEPort"
because:
the StartWorkspace func keeps track of host port allocation and asserts they do not collide
I had to patch run-gp to log the docker run command to even start to investigate this bug
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Linux
CPU: amd64
Browser N/A
Version v0.1.7
Additional context
As mentioned, I have a potential fix for this, and will try to open a PR for it later but wanted to type this up while I had all the context in front of me
The text was updated successfully, but these errors were encountered:
mdaniel
added a commit
to mdaniel/run-gp
that referenced
this issue
Dec 19, 2022
Describe the bug
Because the
docker run
uses multiple host ports, including potentially user-declared ones from.gitpod.yml
, it can easily get into a situation where they conflict. However, the reported error to the user iswithout any context of why that happened or what action the user can take to resolve it
To Reproduce
Steps to reproduce the behavior:
.gitpod.yml
run-gp
(optionally with a bunch of--verbose
to see what's up)docker run -p 8080:22999 ... -p 8080:8080 workspace-image:latest
(it could have happened with the SSHPort, also, it just happened that the getting-started repo and the default IDEPort collidedExpected behavior
My patched version emits:
because:
StartWorkspace
func keeps track of host port allocation and asserts they do not collideRunE go func stops swallowing err
docker run
command to even start to investigate this bugScreenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
As mentioned, I have a potential fix for this, and will try to open a PR for it later but wanted to type this up while I had all the context in front of me
The text was updated successfully, but these errors were encountered: