Updated Site from 2.1 to 2.3, backup restore problems

Hi there,

While working with updates and backups, I ran into a problem that I would like to explain below.
To know how I got there, the explanation is as follows:

We needed to update cmk from 2.1 to 2.3 and move it to another server. So we did the update and used the backup function to restore the freshly updated site on the new server running Ubuntu 24.04, the old server was running 20.04.

Now to the problem:
When I started the new and from the update restored omd site, everything seemed to work properly, omd satus responded, everything is fine, up and running. But the web interface returned a 404.

It turned out that the Apache error log showed the following:

[Tue Oct 01 08:04:01.180870 2024] [core:notice] [pid 4173] AH00094: Command line: '/usr/sbin/apache2 -f /omd/sites/master/etc/apache/apache.conf'
[Tue Oct 01 08:04:01.229504 2024] [wsgi:error] [pid 4177] (2)No such file or directory: mod_wsgi (pid=4177, process='', application=''): Could not read/compile source file '/omd/sites/master/share/check_mk/web/app/index.wsgi'.
[Tue Oct 01 08:04:01.229595 2024] [wsgi:error] [pid 4177] mod_wsgi (pid=4177): Exception occurred processing WSGI script '/omd/sites/master/share/check_mk/web/app/index.wsgi'.
[Tue Oct 01 08:04:01.251639 2024] [wsgi:error] [pid 4177] FileNotFoundError: [Errno 2] No such file or directory: '/omd/sites/master/share/check_mk/web/app/index.wsgi'
[Tue Oct 01 08:04:52.316746 2024] [mpm_prefork:notice] [pid 4173] AH00169: caught SIGTERM, shutting down
[Tue Oct 01 08:04:58.492300 2024] [mpm_prefork:notice] [pid 4499] AH00163: Apache/2.4.58 (Ubuntu) mod_wsgi/4.9.4 Python/3.12 mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Oct 01 08:04:58.492494 2024] [core:notice] [pid 4499] AH00094: Command line: '/usr/sbin/apache2 -f /omd/sites/master/etc/apache/apache.conf'
[Tue Oct 01 08:04:58.539220 2024] [wsgi:error] [pid 4503] (2)No such file or directory: mod_wsgi (pid=4503, process='', application=''): Could not read/compile source file '/omd/sites/master/share/check_mk/web/app/index.wsgi'.
[Tue Oct 01 08:04:58.539268 2024] [wsgi:error] [pid 4503] mod_wsgi (pid=4503): Exception occurred processing WSGI script '/omd/sites/master/share/check_mk/web/app/index.wsgi'.
[Tue Oct 01 08:04:58.554289 2024] [wsgi:error] [pid 4503] FileNotFoundError: [Errno 2] No such file or directory: '/omd/sites/master/share/check_mk/web/app/index.wsgi'

So I switched to the old server and searched for this particular file

 dpkg -S index.wsgi
check-mk-raw-2.2.0p34: /opt/omd/versions/2.2.0p34.cre/share/check_mk/web/app/index.wsgi
check-mk-raw-2.3.0p17: /opt/omd/versions/2.3.0p17.cre/lib/python3/cmk/gui/wsgi/applications/index.wsgi
check-mk-raw-2.1.0p35: /opt/omd/versions/2.1.0p35.cre/share/check_mk/web/app/index.wsgi
check-mk-raw-2.1.0p28: /opt/omd/versions/2.1.0p28.cre/share/check_mk/web/app/index.wsgi

It turns out that this file has been moved to a different location for the latest cmk version.
After creating a symlink, the Apache server started and the web interface now works.
ln -s /opt/omd/versions/2.3.0p17.cre/lib/python3/cmk/gui/wsgi/applications/* /omd/sites/master/share/check_mk/web/app/

Now for the most important part of the question: Why did this happen?
It seems that either there were some changes made in the latest major release of cmk, the update process did not work completely, or there was an error during the restore process of the backup.

Sorry for this long question, but I think the amount of detail was important to understand the underlying issue. Thanks in advance for your help. If there is already a thread with the same question, please link it for me, as I did not find a corresponding entry for my problem during my research.

Best regards,
Alexander

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.