Günter Horn's picture

I'm using openvpn-appliance (turnkey-openvpn-14.1-jessie-amd64-vmdk). A few days ago, automatic update service made an upgrade of python from version 2.7.8 to 2.7.9. So far so good.

I'm also using apache2 with libapache2-mod-wsgi. But libapache-mod is compiled for python 2.7.8.
apt-get install libapache2-mod-wsgi writes "already the newest version".

There seems to be a inconsistancy for these packages. Is there any solution to solve this?

Thanks for any help

Forum: 
Jeremy Davis's picture

According to the Debian package page for libapache2-mod-wsgi it requires "python = 2.7", so at least in theory, it should still work. Considering that the update to Python 2.7.9 was a security update, I would not expect it to introduce breaking changes (unless of course some functionality was relying on the security bugs).

I also checked the Debian bug tracker to see if anyone else had reported issues. So far not (not that that doesn't mean it's an issue, just that no one else has reported it).

Perhaps if you share a little more about the exact nature of the issue you are hitting I may be able to give some advice? Is it giving a webserver error of some type? Perhaps a 500 or 504? If so, perhaps share the stacktrace that is likely appearing in the Apache logs (should be /var/log/apache2/error.log by default).

It's probably also worth noting, that Debian 8/Jessie (what TurnKey v14.x is based on) is now in LTS support. That means that whilst updates are still provided, priority is given first to maintaining packages used by those who are contributing to LTS (either in-kind or financially - see more here and here - Freeaxian are the company managing the LTS).

So another option may be to upgrade the OS to Debian 9/Stretch? You have 2 options there. You can use TKLBAM to migrate data from your existing instance to a new v15.x instance (which will still likely require some manual intervention). Or you can do a Debian in-place OS upgrade. If you go the second path, I would definitely recommend that you create some sort of "snapshot" or disk image, just in case something goes wrong.

One other option would be to remove the libapache2-mod-wsgi Debian package, and install mod_wsgi from Pypi (i.e. via pip). You will need to install the Apache dev Debian package (as the pip package will build the module from source, so needs one of the Apache dev tools included in the dev package). But otherwise, should be a viable option.

Hope that helps.

Günter Horn's picture

Hello Jeremy,

thanks for the fast answer.

I found the information, that mod_wsgi is compiled for python 2.7.8, in apache-log.

root@openvpn log/apache2# cat error.log
[Sun Feb 03 19:47:40.634279 2019] [wsgi:warn] [pid 8844:tid 140259678054272] mod_wsgi: Compiled for Python/2.7.8.
[Sun Feb 03 19:47:40.634352 2019] [wsgi:warn] [pid 8844:tid 140259678054272] mod_wsgi: Runtime using Python/2.7.9.
[Sun Feb 03 19:47:40.636293 2019] [mpm_event:notice] [pid 8844:tid 140259678054272] AH00489: Apache/2.4.10 (Debian) mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Feb 03 19:47:40.636325 2019] [core:notice] [pid 8844:tid 140259678054272] AH00094: Command line: '/usr/sbin/apache2'
[Sun Feb 03 20:03:49.573884 2019] [mpm_event:notice] [pid 8844:tid 140259678054272] AH00491: caught SIGTERM, shutting down

 

Thanks for help,
Günter

Jeremy Davis's picture

Are you getting any errors? Or are you just concerned about those warnings in the Apache log?

FWIW as a general rule, unless there is something that clearly isn't working as it should, warnings can almost always be safely ignored. Errors on the other hand, usually can't (because usually stuff actually breaks).

As I noted above, unless you are actually encountering any errors or problems, I would expect everything to "just work" as it did before. I haven't actually seen what the changes are between Python 2.7.8 and 2.7.9, but I would expect them to be minimal and most likely inconsequential in context of wsgi.

Add new comment