I have a Java Servlet called "ARI" which retrieves data from an archive database and returns an XML payload with rows from that database.
We have multiple instances of this servlet running on virtual servers from the one box and can be accessed by a different port number like so:
testserver.co.uk:61061/aricp/ari
testserver.co.uk:61062/aricp/ari
Both of these servlets can be accessed succesfully directly from the client here is a sample conversation between client and server taken by packet capturing.
Successfull HTTP Request:
POST /aricp/ari HTTP/1.1 Accept-Charset: UTF-8
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
User-Agent: Java/1.6.0_25
Host: testserver.co.uk:61061
Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2
Connection: keep-alive
Content-Length: 11
id=1-134ISR
note the POST variable "id" in the request
Successfull Response
HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Tue, 08 Jan 2013 17:48:49 GMT
Content-type: text/html
Transfer-encoding: chunked
03a6
*Successful HTTP Request Server Log *
[09/Jan/2013:10:25:33] fine (16359): for host 10.232.191.87 trying to GET /aricp/ari, ntrans-j2ee reports: mapped uri "/ari" in context "/aricp" to resource "ARI"
So it is ok to send direct requests to our servlet however if we use ZEUS ZXTM to indirectly handle requests from the client to all instances of our servlet it does not work.
Here is a failed HTTP Request note the difference in the HOST address as ZEUS is the intermediary.
ZEUS Failed HTTP Request
POST /aricp/ari HTTP/1.1 Accept-Charset: UTF-8
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
User-Agent: Java/1.6.0_25
Host: zeus.co.uk:61061
Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2
Connection: keep-alive
Content-Length: 11
id=1-PUZK7D
ZEUS Failed HTTP Response
HTTP/1.1 404 Not found
Server: Sun-ONE-Web-Server/6.1
Date: Tue, 08 Jan 2013 18:05:45 GMT
Content-length: 292
Content-type: text/html
When using ZEUS the web server fails to interpret the request coming from ZEUS as a servlet request, instead it seems to interpret the request URI as a file path literally and we get a 404 not found.
ZEUS Failed HTTP Request Server Log
[09/Jan/2013:10:50:45] warning (16886): for host 10.232.184.53 trying to GET /aricp/ari, send-file reports: HTTP4142: can't find /u02/SunONE61060/docs/aricp/ari (File not found)
As you can see its treating the uri as a directory path instead of an application path.
This is a very strange problem.
Things I have tried
- Removing the Access Control List to ensure no access was restricted
- Refreshing servlet and virtual server
- Refreshing ZEUS
- Restarting Sun One Web server
- Reinstalling servlet on virtual server
So in summary it is working fine like so:
Client --> Server
However it is not working when doing this:
Client --ZEUS --> Server
I am just about to go and refresh install of a new Virtual Server and see what happens.
Any ideas or theories welcome.