After configuring the tomcat server in Eclipse IDE we may get problems with starting the tomcat server. This problem may occur due to different reasons, and we will get the message:- Problem Occurred:- ‘Starting Tomcat Server at localhost’ has encountered a problem. Server Tomcat v10.0 Server at localhost failed to start.
In addition to this message we also get detail message. Based on those message we will solve the problem. Different detail message which we get while encountering the Problem are,
- The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.
- Port 8080 required by Tomcat v10.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
Before getting into the problem, we must know that tomcat server contain three types of port. Those are:- connector port, shutdown port, redirect port. All those port must be valid and unique.
In the windows operating system, we get 1 to 65,536 ports. Among these from 1 to 1024 port numbers are reserved for the Windows operating system services. And 1025 to 65,536 is used for external software. Example:- Oracle s/w, MySQL s/w, and e.t.c. In Eclipse’s tomcat server we must assign the port number which is not already used by any other software.
Tomcat Server cannot be started because one or more of the ports are invalid
Problem Occurred:- ‘Starting Tomcat Server at localhost’ has encountered a problem. Server Tomcat v10.0 Server at localhost failed to start. The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.
This problem occurred due to the wrong port number for the shutdown attribute. After the Tomcat server configuration with Eclipse IDE, the default port number will be “-1” for the shutdown attribute, which stops Eclips to start the tomcat server. We must change this port number. You can choose 7000, 3030, 4040, and e.t.c. port numbers which are rarely used by any software.
Solution
To change the port number of tomcat server’s go to Project Explorer => Select Server application => Open server.xml file.

In the server.xml file change the port number for the server. When the server.xml file is opened in design mode then modify the value of “port”, and save the file.

OR,
If server.xml is opened in source mode then search for the first <Server> tag and “port” attribute. Modify the details and save the file.
<Server port="7000" shutdown="SHUTDOWN">
Tomcat Failed to Start: Port Required by Tomcat Server at localhost is Already in Use
Problem Occurred:- ‘Starting Tomcat Server at localhost’ has encountered a problem. Server Tomcat v10.0 Server at localhost failed to start.
Port 8080 required by Tomcat v10.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
There are 2 possible reasons for this problem,
1) Problem with port number configuration
2) Tomcat server is already running in the background.
Most of the time we get this error because the Tomcat server is already running outside of the eclipse or it is running in the background. Go to the task manager and end the task.
The Tomcat server of Eclipse IDE is different from the original tomcat server installed on our computer therefore the connector port number of both tomcat servers must be different.
Solution
- Stop the already running tomcat server on the computer. Open the task manager or kill the process.
- Or, change the port number of the tomcat server for the <Connector> tag.
The tomcat server available in the Eclipse IDE is a copy of original tomcat server. Both are seperate tomcat server of same version, at the same connector port number. Therefore,
- We can’t run both tomcat server at a time, because they have same port number for connector.
- The configuration files (server.xml, tomcat-users.xml, and e.t.c.) are different from each other. The modification done in original tomcat server won’t reflect in the Eclipse’s tomcat server, and vice-versa.
- The deployed web application in Eclipse’s tomcat server will not be available at the original tomcat server, and vice-versa.
To change the port number of tomcat server’s go to Project Explorer => Select Server application => Open server.xml file.
In server.xml file change the port number for server. When server.xml file is opended in design mode then modify the value of “port” for the Connector, and save the file.
Or,
If server.xml is opened in source mode then search for the first <Connector> tag and “port” attribute. Modify the details and save the file.
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
Change port=“8080” to the other port number like port=“3999”. Don’t forget to save the file, else modification won’t reflect.
If you enjoyed this post, share it with your friends. Do you want to share more information about the topic discussed above or do you find anything incorrect? Let us know in the comments. Thank you!
Thank you! Through your post, it was a quick fix for me.