Cannot Test The App

September 17, 2019 221 views
Django Ubuntu 18.04

Please I have followed How To Set Up Django with Postgres on how to deploy Django remotely. I’ve been able to follow the guide accordingly(well not fully accordingly because I use git to pull my code) and running the server like so python manage.py runserver 0.0.0.0:8000 for testing it ran successfully after but on testing http://157.230.53.115:8000/ there seems to be an error as I keep receiving connection time out. Please help me look into this as I’ve really researched on this since but nothing so far. Thanks in anticipation.

1 Answer

Hello,

There are a few things that I could suggest here:

  • Make sure that port 8000 is open for incoming TCP traffic via your firewall. You could check that with:
ufw status
  • If port 8000 is not open then you would have to open it with:
ufw allow 8000

After that try accessing the site again.

  • If this is still not working, make sure that your app is actually listening on port 8000:
netstat -plant | grep 8000
  • Another thing that I could suggest is checking your logs for any errors

Hope that this helps!
Regards,
Bobby

  • Thanks a lot, Mr Bobby, I was actually able to fix the issue on yesterday. The issue actually was my fault, not the server. I created two different droplets with a different IP address, after setting up the server I mistakingly copied the IP address of the other droplet to the server for testing. So I just had to copy the right IP address. I would have deleted the question on yesterday I just don’t know how to find it. Once again thanks a lot.

Have another answer? Share your knowledge.