Xwiki won't start (velocity macro)

Hello,

we have an urgent problem with our xwiki installation. It only shows blank pages.
I installed a velocity script that creates links to all pages underneath the root page (with a for loop) and builds a list from it. (Because the documentTree root option is not working for me)

I realized that the loading time of some sites was extended by the script.

Tonight the memory and CPU usage went to over 90% on the server (4 cores and 16GB memory - tomcat8/default -xmx=12g).

The problem is at the moment, that we cannot access any pages to delete the script/macro. Can you think of any fast solutions to access the sites without them loading correctly? Like a maintenance mode were velocity is deactivated?

I have some log files if you need them but I couldn’t find anything special (except for the normal Java issues) in there.

Greetings and thank you for help
Timo D-W

Hello,
I’m not an expert but velocity is the language in which all the templates that generate the HTML. IMO, if you can disabled velocity you can not edit your page anymore.

To fix it, SAVE your database before, edit your velocity script in your xwiki database and start your tomcat after.
Search your page and doc content in xwikidoc table :xwd_fullname and xwd_content fields)

Pascal B

Thank you for your advise. We dumped the database and and restored it to the testsystem, were xwiki starts normal and is accessible.
We have a error of solr search in the catalina.out. The search doesn’t work with solr on the testsystem (with the restored database). The database search works.

We tried to clean up the solr search index … result pending.

Any ideas in that direction? Solr errors in log
2017-09-22 10:59:24,721 [Finalizer] ERROR o.a.s.u.SolrIndexWriter - SolrIndexWriter was not closed prior to finalize(), indicates a bug -- POSSIBLE RESOURCE LEAK!!!

Tanks in advance
Greetings
Timo D-W

Simply stop tomcat, delete <environment.permanentDirectory>/solr directory and start xwiki agin.
solr will be recreated and populate again.