Rails/Puma: Errno::EADDRINUSE: Address already in use - bind(2) for "0.0.0.0" port 3000
Another process already listens on the port Puma wants.
Errno::EADDRINUSE: Address already in use - bind(2) for "0.0.0.0" port 3000Address already in use - bind(2) for 0.0.0.0:3000 (Errno::EADDRINUSE)Puma Address already in useErrno::EADDRINUSE (Address already in use - bind(2) for "127.0.0.1" port 3000)rails server Address already in use Meaning
Find it with lsof -i :3000 / ss -ltnp | grep 3000, stop it (kill PID), or run on another port (bin/rails s -p 3001, PORT=3001). On macOS Monterey+ port 5000/7000 conflicts with AirPlay; on Linux an old Puma may linger after crashes.
Common causes
- Previous Rails/Puma still running
- Another app on 3000
- Docker publishing the same port
- macOS AirPlay on 5000
- Zombie process after a crash
⚡ Quick fix
lsof -i :3000thenkill -9 PID- Use another port
- Stop the container publishing the port
Detailed fix by platform
Linux
lsof -nP -iTCP:3000 -sTCP:LISTEN
How to diagnose
- Owner — PID?
- Port — Alternative?
- Docker — Published?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- A server is already running. Check /tmp/pids/server.pid Rails: A server is already running (pid: 12345, file: /app/tmp/pids/server.pid). Exiting
- ActiveRecord::AssociationTypeMismatch Rails: ActiveRecord::AssociationTypeMismatch: User(#1234) expected, got "42" which is an instance of String(#5678)
- ActiveRecord::ConnectionNotEstablished Rails: ActiveRecord::ConnectionNotEstablished: No connection pool for 'ActiveRecord::Base' found
Most viewed in Ruby / Rails
- ActiveRecord::PendingMigrationError Rails: ActiveRecord::PendingMigrationError — Migrations are pending. To resolve this issue, run: bin/rails db:migrate
- ActionController::InvalidAuthenticityToken Rails: ActionController::InvalidAuthenticityToken (Can't verify CSRF token authenticity)
- undefined method for nil Ruby: NoMethodError: undefined method `x' for nil (nil:NilClass)
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026