When working with Docker and Django setup Initially sometime we will getting this error port 5432 already in use or TCP/IP not able to make connection. How to resolve this issue please find below.
Asked
Active
Viewed 397 times
1 Answers
0
This issue will happen because of two cases :
By suddenly stop or restart the system without closing the docker or DB to resolve it kill all PID ID by running this command
kill -9 PID
and kill all PIDSecond issue was happening due to already in our system another Docker is present with same configuration then we have to change its name. along with it dont forgot to Inssert this line into settings.py
DOMAIN_URL = config("DOMAIN_URL", "http://localhost:8000/")
or DOMAIN_URL = "http://localhost:8000/"

nikhil upadhyay
- 882
- 6
- 2