Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error from scheduler #8839

Closed
jsi opened this issue May 20, 2021 · 4 comments
Closed

Strange error from scheduler #8839

jsi opened this issue May 20, 2021 · 4 comments
Assignees
Labels
Projects
Milestone

Comments

@jsi
Copy link
Member

jsi commented May 20, 2021

This may just be a small hiccup, but I thought I'd mention it: If I start a clean XP system and then just stop it again, using the CLI, I get this error when I stop it:

2021-05-20 16:35:31,749 WARN  c.e.x.i.s.distributed.RescheduleTask - Problem during task scheduling.
java.lang.IllegalStateException: No service found interface com.enonic.xp.scheduler.SchedulerService
	at com.enonic.xp.core.internal.osgi.OsgiSupport.lambda$withService$3(OsgiSupport.java:97)
	at com.enonic.xp.core.internal.osgi.OsgiSupport.withServiceOrElseGet(OsgiSupport.java:59)
	at com.enonic.xp.core.internal.osgi.OsgiSupport.withService(OsgiSupport.java:96)
	at com.enonic.xp.impl.scheduler.distributed.RescheduleTask.doRun(RescheduleTask.java:52)
	at com.enonic.xp.impl.scheduler.distributed.RescheduleTask.run(RescheduleTask.java:42)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
@jsi jsi added the Bug label May 20, 2021
@rymsha
Copy link
Contributor

rymsha commented May 20, 2021

It is not an error. It is a warning

@rymsha rymsha assigned vbradnitski and unassigned rymsha May 25, 2021
@rymsha rymsha added this to Needs triage in Bugs via automation May 25, 2021
@rymsha rymsha moved this from Needs triage to Low priority in Bugs May 25, 2021
@vbradnitski
Copy link
Contributor

There is also warning log level for CancelationException, should be changed to debug.

2021-05-31 17:21:00,004 WARN  c.e.x.i.s.d.SchedulableTaskImpl - Error while running job. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@1a8576f0[Cancelled]
java.util.concurrent.CancellationException: null
        at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:121)
        at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
        at com.enonic.xp.impl.scheduler.LocalSystemScheduler$1.afterExecute(LocalSystemScheduler.java:53)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1129)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

@rymsha
Copy link
Contributor

rymsha commented Jun 7, 2021

java.lang.IllegalStateException: No service found interface com.enonic.xp.scheduler.SchedulerService can also happen during dump restore. We should find a way to stop scheduler before dump starts / instance shuts down.

vbradnitski added a commit that referenced this issue Jun 17, 2021
vbradnitski added a commit that referenced this issue Jun 17, 2021
vbradnitski added a commit that referenced this issue Jun 17, 2021
vbradnitski added a commit that referenced this issue Jun 17, 2021
vbradnitski added a commit that referenced this issue Jun 17, 2021
@rymsha
Copy link
Contributor

rymsha commented Jun 17, 2021

  • Warning Problem during task scheduling appears often on XP shutdown when it is benign, but it may be also an indicator of a serious bug (then it should repeat often - almost every second). We could throttle logging: write WARN only if there were 9 subsequent failed attempts before.

  • java.util.concurrent.CancellationException is not interesting in most cases, and we change it to debug level.

  • Dump restore is a special case when most of services can't function. We will stop scheduler right before dump restore starts.

rymsha pushed a commit that referenced this issue Jun 17, 2021
@rymsha rymsha moved this from Low priority to Closed in Bugs Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Bugs
Closed
Development

No branches or pull requests

4 participants