Solved

Tomcat seems to throw 404 errors every second request when accessing dynamically generated files

Posted on 2010-11-25
2
824 Views
Last Modified: 2012-05-10
We have set up an environment in which exists 2 web servers.

Server 1 - Tomcat Server serving a Java host application.
Server 2 - IIS web server serving a proprietary application via web services

The issue we're having is as follows:

When a specific call is made to a particular web method on Server 2 it generates an html file and associated images on a shared drive. This in itself works fine.

This shared drive is permanently mapped as a virtual directory in Tomcat on Server 1, so that images related to the html page can be retrieved via Server 1 rather than requiring direct access to Server 2.

When the first request is made to retrieve the images, the html and images show fine.
However on subsequent requests Tomcat throws a 404. It then takes a few seconds to untangle itself, then 1 further request will work, followed by a string of 404s.

The individual http requests are completely independent requests for different urls (as the files being requested are dynamically generated with different names each time), and logging shows these files do exist on the drive before Tomcat requests the file to read and stream back.

We believe the problem lies with Tomcat although it's possible something else is going on.
Caching is disabled on the virtual directory.

Any help would be very much appreciated.
0
Comment
Question by:capsoftuk
2 Comments
 
LVL 27

Accepted Solution

by:
BigRat earned 500 total points
Comment Utility
I presume that the images are being created by IIS and are to be retrieved by Apache/TomCat?

It would seem to me that the directory pages of the image directory is being buffered in TomCat or the platform on which it runs. Thus it will randomly give a "file not found" response.

Are the platforms the same, or is this a Linux/Windows environment?
0
 

Author Closing Comment

by:capsoftuk
Comment Utility
Solved otherwise
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now