In project development, it is sometimes necessary to start multiple Tomcat services at the same time, and if you start multiple directly, the following error is reported:
Port busy xxxx java.net.SocketException:Unrecognized Windows Sockets error:0: Jvm_bind,
This is the port is occupied, so what we need to do is to change the port, first to the Tomcat Conf folder to find the Server.xml configuration file, three places need to change the port: 1. Modify the HTTP access port (default is 8080 port), for example, 8888
<connector classname= "Org.apache.coyote.tomcat4.CoyoteConnector" port= "8080"
minprocessors= "5" maxprocessors= "enablelookups="
true " redirectport=" 8443 "
acceptcount=" " debug=" 0 " connectiontimeout= "20000"
useurivalidationhack= "false" disableuploadtimeout= "true"
2. Modify the shutdown port (default is 8005 port), e.g. change to 8006
<server port= "8005" shutdown= "shutdown" debug= "0" >
3. Modify the JVM boot port (default is 8009 port), e.g. change to 8019
< Connector ClassName = "Org.apache.coyote.tomcat4.CoyoteConnector"
port = "8009" minprocessors = "5" maxprocessors = "enablelookups" = "
true" redirectport = "8443"
acceptcount = "Ten" debug = "0" connectiontimeout = "20000"
Useurivalidationhack = "false"
Protocolhandlerclassname = " Org.apache.jk.server.JkCoyoteHandler "/>
To complete the configuration modification, restart the Tomcat,ok.