Cannot rename or delete a page: this job is waiting to start

Hi, I’m using XWiki 12.2 on Tomcat 9.0.16 on Debian 10.

Whenever I try to rename or delete a page I get this warning:

This job is waiting to start, please be patient: another job might be tunning on the same pages.

I checked in the Active Jobs Extension and I see many jobs in the queues, like this:

I don’t see any errors in the Tomcat logs, only these WARN messages:

[2020-04-29 18:44:48] [info] 2020-04-29 18:44:48,977 [http://127.0.0.1:8080/xwiki/bin/view/Prova%20Import%20Word/?xpage=delete&jobId=refactoring/delete/1588178688860-260] WARN  o.a.v.introspection            - Deprecated usage of getter [org.xwiki.velocity.tools.CollectionsTool.getSet] in xwiki:Licenses.Code.LicensesNotificationsUIX^XWiki.UIExtensionClass[0]@11,42
[2020-04-29 18:44:48] [info] 2020-04-29 18:44:48,978 [http://127.0.0.1:8080/xwiki/bin/view/Prova%20Import%20Word/?xpage=delete&jobId=refactoring/delete/1588178688860-260] WARN  o.a.v.introspection            - Deprecated usage of getter [org.xwiki.velocity.tools.CollectionsTool.getSet] in xwiki:Licenses.Code.LicensesNotificationsUIX^XWiki.UIExtensionClass[0]@19,49
[2020-04-29 18:44:48] [info] 2020-04-29 18:44:48,978 [http://127.0.0.1:8080/xwiki/bin/view/Prova%20Import%20Word/?xpage=delete&jobId=refactoring/delete/1588178688860-260] WARN  o.a.v.introspection            - Deprecated usage of getter [org.xwiki.velocity.tools.CollectionsTool.getQueue] in xwiki:Licenses.Code.LicensesNotificationsUIX^XWiki.UIExtensionClass[0]@32,48
[2020-04-29 18:44:48] [info] 2020-04-29 18:44:48,978 [http://127.0.0.1:8080/xwiki/bin/view/Prova%20Import%20Word/?xpage=delete&jobId=refactoring/delete/1588178688860-260] WARN  o.a.v.introspection            - Deprecated usage of getter [org.xwiki.velocity.tools.CollectionsTool.getSet] in xwiki:Licenses.Code.LicensesNotificationsUIX^XWiki.UIExtensionClass[0]@52,51
[2020-04-29 18:44:48] [info] 2020-04-29 18:44:48,979 [http://127.0.0.1:8080/xwiki/bin/view/Prova%20Import%20Word/?xpage=delete&jobId=refactoring/delete/1588178688860-260] WARN  o.a.v.introspection            - Deprecated usage of getter [org.xwiki.velocity.tools.CollectionsTool.getSortedSet] in xwiki:Licenses.Code.LicensesNotificationsUIX^XWiki.UIExtensionClass[0]@4,42

Could you help me please?

Thanks!

Does it also happen right after you restart XWiki?

I tried to restart Tomcat but jobs are still there and the problem still occours.

Any ideas for me, please?

Although this is an old thread, we recently ran into the same problem with XWiki 15 and found a solution. No need for restart XWiki or log files, just Browser.

The reason that pages cannot be moved or deleted was in our case a blocking job. Somebody tried to rename a page, but didn’t answer the question to overwrite an existing page. Following jobs were blocked.

So first we need to find the job id of the blocking job.
There is the admin page to get all jobs: https://extensions.xwiki.org/xwiki/bin/view/Extension/Active%20Jobs%20Application/
For a production environment, there are many entries and it is hard to find the currently running job.
So we modified the script, which can then be embedded in a new page (anywhere in XWiki) as source code:

{{tree}}
{{groovy}}
xwiki.get("ssx").use("XWiki.ActiveJobs");

def jobExecutor = services.component.getInstance(org.xwiki.job.JobExecutor.class);

def jobs = new TreeMap(new Comparator<Object>() {
  public int compare(def one, def two) {
    return one.toString().compareTo(two.toString());
  }
});

// Note: Using private fields that are not exposed in APIs.
jobs.putAll(jobExecutor.groupExecutors);
jobs.putAll(jobExecutor.jobs);

for (def path : jobs.keySet()) {
  def pathJobOrExecutor = jobs.get(path);
  def isGroup = pathJobOrExecutor.getClass().getSimpleName().equals("JobGroupExecutor");

  if (isGroup) {

    def currentJob = pathJobOrExecutor.currentJob;
    if (currentJob != null) {

      println "* [Group] " + path;
      println "** executor: " + pathJobOrExecutor;

      displayJob(currentJob, "***");

      def queue = pathJobOrExecutor.getQueue();
      println "*** Queue size: " + queue.size()
      queue.each {
        println "**** " + getJobName(it);
      }

    }

  } else {
    displayJob(pathJobOrExecutor, "*");
  }
}

def getJobName(def job) {
  def result = "null";
  if (job != null) {
    result = org.apache.commons.lang3.StringUtils.join(job.getRequest().getId(), "/") + " (" + job.getClass().getName() + ")";
  }
  return result;
}

def displayJob(def job, def indentation) {
  println indentation + " [Job] " + getJobName(job)
  def jobStatus = job.getStatus();

  println indentation + "* Started at: " + jobStatus.getStartDate();

  def question = jobStatus.getQuestion();
  if (question != null) {
    println indentation + "* Question: " + question
    println indentation + "* Question ends in: " + ((long) (jobStatus.getQuestionTimeLeft(java.util.concurrent.TimeUnit.SECONDS)/1000000000)) + "s";
  }
  if (jobStatus instanceof org.xwiki.job.event.status.CancelableJobStatus) {
    def isCancelable = jobStatus.isCancelable()
    println indentation + "* Cancelable: " + isCancelable;
  }
}
{{/groovy}}
{{/tree}}

After saving the page, the macro should show one job entry.
Remember the id, it is like XXXXXXXXXXX-YYY
You should also see the name and path of the page, which has been tried to rename/move. You need the full path to this page (subwiki and page hierarchie).

Open following URL in a new browser tab:
https://<URL>/xwiki/<path to the page before rename>/?xpage=rename&renameId=<job id>
(it might help to find the page via XWiki search, open it and copy/modify the complete url)

This will open the dialog with the question, whether the page rename should overwrite another page or not. So you can cancel the job!

Afterwards, all remaining open jobs will be processed.
Perhaps there are still other blocking jobs, so start again with the macro.

1 Like