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 access forwarded ports #516

Open
dcb99 opened this issue Dec 17, 2024 · 1 comment
Open

Unable to access forwarded ports #516

dcb99 opened this issue Dec 17, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@dcb99
Copy link

dcb99 commented Dec 17, 2024

Running an app in a container in Coder and attempting to access the app by forwarding a port to my local machine, in this case, 8080, results in an connection refusal error
Image

Image
Image

This isn't an issue in VS Code, and I know JetBrains just released a patch that was supposed to allow port forwarding from containerized projects. Otherwise, using WebStorm attached to a Coder instance seems to be fine, there are no performance issues. My local machine is a MBP running Sonoma 14.6.1 and WebStorm 2024.3.1, and the latest version of JetBrains Gateaway.

@coder-labeler coder-labeler bot added the help wanted Extra attention is needed label Dec 17, 2024
@code-asher
Copy link
Member

The forwarding is entirely provided by JetBrains, not our plugin (in fact our plugin only runs in Gateway and not in the client nor remote IDE at all), so there is nothing we could do unfortunately.

My guess is that if the app is inside a container, it needs to listen on 0.0.0.0 and not localhost, otherwise it will not be accessible outside the container. Also the container needs to forward 8080 to the host. Maybe that patch you mentioned is supposed to work around these restrictions, but is not released yet or is not working correctly? I think the VS Code extension does exec into the container or something to make this work automatically, but I am not 100% sure how it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants