Pycharm + docker-compose, django server is not responding!

Everything runs fine, breakpoints run, debugger is connected, the runserver command runs properly and the server is started.


Whenever I send a request to that server though, there is server not found!



Recreating django_server ... 
Attaching to django_server
django_server | pydev debugger: starting
django_server |
Connected to pydev debugger (build 183.5429.31)
django_server | pydev debugger: New process is launching (breakpoints won't work in the new process).
django_server | pydev debugger: To debug that process please enable 'Attach to subprocess automatically while debugging?' option in the debugger settings.
django_server |
django_server | Performing system checks...
django_server |
django_server | System check identified no issues (0 silenced).
django_server | February 03, 2019 - 08:52:09
django_server | Django version 2.1.5, using settings 'config.settings'
django_server | Starting development server at
django_server | Quit the server with CONTROL-C.

docker ps:

CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                                                         NAMES

34f7bd877cec        django_server           "python -u /opt/.pyc…"   5 minutes ago       Up 5 minutes>51150/tcp, 52291/tcp,>8000/tcp   django_server


The container has the open ports and everything should be fine, but it doesn't respond to any requests! When I run the docker-compose myself, it works well but no debugging offcourse!



Please elaborate on what do you mean by "server not found" ?

You're not getting a response on HTTP request? Is the execution paused on any breakpoint in that moment?


The request doesn't reach the server, host not found. like If I would access a server that does not exist


Please specify what kind of request are you taking about and how do you send it.

Is it working if you run the configuration without debugger from PyCharm?


Please sign in to leave a comment.