Hi all!
We have a CentOS Linux server running java and tomcat with a couple of projects, and will have a postgresql db server. I installed now the xwiki war package in webapps/xwiki , and configured a permanent directory in webapps/xwiki/WEB-INF/xwiki.properties , and restarted tomcat.
Unfortunately, visiting https://myhost/xwiki/bin/view/Main/ give me a page not found error, and I have no idea how to proceed 
Every suggestion is very welcome, thank you!
Stefano (Lugano, Switzerland)
current configuration:
CentOS Linux release 7.6.1810 (Core)
TomCat 9.0.14
OpenJDK Runtime Environment (build 1.8.0_191-b12)
Servlet Version 4.0
JSP Version 2.3
Hi. Itās hard to help you without the xwiki logs. Could you provide them please?
See https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Logging#HLogLocation
Good point. Here a list with lot of stuff.
2019-05-23 13:53:09,740 [Catalina-utility-1] WARN .x.e.m.i.MavenExtensionScanner - Collision between core extension [commons-io:commons-io/2.0.1 (jar:file:/opt/tomcat/apache-tomcat-9.0.14/lib/commons-io-2.0.1.j
ar!/META-INF/maven/commons-io/commons-io/pom.xml)] and [commons-io:commons-io/2.6 (file:/sbt/webapps/xwiki/WEB-INF/lib/commons-io-2.6.xed)]
2019-05-23 13:53:09,740 [Catalina-utility-1] WARN .x.e.m.i.MavenExtensionScanner - [commons-io:commons-io/2.6 (file:/sbt/webapps/xwiki/WEB-INF/lib/commons-io-2.6.xed)] is selected
2019-05-23 13:53:09,757 [Catalina-utility-1] WARN .x.e.m.i.MavenExtensionScanner - Collision between core extension [commons-fileupload:commons-fileupload/1.2.2 (jar:file:/opt/tomcat/apache-tomcat-9.0.14/lib/co
mmons-fileupload-1.2.2.jar!/META-INF/maven/commons-fileupload/commons-fileupload/pom.xml)] and [commons-fileupload:commons-fileupload/1.4 (file:/sbt/webapps/xwiki/WEB-INF/lib/commons-fileupload-1.4.xed)]
2019-05-23 13:53:09,757 [Catalina-utility-1] WARN .x.e.m.i.MavenExtensionScanner - [commons-fileupload:commons-fileupload/1.4 (file:/sbt/webapps/xwiki/WEB-INF/lib/commons-fileupload-1.4.xed)] is selected
2019-05-23 13:53:10,869 [Catalina-utility-1] INFO o.x.s.s.i.EmbeddedSolrInstance - Using Solr home directory: [/opt/tomcat/apache-tomcat-9.0.14/work/Catalina/localhost/xwiki/solr]
2019-05-23 13:53:17,085 [Catalina-utility-1] ERROR o.a.s.a.ActionServlet - Missing configuration resource for path /xwiki/WEB-INF/struts-config.xml
23-May-2019 13:53:17.098 INFO [Catalina-utility-1] org.apache.catalina.core.StandardContext.reload Reloading Context with name [/xwiki] is completed
23-May-2019 14:23:47.410 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.reload Reloading context [/xwiki]
23-May-2019 14:23:47.410 INFO [Catalina-utility-1] org.apache.catalina.core.StandardContext.reload Reloading Context with name [/xwiki] has started
23-May-2019 14:23:47.527 WARNING [Catalina-utility-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [XWiki's extension job history saving thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory$SaveRunnable.run(DefaultExtensionJobHistory.java:73)
23-May-2019 14:23:47.527 SEVERE [Catalina-utility-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xwiki] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@26d34192]) and a value of type [org.codehaus.plexus.classworlds.realm.ClassRealm] (value [ClassRealm[plexus.core, parent: null]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
23-May-2019 14:23:54.785 INFO [Catalina-utility-1] org.apache.catalina.core.StandardContext.reload Reloading Context with name [/xwiki] is completed
at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory$SaveRunnable.run(DefaultExtensionJobHistory.java:73)
at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory$SaveRunnable.run(DefaultExtensionJobHistory.java:73)
at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory$SaveRunnable.run(DefaultExtensionJobHistory.java:73)
23-May-2019 15:04:32.644 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/sbt/webapps/xwiki.war]
2019-05-23 15:04:37,035 [main] INFO iPropertiesConfigurationSource - loading xwiki.properties from file:/sbt/webapps/xwiki/WEB-INF/xwiki.properties
2019-05-23 15:04:37,188 [main] INFO o.x.e.i.ServletEnvironment - Using permanent directory [/sbt/xwiki]
2019-05-23 15:04:40,749 [main] WARN .x.e.m.i.MavenExtensionScanner - Collision between core extension [commons-io:commons-io/2.0.1 (jar:file:/opt/tomcat/apache-tomcat-9.0.14/lib/commons-io-2.0.1.jar!/META-INF/m
aven/commons-io/commons-io/pom.xml)] and [commons-io:commons-io/2.6 (file:/sbt/webapps/xwiki/WEB-INF/lib/commons-io-2.6.xed)]
2019-05-23 15:04:40,749 [main] WARN .x.e.m.i.MavenExtensionScanner - [commons-io:commons-io/2.6 (file:/sbt/webapps/xwiki/WEB-INF/lib/commons-io-2.6.xed)] is selected
2019-05-23 15:04:40,774 [main] WARN .x.e.m.i.MavenExtensionScanner - Collision between core extension [commons-fileupload:commons-fileupload/1.2.2 (jar:file:/opt/tomcat/apache-tomcat-9.0.14/lib/commons-fileuplo
ad-1.2.2.jar!/META-INF/maven/commons-fileupload/commons-fileupload/pom.xml)] and [commons-fileupload:commons-fileupload/1.4 (file:/sbt/webapps/xwiki/WEB-INF/lib/commons-fileupload-1.4.xed)]
2019-05-23 15:04:40,774 [main] WARN .x.e.m.i.MavenExtensionScanner - [commons-fileupload:commons-fileupload/1.4 (file:/sbt/webapps/xwiki/WEB-INF/lib/commons-fileupload-1.4.xed)] is selected
2019-05-23 15:04:41,724 [main] INFO o.x.s.s.i.EmbeddedSolrInstance - Using Solr home directory: [/sbt/xwiki/solr]
23-May-2019 15:04:46.918 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/sbt/webapps/xwiki.war] has finished in [14,273] ms
Thereās a first problem that you didnāt stop Tomcat to start XWiki. You need to full stop Tomcat. You cannot use the tomcat manager to reload the webapp since that can cause problems as tomcat is reporting.
I see youāre using tomcat 9 and that there are some collisions. You could also try to use tomcat 8.
Now I donāt see anything wrong in this log which means that your HTTP request from your browser didnāt even reach XWiki
Maybe you have some proxy or web server in front that doesnāt let your request go through to tomcat. You should check that.
Thank you vmassol.
This is a production server. Anyway, I have now full stopped tomcat and restarted it.
Nothing changed. I cannot downgrade to tomcat 8.
The browser is able to reach the xwiki directory, in fact if I add an āhelloā page, I see it:
https://www.sbt.ti.ch/xwiki/hello.html
So maybe the xwikiās context.xml is not correct?
Yes this could be a good point. What to check?
About tomcat version, page https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationTomcat/
says not to use the following Tomcat versions: >= 9.0.0.M5 and < 9.0.0.M10 for the 9.0.x branch (fixed in 9.0.0.M10)
Iām using 9.0.14.
I didnāt touch the xwiki context.xml file:
<Context containerSciFilter="org.apache.tomcat.websocket.server.WsSci|org.apache.jasper.servlet.JasperInitializer">
<JarScanner>
<JarScanFilter defaultTldScan="false"/>
</JarScanner>
<!-- We need to set the resource cache size since the default (10K) is too small for loading all XWiki resources at
once -->
<Resources cacheMaxSize="20480" />
</Context>
So, nobody with an idea what to check? Must be an entry-level simple problemā¦
Yes but that only you has it seems 
If I had to bet I would bet for an issue with the Tomcat setup (or anything in front of tomcat). The log doesnāt show any xwiki problem.
In the xwiki documentation it is taken for granted that tomcat works exclusively for xwiki⦠but itās not my case, my tomcat is already in production with lot of pages in ROOT and in other projects in the webapps folder.
In just downloaded xwiki-platform-distribution-war-11.4-rc-1.war and moved it in my webapps folder changing the name in xwiki.war .
TomCat kindly expanded it in a xwiki folder, where I edited the file /sbt/webapps/xwiki/WEB-INF/xwiki.properties adding this line:
environment.permanentDirectory=/sbt/xwiki/ # nothing to do with webapps
Nothing else. I didnāt changed nothing in /sbt/webapps/ROOT/WEB-INF
since xwiki should have nothing to do with our other projects.
Is this correct?
Apache correcty delegates all /xwiki requests to TomCat, in fact visiting
https://www.sbt.ti.ch/xwiki I am redirected to https://www.sbt.ti.ch/xwiki/bin/view/Main/
(something works!) with a āPage not availableā error (I suppose itās a 500 - Internal Server Error).
Is this correct that I donāt have any bin folder in /xwiki ?
root@svv00724> ll /sbt/webapps/xwiki
total 32
drwxr-x--- 7 tomcat apache 4096 May 24 10:47 .
drwxrwxr-x 7 sbt apache 4096 May 24 10:47 ..
drwxr-x--- 3 tomcat apache 4096 May 24 10:47 META-INF
drwxr-x--- 8 tomcat apache 4096 May 24 10:47 WEB-INF
-rw-r----- 1 tomcat apache 96 May 20 15:50 redirect
drwxr-x--- 6 tomcat apache 4096 May 24 10:47 resources
drwxr-x--- 3 tomcat apache 4096 May 24 10:47 skins
drwxr-x--- 8 tomcat apache 4096 May 24 10:47 templates
root@svv00724>
Thank you
Stefano
Hi. I was hoping to find an help today. So, nobody using xwiki on Linux with a TomCat already in production?
Make sure you created a database and configured the hibernate.cfg.xml
file to point XWiki to it.