The server cannot started because one or more of the ports are invalid [Tomcat in Eclipse]

The issue is that the Tomcat admin port was not defined. You need to have it as an actual number such as 9000 rather than as a hyphen -.

Tomcat 9 configuration page (Eclipse)


This issue came in Tomcat 9 version starting from Eclipse.

The server cannot started because one or more of the ports are invalid

Only Modify the server ports "Tomcat Admin Port" default value from hyphen (-) to zero(0) it's working fine.

enter image description here


This is because the tomcat admin port or any other port was not defined.

enter image description here

Click ok and open the tomcat server at localhost.

enter image description here

In the highlighted area, if the port number is not defined then give it a port number, save the file and run again.