Why do you need to use a non-standard port such as 4000 when deployed on a
server?

On Thu, 7 Mar 2024 at 13:18, [email protected] <[email protected]>
wrote:

> 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
>
> On Wednesday, March 6, 2024 at 9:40:40 PM UTC-7 Muhammad Juwaini Abdul
> Rahman wrote:
>
>> I always follow the following steps to deploy my site on DO.
>>
>> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu
>>
>> Countless attempts and 0 fail.
>>
>> Maybe you can try this. If you want to keep trying with your way, also no
>> problem.
>>
>> On Thu, 7 Mar 2024 at 12:02, [email protected] <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> Hoping someone can provide some clue on this?
>>>
>>> Best regards,
>>> ~Ram
>>>
>>> On Tuesday, March 5, 2024 at 1:32:51 AM UTC-7 [email protected] 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.
>>>>
>>>>
>>>> https://serverfault.com/questions/1155482/django-site-is-not-opening-up-on-digital-ocean-ubuntu-droplet
>>>>
>>>> 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 [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/573034cd-fd0a-4a31-97a5-e551416331den%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/573034cd-fd0a-4a31-97a5-e551416331den%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5dbc15aa-ca1b-450b-8935-d7834d365a88n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/5dbc15aa-ca1b-450b-8935-d7834d365a88n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFKhtoR02i2LBFSV8ZnJqrdybGrZmsqPFaZs4HCXSXHxgWRvPw%40mail.gmail.com.

Reply via email to