-1

I have a django application which runs through docker compose on my local system on localhost:80. I have another application which runs at localhost:3000. I want to access http://localhost:3000 within the django application. While I try to access this I get the below error:

ConnectionError at / HTTPConnectionPool(host='localhost', port=3000): Max retries exceeded with URL: /render (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1a03d7a610>: Failed to establish a new connection: [Errno 111] Connection refused'))

2
  • This question is similar to: From inside of a Docker container, how do I connect to the localhost of the machine?. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. Commented Jul 10 at 5:34
  • The localhost host name is very context-specific; in Docker it usually refers to "the current container". What are the localhosts you refer to – separate Docker containers, multiple physical machines, VMs, systems running end users' browsers, something else? Are they the same localhost?
    – David Maze
    Commented Jul 10 at 9:47

0

Browse other questions tagged or ask your own question.