mod_wsgi configuration issue- .mod_wsgi (pid=7985): Initializing Python. - mod_wsgi (pid=7982): Attach interpreter ''

1,960 views
Skip to first unread message

Nirmal

unread,
Apr 4, 2014, 8:49:52 AM4/4/14
to mod...@googlegroups.com
I have installed mod_wsgi in Redhat box . While installing , I didn't see as such any error, but after installation of mod_wsgi, when restarted apache, I can see following logs in apache error log in info mod- ,
(Python 2.7 and apache 2.2.3. is installed in system.)
 
 
 [Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5795): Cleanup interpreter ''.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5800): Terminating Python.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5795): Terminating Python.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5797): Terminating Python.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5796): Terminating Python.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5800): Python has shutdown.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5795): Python has shutdown.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5796): Python has shutdown.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5797): Python has shutdown.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5798): Destroying interpreters.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5798): Cleanup interpreter ''.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5802): Destroying interpreters.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5802): Cleanup interpreter ''.
Fatal Python error: Interpreter not initialized (version mismatch?)
Fatal Python error: Interpreter not initialized (version mismatch?)
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5799): Destroying interpreters.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5799): Cleanup interpreter ''.
Fatal Python error: Interpreter not initialized (version mismatch?)
Fatal Python error: Interpreter not initialized (version mismatch?)
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5799): Terminating Python.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5801): Terminating Python.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5799): Python has shutdown.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5801): Python has shutdown.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5798): Terminating Python.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5802): Terminating Python.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5802): Python has shutdown.
[Fri Apr 04 08:40:10 2014] [info] mod_wsgi (pid=5798): Python has shutdown.
Fatal Python error: Interpreter not initialized (version mismatch?)
Fatal Python error: Interpreter not initialized (version mismatch?)
Fatal Python error: Interpreter not initialized (version mismatch?)
Fatal Python error: Interpreter not initialized (version mismatch?)
[Fri Apr 04 08:40:10 2014] [info] removed PID file /etc/httpd/run/httpd.pid (pid=5793)
[Fri Apr 04 08:40:10 2014] [notice] caught SIGTERM, shutting down
[Fri Apr 04 08:40:11 2014] [notice] SELinux policy enabled; httpd running as context user_u:system_r:httpd_t:s0
[Fri Apr 04 08:40:11 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Apr 04 08:40:11 2014] [info] Init: Seeding PRNG with 256 bytes of entropy
[Fri Apr 04 08:40:11 2014] [notice] SSL FIPS mode disabled
[Fri Apr 04 08:40:11 2014] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Fri Apr 04 08:40:11 2014] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Fri Apr 04 08:40:11 2014] [info] Init: Initializing (virtual) servers for SSL
[Fri Apr 04 08:40:11 2014] [info] Server: Apache/2.2.3, Interface: mod_ssl/2.2.3, Library: OpenSSL/0.9.8e-fips-rhel5
[Fri Apr 04 08:40:11 2014] [notice] Digest: generating secret for digest authentication ...
[Fri Apr 04 08:40:11 2014] [notice] Digest: done
[Fri Apr 04 08:40:11 2014] [info] APR LDAP: Built with OpenLDAP LDAP SDK
[Fri Apr 04 08:40:11 2014] [info] LDAP: SSL support available
[Fri Apr 04 08:40:11 2014] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Fri Apr 04 08:40:12 2014] [info] Init: Seeding PRNG with 256 bytes of entropy
[Fri Apr 04 08:40:12 2014] [notice] SSL FIPS mode disabled
[Fri Apr 04 08:40:12 2014] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Fri Apr 04 08:40:12 2014] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Fri Apr 04 08:40:12 2014] [info] Shared memory session cache initialised
[Fri Apr 04 08:40:12 2014] [info] Init: Initializing (virtual) servers for SSL
[Fri Apr 04 08:40:12 2014] [info] Server: Apache/2.2.3, Interface: mod_ssl/2.2.3, Library: OpenSSL/0.9.8e-fips-rhel5
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7979): Initializing Python.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7980): Initializing Python.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7979): Attach interpreter ''.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7981): Initializing Python.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7982): Initializing Python.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7980): Attach interpreter ''.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7983): Initializing Python.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7981): Attach interpreter ''.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7984): Initializing Python.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7985): Initializing Python.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7983): Attach interpreter ''.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7982): Attach interpreter ''.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7984): Attach interpreter ''.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7986): Initializing Python.
[Fri Apr 04 08:40:12 2014] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Fri Apr 04 08:40:12 2014] [info] Server built: Oct 16 2013 12:22:17
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7985): Attach interpreter ''.
[Fri Apr 04 08:40:12 2014] [info] mod_wsgi (pid=7986): Attach interpreter ''.
 
 
While I am checking  whether the compiled mod_wsgi module is making use of a shared library for Python , it gives me below output.
 
[root@atehost2 modules]# ldd mod_wsgi.so
        linux-gate.so.1 =>  (0x0011c000)
        libpthread.so.0 => /lib/i686/nosegneg/libpthread.so.0 (0x00fb8000)
        libdl.so.2 => /lib/libdl.so.2 (0x0031a000)
        libutil.so.1 => /lib/libutil.so.1 (0x00110000)
        libm.so.6 => /lib/i686/nosegneg/libm.so.6 (0x0011d000)
        libc.so.6 => /lib/i686/nosegneg/libc.so.6 (0x00144000)
        /lib/ld-linux.so.2 (0x00898000)
 
Can anyone please give any pointer to resolve the issue.
 
Thanks,
Nirmal

Graham Dumpleton

unread,
Apr 5, 2014, 6:51:13 AM4/5/14
to mod...@googlegroups.com
Your Python installation needs to have been installed with the --enable-shared option given to its 'configure' command.

This is documented in:


Make sure you run 'make distclean' in the Python source code before reinstalling it if you are not starting from fresh Python source code.

Note, you must have also been overriding WSGIPythonHome most likely to get that. Else you have mod_python also installed and it was using a different Python version.

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

Reply all
Reply to author
Forward
0 new messages