Skip to main content
PORT 1521 / TCPDatabase & CacheExposure Risk: Critical

Port 1521: Oracle DB — Oracle Net Listener

Default communication port for Oracle Database connections.

Default Service
Oracle DB
Process: tnslsnr
Transport Protocol
TCP
IANA Registered Port 1521
Docker Port Flag
-p 1521:1521
Container to Host Mapping

How to Check & Kill Process on Port 1521 (EADDRINUSE Fix)

macOS & Linux (lsof / kill)
# Find process using port 1521
sudo lsof -i :1521

# Instantly kill process on port 1521
lsof -ti:1521 | xargs kill -9
Windows (PowerShell & CMD)
# Find PID listening on port 1521
netstat -ano | findstr :1521

# Force kill by PID
taskkill /PID <PID_NUMBER> /F
Cross-Platform Node.js One-Liner
# Kill port 1521 via npx
npx kill-port 1521

# Or diagnose via Castov CLI
npx castov fix "EADDRINUSE :::1521"
Linux Firewall (UFW) & Connectivity Test
# Test if port 1521 is reachable
nc -zv localhost 1521

# Allow or deny port 1521 in UFW
sudo ufw allow 1521/tcp

Frequently Asked Questions about Port 1521

What is Port 1521 used for?

Port 1521 is the standard network port for Oracle DB (Oracle Net Listener) operating over TCP. The typical system daemon or process is tnslsnr.

How do I kill a process running on Port 1521 (EADDRINUSE)?

On macOS and Linux, run: lsof -ti:1521 | xargs kill -9 (or npx kill-port 1521). On Windows PowerShell/CMD, run: netstat -ano | findstr :1521 and then taskkill /PID <PID> /F.

Is it safe to expose Port 1521 to the internet?

Port 1521 has a Critical security risk profile. Default communication port for Oracle Database connections.

Other Common Network Ports