When you run a program using the Tomcat server, we may encounter problems such as:
By the above information can be found that the problem is because the 8005 port number is already occupied, so we need to set up such a port number, so find the installation location of Tomcat in the Conf folder in the Server.xml file in the port number replaced:
Locate the code in the red box and change the port number to another unused (for example, 8006):
When this is done, our previous problems may be resolved, and the issue will no longer be running in MyEclipse. But sometimes there are the following errors:
caused by: Socket bind failed: [730048]????????? X??? (э?é/??????? /???)???? Í??
In this way, we have to think about the problems caused by other aspects: process occupancy. So we need to start the Task Manager, See if there are multiple processes running with the same name: Find the Javaw.exe process in it, end it, then reopen MyEclipse (which starts a javaw.exe process), and re-add and run the Tomcat server (which results in a javaw.exe process). So if there is only one Tomcat server on the computer, but there are more than two Javaw.exe in the task Manager, then there will be a problem with the process call error, and the above error is indicated. Therefore, the cause of the problem is summarized as follows:
1) First use the command Netstat-ano to see each port occupancy and process PID (80 port is 3296 occupied, 8005 is occupied by 4148).
2) End number conflict--Modify port number in Server.xml
3) Tomcat is restarted repeatedly, causing the process not to be terminated and re-invoked, so the call fails--and restarts Tomcat and MyEclipse after shutting down
4) If step 3 does not work, open Task Manager, look for a process named Javaw.exe, close it, and then restart MyEclipse and Tomcat.
Because of the difference between the MyEclipse and the Tomcat version, sometimes there are a lot of casual questions about our project, but it's a fairly common problem, so don't be afraid.
Critical: Standardserver.await:create[localhost 8005]:java.net.bindexception