Tomcat listens to mq, causing ngxin to forward no request to it, and it will retrieve data from mq, ngxinmq
The problems encountered today are described as follows:
Local Configuration
Ngxin port 80
2017at1 8080
Tomcat2 8081
Tomcat3 8082
Problem: the same programs deployed at worker at1, 2, and 3 are all started. nginx performs load balancing on worker AT1 and 2. When a request arrives, nginx distributes the request to tomat1, 2, the result shows that Tomcat 3 is also processing the request by checking the log.
Cause: program mechanism problems. When a request is forwarded to tomat1 or 2, tomcat1 and 2 will accept the request and retrieve the request parameters, such as json strings, and put them in rabbitMQ instead of directly processing it. The program itself has a monitoring mechanism for MQ. When the program finds itself in idle state, it will take the initiative to retrieve and process data in MQ. So although Tomcat R3 does not receive requests forwarded by nginx, It listens to MQ, so that it automatically retrieves and processes the data when queue messages are in MQ, this leads to the problem described in the question.