I'm getting an error trying to start a service which uses mod_wsgi 4.9.1 in
a virtual environment.
On my centos 7 system, I compiled python 3.10, which is altinstalled
to /usr/local/bin/python3.10
I have a virtualenv, but may have initially built mod_wsgi with an earlier
version of python 3.10 (I was having trouble getting it to build
correctly). However, my last attempt I used
pip install --ignore-installed --no-cache-dir mod_wsgi==4.9.1 --no-binary
mod_wsgi
to try to get it to build with the latest python3.10 (I tried several pip
installs, starting with just --no-cache-dir)
Note I am trying to upgrade several applications to python3.10, so for the
most part I have left the original files created by mod_wsgi-express
setup-server alone under the centos7 yum installed python 3.6, mod_wsgi
4.7.0
I've hand-edited
/etc/mod_wsgi-express/sandbox.routes.loutilities.com/httpd.conf as follows
159c159
< LoadModule wsgi_module
'/var/www/sandbox.routes.loutilities.com/venv/lib64/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so'
---
> LoadModule wsgi_module
'/var/www/sandbox.routes.loutilities.com/venv/lib64/python3.10/site-packages/mod_wsgi/server/mod_wsgi-py310.cpython-310-x86_64-linux-gnu.so'
I'm not sure this is sufficient to "shift" to the new python version, but I
was hoping to touch as little as possible rather than setting everything up
again for 8 applications.
I see the following in journalctl when I try to start the service.
Jun 05 08:55:02 loutility-server-digitalocean apachectl[23870]: httpd
(mod_wsgi-express): Syntax error on line 159 of
/etc/mod_wsgi-express/sandbox.routes.loutilities.com/httpd.conf: Cannot
load
/var/www/sandbox.routes.loutilities.com/venv/lib64/python3.10/site-packages/mod_wsgi/server/mod_wsgi-py310.cpython-310-x86_64-linux-gnu.so
into server:
/var/www/sandbox.routes.loutilities.com/venv/lib64/python3.10/site-packages/mod_wsgi/server/mod_wsgi-py310.cpython-310-x86_64-linux-gnu.so:
undefined symbol: GENERAL_NAME_free
I notice the following from the build directory
Python-3.10.4]$ grep -R GENERAL_NAME_free . ./Modules/_ssl.c:
sk_GENERAL_NAME_pop_free(names, GENERAL_NAME_free);
Binary file ./Modules/_ssl.o matches
Binary file ./python matches
Binary file ./libpython3.10.a matches Binary file ./Programs/_testembed
matches
and libpython3.10.a is in
/usr/local/lib/python3.10/config-3.10-x86_64-linux-gnu:
$ find /usr/local/lib -name libpython3.10.a
/usr/local/lib/libpython3.10.a
/usr/local/lib/python3.10/config-3.10-x86_64-linux-gnu/libpython3.10.a
What other debugging steps should I take? Do I need to re-run
mod_wsgi-express? setup-server. Is mod_wsgi not being built correctly? Or
something else?
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/modwsgi/659349d3-b0ba-40e6-b108-9262567c99c6n%40googlegroups.com.