tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zoran Avtarovski <zo...@sparecreative.com>
Subject Re: Spring Scheduled Task is triggered multiple times
Date Fri, 03 Jul 2015 00:42:02 GMT
Hi Andre,

On 2/07/2015 11:59 pm, "André Warnier" <aw@ice-sa.com> wrote:

>Christopher Schultz wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>> 
>> Zoran,
>> 
>> On 7/2/15 1:22 AM, Zoran Avtarovski wrote:
>>> We have a struts2 based app that uses spiring scheduling to trigger
>>> a task every morning at 6am.
>>>
>>> The problem we have is that task in triggered multiple times,
>>> simultaneously.
>> 
>> What evidence do you have that the task is triggered multiple times?
>> (I'm not saying I don't believe you, I'm just curious... it might help
>> determine WHY it's being run twice.)
>> 
>>> We have an Ubuntu 14.04.1 Server using the standard tomcat 7
>>> installed using apt-get and running on oracle java 8.
>> 
>> Ubuntu tends to be relatively up-to-date compared to other distros,
>> but do you know what version of Tomcat 7 you actually have? It won't
>> have anything to do with this problem, but upgrading to latest is
>> always recommended.
>> 
>>> Tomcat is configured as a stand alone not a cluster and I had a
>>> look at the servers.xml file and it only has one host.
>>>
>>> It has to be the way we have tomcat configured, but I can¹t see
>>> what. I changed from quartz to spring scheduling thinking the issue
>>> was quartz, but that made no difference.
>>>
>>> I¹d really appreciate any pointers at this stage.
>> 
>> At first, I was sure the issue would be multiple-deployment, triggered
>> by putting a <Context> element in your server.xml that pointed to a
>> WAR file (or exploded WAR directory) in your webapps/ folder. That
>> would do it. But you posted your server.xml elsewhere in this thread,
>> and that's not the problem.
>> 
>> But you might still have a double-deployment.
>> 
>> Do you have any files in CATALINA_BASE/conf/Catalina/localhost/? If
>> so, which ones and what do they contain?
>> 
>> What do you have in CATALINA_BASE/webapps/?
>> 
>> How do you launch Tomcat?
>> 
>
>Also, if an application is being doubly-deployed, it should be visible in
>the Tomcat 
>logfile (at the beginning, when Tomcat starts).

I can’t see any indications in the log the app is being doubly-deployed
but it looks like the spring config is loaded multiple times which is
causing spring to trigger the task multiple times. I suspect that
something that we, or our hosting provider, has done is causing the spring
issue and I just can’t see where that might be.

Z.

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



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


Mime
View raw message