netstat -ano | findstr :PORT
lsof -i :PORT
netstat -tlnp | grep :PORT
telnet localhost PORT
curl -v http://localhost:PORT
Cause: The application/server is not started
npm start
(Node.js/React)python manage.py runserver
(Django)flask run
(Flask)ng serve
(Angular)
sudo systemctl start mysql
(MySQL)sudo systemctl start postgresql
(PostgreSQL)redis-server
(Redis)mongod
(MongoDB)
Cause: Trying to connect to the wrong port
Cause: The service started but then crashed
Cause: Firewall is blocking the port
netsh advfirewall firewall add rule name="Allow Port 3000" dir=in action=allow protocol=TCP localport=3000
sudo ufw allow 3000
(Ubuntu)sudo firewall-cmd --add-port=3000/tcp --permanent
(CentOS/RHEL)
Cause: Service is only listening on specific network interface
flask run --host=0.0.0.0
python manage.py runserver 0.0.0.0:8000
node server.js --host 0.0.0.0
PORT=3001 npm start
kill -9 $(lsof -t -i:3000)
redis-cli ping