https://issues.apache.org/bugzilla/show_bug.cgi?id=56056
Bug ID: 56056
Summary: Tomcat fail to redeploy application, when webapps is
on NFS file system
Product: Tomcat 7
Version: 7.0.42
Hardware: All
OS: BeOS
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
When a new WAR file is copied to the 'webapps' in redepoyment mode
(unpackWar=true), tomcat is unable to complete redeployment in many case, where
the NFS unpacked applications can not be completed.
The reason for the partial delete is that NFS file delete will sometimes rename
the removed file to ".nfsNNNNN". This is usually result of some process the
file open (can be a thread in the application, leaked resources, or a user on
any machine that can view/inspect files/folders in the unpack tree.
While it is bad for any application to have leaked open connections to
resources in the WAR, it is impossible to identify and fix all resource
leakages in third part libraries, etc.
If any file is still open in the unpacked WAR, the directory where the file use
to exists can not be removed. If tomcat can not removed the top level directory
of the old app, it will not redeploy the new WAR. leaving the server without
any running instance of the application.
The requested fix is to add an option (either with passing '-d' to catalina.sh,
or new option in the container XML (similar to antiJARLocking). The new feature
(possible name: 'redeployNFS' ?), will use the following logic for redeployt:
Try to remove the unpacked WAR
If the removal was not completed, sleep 3 seconds, then try again (NFS removal
are not always instant, because some NFS data may be cached on the client).
If the removal is still incomplete, rename the unpacked war (e.g.,
nfs-WAR.YYYY-MM-DDTHH:MM:SS) folder
If the rename works, continue with redeploy. Otherwise stop.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]