简体   繁体   English

列出httpd和Tomcat之间的AJP连接

[英]List AJP connections between httpd and Tomcat

On a CentOS 7 server, httpd is configured to use AJP to route http traffic to a Tomcat instance running on the same server. 在CentOS 7服务器上, httpd配置为使用AJPhttp流量路由到在同一服务器上运行的Tomcat实例。

What specific bash commands will list and count the AJP connections that exist between httpd and tomcat ? 哪些特定的bash命令将列出并计算httpdtomcat之间存在的AJP连接?

In case it helps, here is the background: 如果有帮助,这里是背景:

The httpd configuration that sends requests to Tomcat via AJP is: 通过AJP向Tomcat发送请求的httpd配置是:

[root@remote-host-name ~]# vi /etc/httpd/conf.d/mydomain.com.conf

<VirtualHost www.mydomain.com:80>
    ServerName www.mydomain.com
    ServerAlias mydomain.com
    ErrorLog /var/log/httpd/mydomain_com_error.log
    CustomLog /var/log/httpd/mydomain_com_requests.log combined
    ProxyPass / ajp://my.public.ip.addr:8012/
    ProxyPassReverse / ajp://my.public.ip.addr:8012/
</VirtualHost>

And the Tomcat config for receiving the AJP -routed connections includes: 用于接收AJP路由连接的Tomcat配置包括:

[root@remote-host-name ~]# vi /opt/tomcat/conf/server.xml
.....
      <Connector port="8012" protocol="AJP/1.3" redirectPort="8446" connectionTimeout="10000" keepAliveTimeout="10000" />
.....  

How do I list and count the live AJP connections between httpd and tomcat at any given moment? 如何在任何给定时刻列出并计算httpdtomcat之间的实时AJP连接?

You can use netstat to find the connections to ajp port 8012 here as per your config netstat -an | 您可以使用netstat根据配置netstat -an |在此处找到与ajp端口8012的连接。 grep 8012 grep 8012

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM