You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/06/09 14:36:20 UTC

[Bug 56608] New: WatchedResource configured in $TomcatHome\conf\Catalina\localhost context XML file not triggering context reload after working for several days

https://issues.apache.org/bugzilla/show_bug.cgi?id=56608

            Bug ID: 56608
           Summary: WatchedResource configured in
                    $TomcatHome\conf\Catalina\localhost context XML file
                    not triggering context reload after working for
                    several days
           Product: Tomcat 6
           Version: 6.0.39
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: remnar@gmail.com

Created attachment 31700
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31700&action=edit
Log files for the day the error occurred and context reloading stopped being
automatic.  Context file for app in question included.

I have set up a context XML file within $TOMCAT_HOME\conf\Catalina\localhost
which has a docbase on a network fileshare.  I have set up a WatchedResource
for a handful of files on this fileshare so that whenever one of the files is
updated, the context is refreshed.  This works fine for sometime, but after a
while, I see an error in the logs saying "java.io.IOException: The semaphore
timeout period has expired" (Log file with full stack trace is uploaded).

After we notice this error, I had to start the context back via the Tomcat
manager (to be expected, since it appears that a short network unavailability
caused the issue).  However, once the application is started manually, the
WatchedResources being updated no longer force the context to reload.  We have
to reload the context manually until we do a full restart of the Tomcat
service.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56608] WatchedResource configured in $TomcatHome\conf\Catalina\localhost context XML file not triggering context reload after working for several days

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56608

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #5 from Mark Thomas <ma...@apache.org> ---
OK. Things are getting clearer. A few more questions.

When you say manually do you mean with the Manager web application?

What caused the file to be deleted in the first place?

When the file was restored was it exactly the same as the old file including
timestamps? If it was different, how was it different?

What are you host settings for autoDeploy and deployOnStartup?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56608] WatchedResource configured in $TomcatHome\conf\Catalina\localhost context XML file not triggering context reload after working for several days

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56608

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> ---
The error in the log is:
[[[
Jun 5, 2014 4:35:15 PM org.apache.catalina.startup.HostConfig checkResources
WARNING: Error delete redeploy resources from context [/CTIOutreachPrompts]
java.io.IOException: The semaphore timeout period has expired
    at java.io.WinNTFileSystem.canonicalize0(Native Method)
    at java.io.Win32FileSystem.canonicalize(Unknown Source)
    at java.io.File.getCanonicalPath(Unknown Source)
    at java.io.File.getCanonicalFile(Unknown Source)
    at
org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1246)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1382)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
    at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
    at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
    at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
    at java.lang.Thread.run(Unknown Source)
]]]

> which has a docbase on a network fileshare.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56608] WatchedResource configured in $TomcatHome\conf\Catalina\localhost context XML file not triggering context reload after working for several days

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56608

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Ping. Without the requested information this is likely to get closed as
WORKSFORME.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56608] WatchedResource configured in $TomcatHome\conf\Catalina\localhost context XML file not triggering context reload after working for several days

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56608

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Could you provide some more detail please.

Is the context.xml file deleted from $TOMCAT_HOME\conf\Catalina\localhost when
the error occurs?

What state is the app shown in in the Manager app (stopped, missing, ???)

What steps do you perform in the Manager app?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56608] WatchedResource configured in $TomcatHome\conf\Catalina\localhost context XML file not triggering context reload after working for several days

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56608

--- Comment #7 from Mark Thomas <ma...@apache.org> ---
deployOnStartup will be in server.xml on the Host. It will use the default
(true) if not specified.

Thanks for all the information. I think we have enough information to start
looking at this.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56608] WatchedResource configured in $TomcatHome\conf\Catalina\localhost context XML file not triggering context reload after working for several days

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56608

remnar@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #4 from remnar@gmail.com ---
Sorry, I completely forgot to come back and update this ticket with the
information.

The context file was deleted from the $TOMCAT_HOME\conf\Catalina\localhost
directory.  We have a job that is scheduled to run every 5 minutes to check
whether or not the context file exists, and if not replaces the file in the
directory.  After this job ran and replaced the missing file, Tomcat was
showing the application as stopped, and I had to manually start the context. 
However, if one of the "WatchedResource" files was updated, the context would
not refresh.  If I manually did a "Reload", the context would refresh
correctly, but the "WatchedResources" would not trigger a refresh until Tomcat
was restarted.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56608] WatchedResource configured in $TomcatHome\conf\Catalina\localhost context XML file not triggering context reload after working for several days

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56608

remnar@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #6 from remnar@gmail.com ---
> When you say manually do you mean with the Manager web application?
Yes, I used the manager web application


> What caused the file to be deleted in the first place?
I'm honestly not sure on this part.  My assumption was that Tomcat deleted it
for some reason once the network path became unavailable (I had seen the file
get deleted seemingly randomly before, which is why we have the batch file that
replaces the file if it goes missing).


> When the file was restored was it exactly the same as the old file including timestamps? If it was different, how was it different?
The file being restored is exactly the same.  Barring any weirdness in the
windows "copy" command, even the timestamps should be the same.

> What are you host settings for autoDeploy and deployOnStartup?
We have left these settings as default.  From the $TOMCAT_HOME\conf\server.xml
file for the autoDeploy:
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

I cannot find the deployOnStartup setting, but if you let me know where it is
set, I can show you that value to confirm.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org