This is how you can fix Eclipse Error: Starting Apache TomCat at localhost has encountered a problem!
Error looks something like this:
Most of the time this means that Tomcat is already running in the background and Eclipse is trying to open it again on the same ports. Which is obviously not possible, as the ports will be in use.
Issue typically arises from either Eclipse or Tomcat process crash or being stuck.
This is how you can go about fixing the issue:
1. Go to server tab and double click on the TomCat server, configuration file for Tomcat will open and look like this:
2. Mark down the Port Number Tomcat is running on.
3. In my case, I see ports: 8013, 8014 and 8015
4. Go to command prompt and execute following lines in succession (make sure to change ending port numbers to your own Tomcat ports)
netstat -o -n -a | findstr 0.0:8013
netstat -o -n -a | findstr 0.0:8014
netstat -o -n -a | findstr 0.0:8015
Once you do so, you’ll get a result similar to this:
As you can see in above screenshot, in my case, port 8013 is not running, but ports 8014 and 8015 are being used and they are running using PID (process id): 15484
This PID number (15484 in my case) is something you need to mark down.
5. Now all you need to do is to go to your Windows Task Manager, click on Details Tab (in Windows 8) and sort the processes by PID number.
6. Find the Tomcat PID(s) which you’ve found earlier, higlight the task (typicall it’ll be java process) and click “End Task Button”
7. Now you can go back to Eclipse and run the task on your server as you would typically do. It should work again.
Let me know if this helped you in any way.