Port 8080 in use ☕ Java

Web server failed to start. Port 8080 was already in use.

Spring Boot couldn’t bind its embedded server port because another process uses it.

Seen on: Java

Meaning

Another app or a previous instance of your app is running on that port.

Common causes

  • Previous instance still running (IDE, terminal)
  • Another service on 8080 (Tomcat, Jenkins, Docker)

⚡ Quick fix

  1. Stop the other process (lsof -i :8080)
  2. Change server.port
  3. Use server.port=0 for a random port in tests

Detailed fix by platform

Java

  1. server.port=8081 in application.properties

How to diagnose

  1. Port — Which one?
  2. Owner — lsof -i :8080

🧠 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.