为 ce-worker-0 上的线程 'Worker 0 (UUID=AXInwYzVDFskptgsIgOb) 调用了两次负载,或者上次使用时未清除状态

Posted

技术标签:

【中文标题】为 ce-worker-0 上的线程 \'Worker 0 (UUID=AXInwYzVDFskptgsIgOb) 调用了两次负载,或者上次使用时未清除状态【英文标题】:load called twice for thread 'Worker 0 (UUID=AXInwYzVDFskptgsIgOb) on ce-worker-0' or state wasn't cleared last time it was used为 ce-worker-0 上的线程 'Worker 0 (UUID=AXInwYzVDFskptgsIgOb) 调用了两次负载,或者上次使用时未清除状态 【发布时间】:2020-09-14 10:23:36 【问题描述】:

在 SonarQube 7.1 社区版中遇到以下错误。

请协助解决此错误。任何帮助将不胜感激。

错误详情

java.lang.IllegalStateException: load called twice for thread 'Worker 0 (UUID=AXInwYzVDFskptgsIgOb) on ce-worker-0' or state wasn't cleared last time it was used
    at com.google.common.base.Preconditions.checkState(Preconditions.java:197)
    at org.sonar.server.organization.DefaultOrganizationProviderImpl.load(DefaultOrganizationProviderImpl.java:73)
    at org.sonar.ce.organization.DefaultOrganizationLoader.start(DefaultOrganizationLoader.java:38)
    at sun.reflect.GeneratedMethodAccessor383.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
    at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
    at org.picocontainer.behaviors.Stored.start(Stored.java:110)
    at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
    at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
    at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:134)
    at org.sonar.server.computation.task.container.TaskContainerImpl.bootup(TaskContainerImpl.java:77)
    at org.sonar.server.computation.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:71)
    at org.sonar.ce.taskprocessor.CeWorkerImpl.executeTask(CeWorkerImpl.java:134)
    at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:97)
    at org.sonar.ce.taskprocessor.CeWorkerImpl.withCustomizedThreadName(CeWorkerImpl.java:81)
    at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:73)
    at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:43)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)

Error Screenshot

【问题讨论】:

【参考方案1】:

请升级到 7.3 以上。这是低版本的bug

【讨论】:

以上是关于为 ce-worker-0 上的线程 'Worker 0 (UUID=AXInwYzVDFskptgsIgOb) 调用了两次负载,或者上次使用时未清除状态的主要内容,如果未能解决你的问题,请参考以下文章

Web Worker——js的多线程,实现统计博客园总阅读量

线程 python 应用程序没有干净地关闭

芹菜预取任务卡在其他任务后面

重温js—— 事件循环

java线程模型Master-Worker

Apache原理