Ubuntu 22.04.4 Xwiki install failure deep dive - Edgecase - Tomcat 9 - mariadb - mysql - Jammy Jellyfish

Hi all.

Thank you so much for your time. I’ve found many helpful answers in these forums that have helped me break through roadblock after roadblock. I’ve been wrestling with Xwiki trying to get it to work for days now and I feel I’ve finally been driven into enough of an edgecase that the existing answers aren’t going to assist.

I won’t bombard you with the full story as it would be novel length, but I’ve been following the information and guides listed here:
https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/
here:
https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/#HTomcatUsability
here:
https://www.howtoforge.com/how-to-install-xwiki-on-ubuntu-22-04/
here:
https://www.linuxbuzz.com/how-to-install-mysql-on-debian-12/
here:
https://linuxhostsupport.com/blog/how-to-install-xwiki-on-debian-9/

Among others. I initially started out with a debian install but as TomCat 9 is no longer included with debian 12 (Bookworm) I was never able to resolve the issue with being unable to find the relevant dependancies. I switched over to Ubuntu, my preferred linux distro, and continued to encounter issues at basically every step. I also started out trying to use the mysql version of xwiki before finding it was depreciated so switched to mariadb.

But first, here’s my environment:
-A completely clean install of Ubuntu 22.04.4 desktop.
-That’s it, no other services, dependencies or potential conflicts. This is meant to be a dedicated server for Xwiki to have all to itself.

Some of the steps I’ve taken and knowledge I’ve learned:

-Unlocked Ubuntu root with

sudo passwd root

((link removed because new users can only put five links in a post))
then get into the root user permissions and run my commands from there using

sudo su

-I have enabled universe and multiverse and allowed unsigned registries with the “–allow-insecure-repositories” command. EG:

sudo apt-get update --allow-insecure-repositories

((link removed because new users can only put five links in a post))
and
Ubuntu gui → Software and Updates → Ubuntu Software → downloadable from the internet
and enabled “Main”, “Universe”, “Restricted”, and “Multiverse”.
((screenshot removed because new users can only put one screenshot in a post))

apt-get install wget curl unzip git name gnupg2 -y

fails with the error “unable to locate package”. I get around this with

sudo apt-get install gnupg2

then

sudo apt-get remove gnupg

then

sudo ln -s /usr/bin/gpg2 /usr/bin/gpg

I have attempted the installation both with and without ‘fixing’ the gnupg error, it doesn’t seem to matter either way.

  • I get Java with
apt-get install default-jdk -y

then check the version with

java --version

My version is

openjdk 17.0.10 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7-Ubuntu-122.04.1)
OpenJDK 64-Bit Server VM (build 17.0.10+7-Ubuntu-122.04.1, mixed mode, sharing)
  • I go get the keys using
wget https://maven.xwiki.org/xwiki-keyring.gpg -O /usr/share/keyrings/xwiki-keyring.gpg

then attach them using

wget "https://maven.xwiki.org/stable/xwiki-stable.list" -O /etc/apt/sources.list.d/xwiki-stable.list

and update using

apt-get update -y
  • I search the repository with
apt-cache search xwiki

and I DO get the expected list of xwiki packages. This always failed when following this process on Debian.

  • I install the package with
apt-get install xwiki-tomcat9-common xwiki-tomcat9-mariadb -y

This is important as this also failed on debian with the “unable to locate package” error. This runs for a little and I am prompted to set the password. This is also significant as I originally missed the requirement to not use special characters in the password. Uninstalling and re-installing xwiki from that ubuntu install broke things even more so I had to nuke the entire server and completely reinstall Ubuntu fresh.

  • Once that completes I check the tomcat install is operational with
systemctl status tomcat9.service

and it is.

  • I set tomcat to listen on port 8080 (I have tried both with this step and without this step and again it doesn’t seem to matter either way) with the command
ss -antpl | grep 8080
  • I try to launch xwiki at
localhost:8080/xwiki

and

127.0.0.1:8080/xwiki

and

((MyServerIP)):8080/xwiki

and none of them work. I only receive an error 404 “The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.” or the Nginx version of that same message as I also tried installing Nginx. Or tomcat will happily purr at me if I leave out the /xwiki at the end.
((screenshot removed because new users can only have one per post))
Screenshot_447

-I also made sure to increase the memory limit as listed on the xwiki install guide, I set it to 2048.

-I have tried every permeation of every step. I have looked everywhere for a solution but everything I can see says xwiki should just be working and accessible now but no matter what I do I am unable to get it working.

  • In my experimentation I was able to get xwiki working on my local windows machine, temporarily at least as that broke upon restart, by using docker containers, but my machine is just a client/endpoint and I cant leave a docker instance up permanently. I would greatly appreciate any assistance or advice anyone could offer as I’m at the end of my troubleshooting abilities with this one.