Failed to install a flavor

Hi! I’ve managed to install a brand new XWiki 13.8 instance in this environment:

Apache Tomcat/9.0.45
MySQL Server version: 8.0.26 Source distribution
mysql-connector-java-8.0.26.jar

CentOS Linux release 8.4.2105

[rjr@e220i059h057w ~]$ java -version
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (build 25.302-b08, mixed mode)
[rjr@e220i059h057w ~]$

Somehow, the installation of a flavor (step 2) failed, and I ended up with an empty wiki. I found this line in catalina.out:

2021-10-09 21:25:59,753 [extension.index job group daemon thread - org.xwiki.extension.index.internal.job.ExtensionIndexJob@3d455216([extension, index])] WARN o.x.e.i.i.j.ExtensionIndexJob - Failed to get remote extension from repository [extensions.xwiki.org:xwiki:https://extensions.xwiki.org/xwiki/rest]: IOException: Invalid answer [504] from the server when requesting [https://extensions.xwiki.org/xwiki/rest/repository/search?start=300&number=100&q=]

I think I remember there is a way to force the whole process again without having to delete the database, but I don’t remember how! Please, could you help me?

I would like to reproduce and document the error if it appears again!

Thanks!

Hi Ricardo, yes it’s in the doc of the Distribution Wizard, see https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/DistributionWizard#HTroubleshooting

In this case only, you can remove the …/jobs/status/distribution/status.xml file located inside your permanent directory (/var/lib/xwiki/… for APT installation or /var/lib/tomcatX/webapps/… for WAR installation).

Thanks

Hi, Vincent! Thanks for the answer. I’m concentrating on the paragraph you quoted above:

In this case only, you can remove the …/jobs/status/distribution/status.xml file located inside your permanent directory (/var/lib/xwiki/… for APT installation or /var/lib/tomcatX/webapps/… for WAR installation).

First, I confirmed that I’ve correctly set up a permanent directory:

2021-10-11 13:21:33,735 [main] INFO o.x.e.i.ServletEnvironment - Using permanent directory [/var/lib/xwiki/data]

I’m not able to find a single status.xml file neither in this folder (I downloaded and exploded the war file, then removed it), nor in the whole system:

[root@e220i059h057w /]# find ./ -name “status.xml”
[root@e220i059h057w /]# locate status.xml
/usr/share/mime/message/delivery-status.xml

The wizard appeared at installation time, but failed both with the standard and the demo flavors. Please, must I forget about this, delete the database and recreate it or do you consider that the situation deserves some more attention?

Thanks!

The file is in [perm dir root]/jobs/status/distribution. In recent versions, it’s zipped apparently (status.xml.zip)

@tmortagne seems you forgot to update the doc. I can do it but I don’t know when this change was introduced.

answer: in 13.7RC1: https://jira.xwiki.org/browse/XCOMMONS-2254

Doc updated: Distribution Wizard (XWiki.org)

Found! Thanks! Demo Favor Installation on its way!

For the record: after renaming status.xml.zip, restarting Tomcat and accessing the wiki, I read this before the Distribution Wizard appears:

2021-10-11 15:05:16,585 [http-nio-8080-exec-5 - http://e220i059h057w.inv.usc.es:8080/xwiki/webjars/wiki%3Axwiki/jquery/2.2.4/jquery.min.js?r=1] ERROR ebJarsResourceReferenceHandler - Failed to read resource [jquery/2.2.4/jquery.min.js]
org.xwiki.resource.ResourceReferenceHandlerException: Failed to read resource [jquery/2.2.4/jquery.min.js]
at org.xwiki.resource.servlet.AbstractServletResourceReferenceHandler.serveResource(AbstractServletResourceReferenceHandler.java:184)
at org.xwiki.resource.servlet.AbstractServletResourceReferenceHandler.handle(AbstractServletResourceReferenceHandler.java:86)
at org.xwiki.resource.internal.DefaultResourceReferenceHandlerChain.handleNext(DefaultResourceReferenceHandlerChain.java:79)
at org.xwiki.resource.internal.AbstractResourceReferenceHandlerManager.handle(AbstractResourceReferenceHandlerManager.java:82)
at org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.handleResourceReference(ResourceReferenceHandlerServlet.java:159)
at org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.service(ResourceReferenceHandlerServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:710)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:145)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
at org.apache.catalina.connector.OutputBuffer.appendByteArray(OutputBuffer.java:753)
at org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:682)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:388)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:366)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:96)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1310)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:978)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1282)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:953)
at org.xwiki.resource.servlet.AbstractServletResourceReferenceHandler.serveResource(AbstractServletResourceReferenceHandler.java:181)
… 35 common frames omitted
Caused by: java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:470)
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:135)
at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:118)
at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:151)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1367)
at org.apache.tomcat.util.net.SocketWrapperBase.doWrite(SocketWrapperBase.java:766)
at org.apache.tomcat.util.net.SocketWrapperBase.writeBlocking(SocketWrapperBase.java:586)
at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:530)
at org.apache.coyote.http11.Http11OutputBuffer$SocketOutputBuffer.doWrite(Http11OutputBuffer.java:546)
at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:112)
at org.apache.coyote.http11.Http11OutputBuffer.doWrite(Http11OutputBuffer.java:193)
at org.apache.coyote.Response.doWrite(Response.java:606)
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:340)
… 45 common frames omitted

Does it make any sense for you? Thanks!

That’s not a problem. It means you probably closed your browser tab before the content was fully sent to it by the server side.

Thanks! Demo Flavor up and running!