-
Notifications
You must be signed in to change notification settings - Fork 89
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
[Errno 98] Address already in use when listening to port 9000 from xdebug in a docker container #162
Comments
confirmed. I also can't see how this site an issue on ALL Xdebug setups using docker. so maybe we're missing something? |
@wesleymusgrove I got this working from my docker container to HOST using docker for mac https://gist.github.com/ralphschindler/535dc5916ccbd06f53c1b0ee5a868c93 I'm not 100% sure why, but seems its possible to hookup guest & host without the requirements for the PORT assignments, so removing the hardcoded ports in the docker-compose (run command) will free up your IDE to listen. more discussion needed i think... but FYI ^^^ |
You don't need expose 9000 port, just remove from setup - "9000:9000" & EXPOSE 9000 . |
For those having problems enabling remote debugging from a docker container (like I had for about 5 hours), here's a config that works without changes:
In sublime text 3, use these settings:
Adjust the path_mapping to your situation and make sure your docker-compose does not map port 9000:9000 at all as otherwise it won't work. Here's a docker example. Also I think the issue can be closed as it's clearly a docker issue and not the plugin. |
@8ctopus I am having the same problem and I am trying to apply your configurations. However, I am a total docker newb. Where does the following go?
|
@serverjohn within the docker container |
I am having an issue related to #63. Closing down multiple Sublime windows did not fix it for me.
See @trungdq88's post: http://stackoverflow.com/questions/35532325/docker-port-conflict-on-ubuntu/35532956 for a detailed explanation on why Sublime cannot listen to port 9000, 9001, or whichever port you are trying to listen for xdebug.
I also receive the following error in Sublime: "Xdebug Client.xdebug.protocol.ProtocolConnectionException: [Errno 98] Address already in use" because the
docker-proxy
process is already listening to port 9000.Host:
SublimeTextXdebug User Settings:
Guest:
20-xdebug.ini:
docker-compose.yml:
Dockerfile:
Output of
tmp/xdebug.log
:It immediately closes as soon as it connects to the client
Output of Sublime Text console:
As shown in the above mentioned StackOverflow issue, changing the HOST:CONTAINER port mapping to something like
12345:9000
doesn't work because on the HOST thedocker-proxy
process listens to port 12345 and Sublime still cannot listen to port 12345 because it's already in use.Is there some way for Sublime to listen to port 9000 even if another process is also listening on that port?
As far as I can see, this is like an infinite circle of doom, where Sublime will never be able to listen to xdebug requests coming from a docker container because of the
docker-proxy
service running on the same port that Sublime needs to be listening to on the host.The text was updated successfully, but these errors were encountered: