502 Bad Gateway after update to current version 17

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.

thanks,
Thomas

You also most probably get error in the log.

You might want to take a loot at https://www.xwiki.org/xwiki/bin/view/ReleaseNotes/Data/XWiki/17.0.0/#HMovetoJakartaEE9.1.

Currently I’m restoring a backup from 6 days ago… are there any detailed instructions how to run this upgrade so it does not break everything?

I like Xwiki, but updating is always a PITA.

Out of 10 updates I made, probably more than half did fail in one way or the other.

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).

Well… the point is that I can’t do a release upgrade until all available updates are installed, but then Xwiki will no longer work.

But according to apt list, there are tomcat10 packages for Ubuntu 22.04.

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…

Have the same vicious circle: Ubuntu 22.04, to upgrade to 24.04 i neet to install all dependencies and this will result into package errors.

Would be happy about a clean solution, anyone?

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:

  1. backup my xwiki installation
  2. uninstall xwiki-tomcat9-mysql
  3. do-release-upgrade to update my installation to ubuntu 24.04
  4. install tomcat10
  5. 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.