After Updating from 16.6 to the current version, all I get is 502 Bad Gateway.
Running on Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-133-generic x86_64)
Probably something went wrong with tomcat since
sudo systemctl restart tomcat9
results in
Failed to restart tomcat9.service: Unit tomcat9.service not found.
As I’m not very deep into Linux, I’m looking for pointers where to start looking.
According to your initial message, you don’t have the tomcat9 package installed anymore (and apparently you were not expecting this). The XWiki package definitely did not uninstall tomcat9 itself, and apt is clearly explaining to you what it’s going to happen before you confirm.
If you look at the reference upgrade documentation, you will notice that the upgrade to XWiki 17 is indicated as example in a warning box. As you probably noticed in the release note, XWiki 17+ cannot be used with tomcat 9 anymore, so you need a system with a tomcat10 package available (which is not the case of Ubuntu 22.04 according to https://launchpad.net/ubuntu/+source/tomcat10, so you will need to upgrade to the current Ubuntu LTS).
I tried various ways to upgrade but all of them ended in screens full of java error messages.
Xwiki is fine as long as it works, but an ovely complicated mess of dependencies
(application server, java, database server, search engine) with error logs spread all over the system as soon as something goes wrong.
I’m now giving up on Xwiki and will move the content to a different system… thank god I made a snapshot of the VM…
I just went through this problem, and here is how I resolved it.
Start
Ubutu 22.04
xwiki 16.10.3 with following packages installed:
xwiki-common
xwiki-mysql-common
xwiki-tomcat9-common
xwiki-tomcat9-mysql
apt update wants to install 17.1, but that will fail because of the tomcat10 dependency
do-release-upgrade will not work as there are packages that need updating (xwiki*)
Solution:
backup my xwiki installation
uninstall xwiki-tomcat9-mysql
do-release-upgrade to update my installation to ubuntu 24.04
install tomcat10
install xwiki-tomcat10-mysql
Check the xwiki/tomcat10 configuration files against the backup of the configuration files, merging in, or making whatever changes that needed to be added
Start tomcat10 and check catalina.log for any error.
It actually went rather painlessly, although I am still watching for any oddities. This installation has been upgraded in place since v12.
[edit]
Other possible solution, which I might try next time:
Export your old wiki to a xar file.
install latest xwiki to a freshly installed ubuntu installation
restore the xar file.
Actually, I may try that tonight just to see what happens.