We're Hiring!

Apache mod_python failure after reboot

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Apache mod_python failure after reboot

Postby flekschas » Mon Mar 29, 2010 1:43 pm

Hi,

I've set up omero using apache with mod_python and everything is working fine until I have to reboot the system. After the reboot apache is running but it seems as if it's hang-up because nothing is loading (i just see the small indicator image of the browser).
When restarting apache manually after the reboot everything works fine again.

The mod_python config file looks like this:
Code: Select all
<Location "/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE omeroweb.settings
    PythonDebug On
    PythonPath "['/srv/omero/omero_dist/lib/python', '/srv/omero/omero_dist/lib/python/omeroweb'] + sys.path"
</Location>


The apache error_log:
Code: Select all
[Mon Mar 29 14:26:49 2010] [notice] caught SIGTERM, shutting down
[Mon Mar 29 14:26:50 2010] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Mon Mar 29 14:26:50 2010] [notice] mod_python: using mutex_directory /tmp
[Mon Mar 29 14:26:50 2010] [notice] Apache/2.2.10 (Linux/SUSE) PHP/5.2.11 with Suhosin-Patch mod_python/3.3.1 Python/2.6 configured -- resuming normal operations
/usr/lib64/python2.6/site-packages/mod_python/importer.py:32: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5


Has anyone an idea whats wrong?
(It has something to do with the mod_python as apache works fine after reboot without it)
F Lekschas
BCRT - Charite
flekschas
 
Posts: 13
Joined: Wed Mar 10, 2010 4:11 pm

Re: Apache mod_python failure after reboot

Postby uestra » Tue Apr 06, 2010 6:30 am

hi,

i had a problem like that on a Ubuntu 9.10 System. I solved that with two scripts in '/etc/init.d':
Code: Select all
#!/usr/bin/expect
# script-name: websetter
spawn /home/omero/omero_dist/bin/omero web settings
expect "Do you want to ovewrite it? (yes/no)" { send "no\n" }
expect "Do you want to ovewrite it? (yes/no)" { send "no\n" }
expect "Database synchronization..." { interact }

the second starts the first:
Code: Select all
#!/bin/sh
# startet expect script zur omero db synchronisation
echo 'start omero db synchronistation' >> /var/log/omerosyn.log
sudo -u www-data ./websetter
echo 'omero db synchronistation durchgefuehrt' >> /var/log/omerosyn.log

'www-data' is the apache-user. The Django System for Omero is available 3-4 minutes after a reebot with this scripts. This is not very nice, but it works.

ubuntu 9.10: mod_python 3.3.1 and python 2.6.4.

bye
uestra
 
Posts: 12
Joined: Wed Feb 24, 2010 9:51 am

Re: Apache mod_python failure after reboot

Postby flekschas » Tue Apr 06, 2010 8:48 am

Thanks. I'll test that.

EDIT:
Ok that's strange after 5 minutes of weiting the page finally loaded and apache seemed to work normal again.

Has anyone tried to use mod_wsgi for deploying the django server to production? I read (http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#howto-deployment-modwsgi) that this is the recommended way but I failed getting it up and running.
F Lekschas
BCRT - Charite
flekschas
 
Posts: 13
Joined: Wed Mar 10, 2010 4:11 pm


Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest