我们已经使用该服务器作为 Django 应用程序开发服务器一年了,但无论我们在哪个端口启动应用程序,它都会停止启动网站。Digital Ocean 托管支持表示问题应该出在应用程序上。我想知道我们遗漏了什么?
$ 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)
----------------------
$
$ 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.