How to start multiple Tomcat services at the same time

Source: Internet
Author: User


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.





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.