Several common error reporting and startup problems of Tomcat

error: a child container failed during start

1.Caused   by:   java.lang.IllegalArgumentException:   Servlet   mapping   specifies   an   unknown   servlet   name   Action  
this means that this node does not know. We only need to find the relevant web.xml file and delete the following nodes
 & lt; servlet-mapping>   
⦁      & lt; servlet-name> Action</ servlet-name>   
⦁      & lt; url-pattern>/ public/Action</ url-pattern>   
⦁  & lt;/ servlet-mapping>  

2..Caused   by:   java.lang.IllegalArgumentException:   The main resource set specified… Is not valid
generally speaking… The path of this project can not be found. I just made this mistake

Tomcat startup problem

When eclipse edits a web page, Tomcat used well before. I don’t know where to delete or modify it, and then when you start tomcat, an error is reported “ server Tomcat v7.0 server at localhost failed to start

Solution:
  1. Open your workspace folder in the following path:
& lt; workspace-directory>\. Metadata \. Plugins \ org. Eclipse. Core. Resources
then delete it  . Snap file. When eclipse is open, there is this. Snap file. Delete it
  2. Open the workspace folder in the following path:
& lt; workspace-directory>\. Metadata \. Plugins \ org. Eclipse. WST. Server. Core
delete the temp * folder. I have temp0 and temp1, which may be a Tomcat corresponding to a temp. Restart eclipse after deletion, and Tomcat can be used

 

⦁   4. The port of Tomcat server is occupied
when running the program, you will be prompted to start the Tomcat server. If there is a problem, port 8005 is occupied
 

 

Solution 1: open the task manager (ALT + Ctrl + Del), find the Java related process,
and then force it to close( These ports are already occupied by an application, so Tomcat cannot be started; End a javaw.exe process and Tomcat starts normally)

 

Solution 2: CMD enter the console and enter the command netstat   – ano|findstr   8005  ( Enter whatever port number is occupied) and press enter
 

 

It is found that process 2044 occupies this port
next, enter the command
taskkill  / pid   2044 /f     Enter. 2044 here corresponds to 2044 in the above figure
 

 

after terminating the process occupying the port, you can restart the Tomcat server

Similar Posts: