Django web site is not opened though runserver us running

85 views
Skip to first unread message

ram.mu...@gmail.com

unread,
Mar 5, 2024, 3:32:51 AMMar 5
to Django users
Hi,

Could someone look at this post and help me understand what is missing? We think there is no issue in our Django application but Digital Ocean concluded that the issue is from our application.


Best Regards,
~Ram

ram.mu...@gmail.com

unread,
Mar 6, 2024, 11:02:18 PMMar 6
to Django users
Hi,

Hoping someone can provide some clue on this?

Best regards,
~Ram

Mike Dewhirst

unread,
Mar 6, 2024, 11:32:43 PMMar 6
to django...@googlegroups.com
On 7/03/2024 3:02 pm, ram.mu...@gmail.com wrote:
Hi,

Hoping someone can provide some clue on this?

I think you'll find most people are reluctant to click on unsolicited web links no matter how innocent they appear to be.

Perhaps you can describe the problem, tell us what you have tried and show the DigitalOcean advice.



Best regards,
~Ram

On Tuesday, March 5, 2024 at 1:32:51 AM UTC-7 ram.mu...@gmail.com wrote:
Hi,

Could someone look at this post and help me understand what is missing? We think there is no issue in our Django application but Digital Ocean concluded that the issue is from our application.


Best Regards,
~Ram
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/573034cd-fd0a-4a31-97a5-e551416331den%40googlegroups.com.


-- 
We recommend signal.org

Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Your
email software can handle signing.
OpenPGP_signature.asc

Muhammad Juwaini Abdul Rahman

unread,
Mar 6, 2024, 11:40:40 PMMar 6
to django...@googlegroups.com
I always follow the following steps to deploy my site on DO.

Countless attempts and 0 fail. 

Maybe you can try this. If you want to keep trying with your way, also no problem.

--

ram.mu...@gmail.com

unread,
Mar 7, 2024, 12:18:07 AMMar 7
to Django users
Thank you both. I deployed the same site twice on DO droplets without any issues and the site was running fine for a year, but it stopped working lately. I did not find any clue so far. 

1. Before deployment

$ ps -ef | grep runserver rmbl 1424 1414 0 05:02 pts/0 00:00:00 grep --color=auto runserver ----------- 
$ $ sudo nmap -p 4000, 22 > 136.189.5.1 -Pn Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-02-29 05:03 UTC Nmap scan report for 22 (0.0.0.22) Host is up. PORT STATE SERVICE 4000/tcp filtered remoteanything Nmap scan report for rmbl-s-1vcpu-2gb-ams3-01 (136.189.5.1) Host is up (0.000082s latency). PORT STATE SERVICE 4000/tcp closed remoteanything Nmap done: 2 IP addresses (2 hosts up) scanned in 2.15 seconds ------------ $ $ sudo ufw status Status: active To Action From -- ------ ---- OpenSSH ALLOW Anywhere 8080 ALLOW Anywhere 8000 ALLOW Anywhere 5432 ALLOW Anywhere 4000 ALLOW Anywhere OpenSSH (v6) ALLOW Anywhere (v6) 8080 (v6) ALLOW Anywhere (v6) 8000 (v6) ALLOW Anywhere (v6) 5432 (v6) ALLOW Anywhere (v6) 4000 (v6) ALLOW Anywhere (v6) ----------------------

2. After successful deployment:
 
$ $ sudo netstat -lanp | grep 4000 $ $ sudo nmap -p 4000, 22 136.189.5.1 -Pn Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-02-29 05:07 UTC Nmap scan report for 22 (0.0.0.22) Host is up. PORT STATE SERVICE 4000/tcp filtered remoteanything Nmap scan report for rmbl-s-1vcpu-2gb-ams3-01 (136.189.5.1) Host is up(0.000082s latency). PORT STATE SERVICE 4000/tcp closed remoteanything Nmap done: 2 IP addresses (2 hosts up) scanned in 2.14 seconds $ $ ps -ef | grep runserver jenkins 1679 1 1 05:05 ? 00:00:00 /var/lib/jenkins/workspace/dev-rmbl-project/env/bin/python manage.py runserver 0.0.0.0:4000 jenkins 1691 1679 1 05:05 ? 00:00:01 /var/lib/jenkins/workspace/dev-rmbl-project/env/bin/python manage.py runserver 0.0.0.0:4000 rmbl 1727 1414 0 05:07 pts/0 00:00:00 grep --color=auto runserver $ $ sudo nmap -p 4000, 22 136.189.5.1 -Pn Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-02-29 05:08 UTC Nmap scan report for 22 (0.0.0.22) Host is up. PORT STATE SERVICE 4000/tcp filtered remoteanything Nmap scan report for rmbl-s-1vcpu-2gb-ams3-01 (136.189.5.1) Host is up (0.000078s latency).
PORT STATE SERVICE 4000/tcp closed remoteanything Nmap done: 2 IP addresses (2 hosts up) scanned in 2.13 seconds $ $ $wget http://136.189.5.1:4000 --2024-02-29 13:44:39-- http://136.189.5.1:4000/ Connecting to 136.189.5.1:4000... failed: Connection refused.

3. DO support answer:

Upon checking the issue you are facing with the Django application, I can see port 4000 is showing as closed on your Droplet. Please refer to the snippet for the details:

nmap -p 4000,22 136.189.5.1 -Pn
Starting Nmap 7.94 ( https://nmap.org ) at 2024-02-28 13:45 IST
Nmap scan report for 136.189.5.1
Host is up (0.23s latency).
PORT     STATE  SERVICE
22/tcp   open   ssh
4000/tcp closed http-alt

A closed result means, no active service is listening to that port.  In this situation, you would need to check the application status that's configured to run on this port and proceed further with its result. If it's not active, try restarting the service. If it is still failing to start, you might have to troubleshoot further to check what is preventing the services from starting.  If it shows any error please check the logs and proceed accordingly. 

Best Regards,
~Ram

Ram

unread,
Mar 7, 2024, 12:26:59 AMMar 7
to django...@googlegroups.com
Oops! I don´t know why the format is not rendered properly. Pardon me
for pasting it again!.
> You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/_cQl-FWYwbw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5dbc15aa-ca1b-450b-8935-d7834d365a88n%40googlegroups.com.

Muhammad Juwaini Abdul Rahman

unread,
Mar 7, 2024, 12:45:39 AMMar 7
to django...@googlegroups.com
Why do you need to use a non-standard port such as 4000 when deployed on a server?

ram.mu...@gmail.com

unread,
Mar 7, 2024, 1:00:31 AMMar 7
to Django users
We have been using 8000 only but just to avoid this problem we tried 4000 to see whether we can get out of this problem. Basically tested with both 8000 and 4000 so far, but the result is the same.

Best Regards,
~Ram

Reply all
Reply to author
Forward
0 new messages