Tomcat Server Error - Port 8080 already in use
In case of MAC users, go to Terminal and do the following
lsof -i :8080 //returns the PID (process id) that runs on port 8080
kill 1234 //kill the process using PID (used dummy PID here)
lsof -i :8443
kill 4321
8080 is HTTP port and 8443 is HTTPS port, by default.
All I had to do was to change the port numbers
.
Open
Eclipse
Go to
Servers panel
Right click on Tomcat Server select
Open
,Overview window
will appear.Open the
Ports
tab. You will get the following:Tomcat adminport
HTTP/1.1
AJP/1.3
I changed the port number of
HTTP/1.1
(i.e. to8081
)You might have to also change the port of
Tomcat adminport
(i.e. to8006
) and ofAJP/1.3
(i.e. to8010
).Access your app in the browser at
http://localhost:8081/...
For Ubuntu/Linux
Step 1: Find the process id that is using the port 8080
netstat -lnp | grep 8080
or
ps -aef | grep tomcat
Step 2: Kill the process using process id in above result
kill -9 process_id
For Windows
Step 1: Find the process id
netstat -ano | findstr 8080
Step 2: Open command prompt as administrator and kill the process
taskkill /F /pid 1088
In my case port 8005 was already in use so I used the same above steps.
If you want to regain the 8080 port number you do so by opening the task manager and then process tab, right click java.exe process and click on end process as shown in image attached.