Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Kapua » Batch jobs fails on second execution
Batch jobs fails on second execution [message #1808248] Thu, 20 June 2019 09:48 Go to next message
Pedro de Arquer is currently offline Pedro de ArquerFriend
Messages: 34
Registered: December 2018
Member
I've been trying the batch jobs and I've observed that, after a first successful execution, the second time the job is executed it doesn't take effect. I've simplified the example to a single batch job that stops a bundle.
The first time I execute the job, the output in the log is:
09:31:00.132 [pool-2-thread-26] INFO  o.e.k.j.e.j.l.KapuaJobListener - JOB 6791766310560845295 - job-CfmCPd7Sp3c-XkEzeaJxze8 - Running before job...
09:31:00.171 [pool-2-thread-26] INFO  o.e.k.j.e.j.l.KapuaJobListener - JOB 6791766310560845295 - job-CfmCPd7Sp3c-XkEzeaJxze8 - Running before job... DONE!
09:31:00.237 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetReader - JOB 6791766310560845295 - Opening cursor...
09:31:00.242 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetReader - JOB 6791766310560845295 - Opening cursor... Done!
09:31:00.249 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetReader - JOB 6791766310560845295 - Reading item...
09:31:00.249 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetReader - JOB 6791766310560845295 - Reading item... Done!
09:31:00.249 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.AbstractTargetProcessor - Processing item: 4931960327324835910
09:31:00.555 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.AbstractTargetProcessor - Processing item: 4931960327324835910 - Done!
09:31:00.555 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetReader - JOB 6791766310560845295 - Reading item...
09:31:00.555 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetReader - JOB 6791766310560845295 - Reading item... Done!
09:31:00.555 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetWriter - JOB 6791766310560845295 - Writing items...
09:31:00.569 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetWriter - JOB 6791766310560845295 - Writing items... Done!
09:31:00.635 [pool-2-thread-26] INFO  o.e.k.j.e.j.l.KapuaJobListener - JOB 6791766310560845295 - job-CfmCPd7Sp3c-XkEzeaJxze8 - Running after job...
09:31:00.647 [pool-2-thread-26] INFO  o.e.k.j.e.j.l.KapuaJobListener - JOB 6791766310560845295 - job-CfmCPd7Sp3c-XkEzeaJxze8 - Running after job... DONE!

Then I can see the bundle stopped. I start the bundle and then launch again the stop job, but this time the output in the logs is:
09:31:34.718 [pool-2-thread-26] INFO  o.e.k.j.e.j.l.KapuaJobListener - JOB 6791766310560845295 - job-CfmCPd7Sp3c-XkEzeaJxze8 - Running before job...
09:31:34.753 [pool-2-thread-26] INFO  o.e.k.j.e.j.l.KapuaJobListener - JOB 6791766310560845295 - job-CfmCPd7Sp3c-XkEzeaJxze8 - Running before job... DONE!
09:31:34.822 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetReader - JOB 6791766310560845295 - Opening cursor...
09:31:34.826 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetReader - JOB 6791766310560845295 - Opening cursor... Done!
09:31:34.833 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetReader - JOB 6791766310560845295 - Reading item...
09:31:34.833 [pool-2-thread-26] INFO  o.e.k.j.e.c.o.DefaultTargetReader - JOB 6791766310560845295 - Reading item... Done!
09:31:34.897 [pool-2-thread-26] INFO  o.e.k.j.e.j.l.KapuaJobListener - JOB 6791766310560845295 - job-CfmCPd7Sp3c-XkEzeaJxze8 - Running after job...
09:31:34.910 [pool-2-thread-26] INFO  o.e.k.j.e.j.l.KapuaJobListener - JOB 6791766310560845295 - job-CfmCPd7Sp3c-XkEzeaJxze8 - Running after job... DONE!

And the bundle never gets stopped.

[Updated on: Thu, 20 June 2019 09:49]

Report message to a moderator

Re: Batch jobs fails on second execution [message #1808768 is a reply to message #1808248] Mon, 01 July 2019 10:27 Go to previous messageGo to next message
Alberto Codutti is currently offline Alberto CoduttiFriend
Messages: 23
Registered: June 2019
Junior Member
Hi Pedro,

this is because the target has been already processed in the first run, and if the processing is successful, there will be no other attempts.
You need to use the "Restart" button to also reset the status of the completed target

Regards,

- Alberto
Re: Batch jobs fails on second execution [message #1809368 is a reply to message #1808768] Mon, 15 July 2019 07:20 Go to previous messageGo to next message
Pedro de Arquer is currently offline Pedro de ArquerFriend
Messages: 34
Registered: December 2018
Member
I don't see any Restart button. Could you mean Refresh? In that case, in which tab? Targets?

The Scheduled tasks need also a manual restart?
Re: Batch jobs fails on second execution [message #1816922 is a reply to message #1809368] Tue, 12 November 2019 08:43 Go to previous message
Pedro de Arquer is currently offline Pedro de ArquerFriend
Messages: 34
Registered: December 2018
Member
The button is now available on the Batch Jobs top menu bar and it relaunches the job on all of the targets defined.
Previous Topic:Batch jobs configuration
Next Topic:Using the Device Asset Write Rest API
Goto Forum:
  


Current Time: Thu Apr 25 04:29:46 GMT 2024

Powered by FUDForum. Page generated in 0.02591 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top