Did you mean to visit localhost:8080?
💡 Pro Tip: Port 8080 is the default for many Java applications. If you're getting "port already in use" errors, check what's currently running or try port 8081.
Quick Commands for Port 8080
Find what's using port 8080:
lsof -i :8080
(Mac/Linux)
netstat -ano | findstr :8080
(Windows)
Kill the process:
kill -9 PID
(Mac/Linux)
taskkill /PID PID /F
(Windows)
About Port 8080
Port 8080 is commonly used by:
- Spring Boot applications (default port)
- Tomcat server (default port)
- Vue.js development server
- Webpack development server
- Jenkins CI/CD server
- Apache HTTP Server (alternative port)
Common Issues with Port 8080
"Port 8080 is already in use"
This error occurs when another application is already using port 8080. Solutions:
- Find and close the application using port 8080
- Use a different port:
- Spring Boot:
server.port=8081
in application.properties
- Tomcat: Edit server.xml or use
-Dport=8081
- Vue.js:
vue-cli-service serve --port 8081
- On Windows, find and kill the process:
netstat -ano | findstr :8080
then taskkill /PID [PID] /F
- On Linux/Mac:
lsof -i :8080
then kill -9 [PID]
✅ Quick Solution
Try running your Spring Boot app on a different port: java -jar app.jar --server.port=8081
"Connection refused to localhost:8080"
If you can't connect to your application:
- Verify the application has started successfully (check logs)
- Ensure the application is binding to the correct interface (0.0.0.0 or localhost)
- Check if a firewall is blocking the connection
- Try using 127.0.0.1:8080 instead of localhost:8080
"CORS errors when connecting to localhost:8080"
If you're seeing CORS errors in your browser console:
- Configure your backend to allow CORS:
- Spring Boot: Use
@CrossOrigin
or configure a CORS filter
- Tomcat: Configure a CORS filter in web.xml
- Ensure you're using the correct protocol (http vs https)
- For development, consider using a proxy in your frontend configuration