Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache web server tomcat : Connector protocol conflict

 
Kim Ming Yap
Ranch Hand
Posts: 53
Android C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's something i dont quite understand as shown below:

a. Apache web server httpd.conf

ProxyPass /cgi-qa-axis-rt/ ajp://localhost:8988/cgi-qa-axis-rt/
ProxyPassReverse /cgi-qa-axis-rt/ ajp://localhost:8988/cgi-qa-axis-rt/

b. On the cgi-qa-axis-rt context, the server.xml is as follows:

<!-- -->
<Connector executor="tomcatThreadPool"
port="8988" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->

<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--Connector port="8888" protocol="AJP/1.3" redirectPort="8443" connectionTimeout="3000000" keepAliveTimeout="3000000" /-->


Question:
Apache web server will transfer the request to cgi-qa-axis-rt using ajp protocol. In cgi-qa-axis-rt server.xml, this ajp connector port is commented out. In cgi-qa-axis-rt server.xml, port 8988 is using HTTP protocol.
Why does it work?
Apache managed to transfer request to cgi-qa-axis-rt.
Strange
 
Rob Spoor
Sheriff
Pie
Posts: 20526
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I can tell, ProxyPass forwards the request to port 8988 - the HTTP connector, not the AJP connector. So it doesn't look so strange to me.
 
Kim Ming Yap
Ranch Hand
Posts: 53
Android C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The proxypass statements, if you read carefully:

ProxyPass /cgi-qa-axis-rt/ ajp://localhost:8988/cgi-qa-axis-rt/

it is mapping /cgi-qa-axis-rt/ to localhost:8988/cgi-qa-axis-rt/ using ajp protocol. So it is not using HTTP in this statements. This statement is in apache web server httpd.conf.

However the tomcat server.xml for cgi-qa-axis-rt context in localhost is defined with HTTP connector for port 8988. The AJP connector has been commented out.

It still works. That's what puzzles me.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would check to see if you have 2 copies of Tomcat running, then. Because either your proxy definition isn't the one being used, or something is out there listening and responding on port 8988. Unless an application opens a port, attempts to communicate with that port will bounce.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic