How to start with xwiki configuration?

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/ , 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 :frowning:

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?


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:
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$
        at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory$
        at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory$
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 from file:/sbt/webapps/xwiki/WEB-INF/ 
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 :wink: 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:

So maybe the xwiki’s context.xml is not correct?

Yes this could be a good point. What to check?

About tomcat version, page
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">
    <JarScanFilter defaultTldScan="false"/>
  <!-- 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" />

So, nobody with an idea what to check? Must be an entry-level simple problem…

Yes but that only you has it seems :wink:

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/ 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 I am redirected to
(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

Thank you

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.