This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes Java app server intermittently throws FileNotFoundException on files found on NFS... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Java app server intermittently throws FileNotFoundException on files found on NFS..." Watch "Java app server intermittently throws FileNotFoundException on files found on NFS..." New topic
Author

Java app server intermittently throws FileNotFoundException on files found on NFS...

Teddy Wang
Greenhorn

Joined: Sep 17, 2003
Posts: 19
We've got an application that runs on Weblogic 9.2 which intermittently throws FileNotFoundException's on files that definitely exist on an NFS mounted NAS filesystem.

Here's an example of a FileNotFoundException from the application logs:



Doing a simple dir on that server shows the file as being there and having a timestamp of Sep 16 15:33:



I�m also able to cat the file without issue.

No errors seen in /var/log/messages for the time that the error was thrown.

If anybody has any ideas as to how to fix this, it'd be greatly appreciated.
Peter Lawrey
Ranch Hand

Joined: Dec 21, 2008
Posts: 62
Whenever I have seen strange behaviour which only occurs on NFS it has been due to a bug on Linux in NFS.
I suggest you ensure you have the latest patches for NFS and check your NFS mount settings.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952
    
  19

NFS does have its irritations. I believe there's some RPC stuff that you can start that helps. Also, I think NFS4 is supposed to make a lot of things faster and more reliable.


Customer surveys are for companies who didn't pay proper attention to begin with.
Teddy Wang
Greenhorn

Joined: Sep 17, 2003
Posts: 19
Here's the /etc/mtab for the NFS mount:

nas111:/pfs_0111/mycompprdapps/ofc_sitecachea /apps/ofcsctp1/sitecacheA nfs rw,noatime,nodiratime,bg,hard,rsize=8192,wsize=8192,timeo=14,intr,addr=111.111.111.111 0 0
[ December 30, 2008: Message edited by: Teddy Wang ]
Teddy Wang
Greenhorn

Joined: Sep 17, 2003
Posts: 19
Figured it out. Freemarker is actually throwing the wrong exception due to non-thread-safe code. The issue was due to Freemarker's cache implementation. When we set the max-soft/hard size of their default cache from a value to 0, the issue went away.

Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java app server intermittently throws FileNotFoundException on files found on NFS...
 
Similar Threads
getting stuck threads in the application
Weblogic StuckThreadTimeOut
Thread stuck
Anyone know what this error means?
Need Help in finding out the issue