> On 14 Jun 2018, at 11:04 am, Rajeev Jain <jainr...@gmail.com> wrote:
> 
> Here is a more complete error log:
> 
> [Wed Jun 13 17:55:33.173679 2018] [mpm_prefork:notice] [pid 2174] AH00169: 
> caught SIGTERM, shutting down
> [Wed Jun 13 17:55:34.421101 2018] [mpm_prefork:notice] [pid 2501] AH00163: 
> Apache/2.4.18 (Ubuntu) mod_wsgi/4.6.4 Python/3.6 configured -- resuming 
> normal operations
> [Wed Jun 13 17:55:34.421158 2018] [core:notice] [pid 2501] AH00094: Command 
> line: '/usr/sbin/apache2'
> [Wed Jun 13 17:55:34.576866 2018] [wsgi:error] [pid 2504] mod_wsgi 
> (pid=2504): Failed to exec Python script file 
> '/var/www/FlaskApp/flaskapp.wsgi'.
> [Wed Jun 13 17:55:34.576923 2018] [wsgi:error] [pid 2504] mod_wsgi 
> (pid=2504): Exception occurred processing WSGI script 
> '/var/www/FlaskApp/flaskapp.wsgi'.
> [Wed Jun 13 17:55:34.578129 2018] [wsgi:error] [pid 2504] Traceback (most 
> recent call last):
> [Wed Jun 13 17:55:34.578169 2018] [wsgi:error] [pid 2504]   File 
> "/var/www/FlaskApp/flaskapp.wsgi", line 7, in <module>
> [Wed Jun 13 17:55:34.578182 2018] [wsgi:error] [pid 2504]     from FlaskApp 
> import app as application
> [Wed Jun 13 17:55:34.578189 2018] [wsgi:error] [pid 2504]   File 
> "/var/www/FlaskApp/FlaskApp/__init__.py", line 2, in <module>
> [Wed Jun 13 17:55:34.578192 2018] [wsgi:error] [pid 2504]     from flask 
> import Flask
> [Wed Jun 13 17:55:34.578197 2018] [wsgi:error] [pid 2504]   File 
> "/home/rajeev/anaconda3/lib/python3.6/site-packages/flask/__init__.py", line 
> 21, in <module>
> [Wed Jun 13 17:55:34.578200 2018] [wsgi:error] [pid 2504]     from .app 
> import Flask, Request, Response
> [Wed Jun 13 17:55:34.578205 2018] [wsgi:error] [pid 2504]   File 
> "/home/rajeev/anaconda3/lib/python3.6/site-packages/flask/app.py", line 25, 
> in <module>
> [Wed Jun 13 17:55:34.578207 2018] [wsgi:error] [pid 2504]     from . import 
> cli, json
> [Wed Jun 13 17:55:34.578212 2018] [wsgi:error] [pid 2504]   File 
> "/home/rajeev/anaconda3/lib/python3.6/site-packages/flask/cli.py", line 18, 
> in <module>
> [Wed Jun 13 17:55:34.578218 2018] [wsgi:error] [pid 2504]     import ssl
> [Wed Jun 13 17:55:34.578223 2018] [wsgi:error] [pid 2504]   File 
> "/home/rajeev/anaconda3/lib/python3.6/ssl.py", line 101, in <module>
> [Wed Jun 13 17:55:34.578225 2018] [wsgi:error] [pid 2504]     import _ssl     
>         # if we can't import it, let the error propagate
> [Wed Jun 13 17:55:34.578243 2018] [wsgi:error] [pid 2504] ImportError: 
> /home/rajeev/anaconda3/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so:
>  undefined symbol: SSLv2_method
> 
> 
> As a side note, I have 2 other php virtualhosts running on the same ubuntu 
> box and pages are being served correctly.

Those PHP sites are likely going to be the issue then as the PHP modules are 
likely pulling in the SSL libraries. It could also be the LDAP related modules, 
but more likely the PHP modules.

What Anaconda Python does with supplying its own SSL libraries, as well as 
other replacements for system libraries is a right pain and is going to break 
any system where Python is being embedded in another process, such as is the 
case with mod_wsgi and Apache. So isn't just the SSL libraries. Because PHP can 
pull in image libraries, that can conflict with those in Anaconda Python if 
using image manipulation packages like Pillow (PIL).

If you have the existing PHP sites I don't really see a solution besides 
running mod_wsgi-express to create a separate Apache/mod_wsgi instance and then 
proxy that behind the main Apache.

Some links which talk about mod_wsgi-express and running it like this are 
below. Note that when using mod_wsgi-express it will automatically configure 
the separate Apache instance for you, so it isn't as bad as it may seem.

Introduction in:

* http://blog.dscpl.com.au/2015/04/introducing-modwsgi-express.html 
<http://blog.dscpl.com.au/2015/04/introducing-modwsgi-express.html>

Details on having it behind a proxy. Ignore that it talks about Docker, is 
still relevant.

* http://blog.dscpl.com.au/2015/06/proxying-to-python-web-application.html 
<http://blog.dscpl.com.au/2015/06/proxying-to-python-web-application.html>
* http://blog.dscpl.com.au/2015/07/redirection-problems-when-proxying-to.html 
<http://blog.dscpl.com.au/2015/07/redirection-problems-when-proxying-to.html>

Pre-create config so easier to integrate with system startup scripts.

* https://github.com/GrahamDumpleton/mod_wsgi#running-mod_wsgi-express-as-root 
<https://github.com/GrahamDumpleton/mod_wsgi#running-mod_wsgi-express-as-root>

Ignore that mentions root. You would need to run it on port other than 80 and 
so doesn't need to run as root.

So sorry, don't have a simple solution if you want to run with Anaconda Python 
because of what Anaconda Python does with supplying its own libraries which 
conflict with system libraries.

Graham

-- 
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 modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to