Problems with AJP port of tomcat

The AJP port problem of tomcat
I published two tomcat services on one server, because of the conflict, I modified the service port and AJP port of one of them. The
problem is as follows:
        Modify the AJP port application access page shows an error. It's good to change back to 8009, but you can't both be 8009, then there is a conflict, how to solve this, and what should be set on the application side?
   <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
   
------Solution------ --------------
I encountered a situation today. I installed a BO and brought my own tomcat. At this time, I need to modify three places
to modify the port number of Tomcat:
   by default, tomcat The port of Tomcat is 8080. If there is a conflict with the port number of 8080, you can modify the port number of Tomcat as follows:
First: In the root (installation) directory of Tomcat, there is a conf folder, double-click to enter the conf folder, and find the Server in it .xml file, open the file.
Second: find the following text in the file:
<Connector port="8080" protocol="HTTP/1.1" 
               maxThreads="150" connectionTimeout="20000" 


<Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" debug="0" connectionTimeout="20000" 
disableUploadTimeout=" true" /> and so on;

finally: change port="8080" to something else. Such as port="8081" and so on.
Save the server.xml file, restart the Tomcat server, and Tomcat can use port 8081.
Note that sometimes two tomcats are used, so you need to modify the port number of one of them to make the two work at the same time.
After modifying the above, there are two more modifications:
(1) Change 8009 of <Connector port="8009" enableLookups="false" redirectPort="8443" debug="0"
protocol="AJP/1.3" /> for other ports.
(2) Continue to <Server port="8005" shutdown="SHUTDOWN" debug="0"> 8005 to other ports.
After the above 3 modifications, it should be fine.
------Solution----------------------
[Modify the AJP port application access page display error. ] Modify the port. As long as Tomcat starts normally, there will be no display error problem you said.
Remember the following points:
1. Any service (tomcat or apache) cannot have the same port on the same machine. This local startup needs to solve the port conflict problem, as said on the first floor. The conflict of tomcat itself will be: a, management port (default 8005) b, http port c, ajp port. So your two tomcats on the same machine must check that these ports do not conflict. (This first floor has already made it very clear) Modify the tomcat log, the log is the biggest help.
2. You need to pay attention that the browser still uses the HTTP port (such as 8080) to access the page after modification. The AJP port is not for browser access. AJP and HTTP are completely different protocols. AJP is specially used for cluster load in Apache+TOMCAT or NGINX+TOMCAT mode.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324978373&siteId=291194637