We're Hiring!

4.2.2 OMERO.web starts Using FastCGI but URL fails

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.

4.2.2 OMERO.web starts Using FastCGI but URL fails

Postby bernie » Mon Jan 03, 2011 10:43 pm

I've upgraded our development server (Centos 5) from 4.2.0 to 4.2.2 and the omero server starts without issue.
FastCGI has been added to Apache and is enabled:

[root@omerodev mod_fastcgi-2.4.6]# grep -i "FastCGI" /var/log/httpd/error_log
[Mon Jan 03 19:37:58 2011] [notice] FastCGI: process manager initialized (pid 11301)

OMERO.web is configured:

[omero@omerodev OMERO.server-Beta-4.2.2]$ bin/omero config get
omero.config.upgraded=4.2.0
omero.db.name=omero
omero.db.pass=********
omero.db.passwd=********
omero.db.user=omero
omero.web.application_host=http://omerodev.<domain>:80
omero.web.application_server=fastcgi-tcp

and runs:

[omero@omerodev OMERO.server-Beta-4.2.2]$ bin/omero web start
Starting OMERO.web... [OK]

BUT I cannot open the location:

http://omerodev.domain/webclient

gives:

Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
result = object(req)

File "/home/omero/omero_dist/lib/python/django/core/handlers/modpython.py", line 228, in handler
return ModPythonHandler()(req)

File "/home/omero/omero_dist/lib/python/django/core/handlers/modpython.py", line 191, in __call__
self.load_middleware()

File "/home/omero/OMERO.server-Beta-4.2.2/lib/python/django/core/handlers/base.py", line 33, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:

File "/home/omero/OMERO.server-Beta-4.2.2/lib/python/django/utils/functional.py", line 269, in __getattr__
self._setup()

File "/home/omero/OMERO.server-Beta-4.2.2/lib/python/django/conf/__init__.py", line 40, in _setup
self._wrapped = Settings(settings_module)

File "/home/omero/OMERO.server-Beta-4.2.2/lib/python/django/conf/__init__.py", line 73, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)

File "/home/omero/OMERO.server-Beta-4.2.2/lib/python/django/utils/importlib.py", line 35, in import_module
__import__(name)

File "/home/omero/OMERO.server-Beta-4.2.2/lib/python/omeroweb/settings.py", line 55, in ?
CONFIG_XML = omero.config.ConfigXml(CONFIG_XML)

File "/home/omero/OMERO.server-Beta-4.2.2/lib/python/omero/config.py", line 49, in __init__
self.source = open(filename, "a+") #: Open file handle

IOError: [Errno 13] Permission denied: '/home/omero/omero_dist/etc/grid/config.xml'

I've run out of ideas,

Bernie
bernie
 
Posts: 50
Joined: Mon Aug 17, 2009 12:03 pm

Re: 4.2.2 OMERO.web starts Using FastCGI but URL fails

Postby jmoore » Tue Jan 04, 2011 9:21 am

Hi Bernie,

how did you configure fastcgi for Apache? It looks like the previous mod_python configuration is still active. If you run "bin/omero web config apache" a block of XML will be printed out that you can use:
Code: Select all
$ bin/omero web config apache
###
### Stanza for OMERO.web created 2011-01-04 10:17:21.051696
###
FastCGIExternalServer "/OMERO_DIST/var/omero.fcgi" -host 0.0.0.0:4080

<Directory "/OMERO_DIST/var">
    Options -Indexes FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

<Directory "/OMERO_DIST/lib/python/omeroweb/media">
    Options -Indexes FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

Alias /appmedia /OMERO_DIST/lib/python/omeroweb/media
Alias / "/OMERO_DIST/var/omero.fcgi/"


Hope that helps.
Cheers,
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: 4.2.2 OMERO.web starts Using FastCGI but URL fails

Postby bernie » Tue Jan 04, 2011 10:41 am

Hi Josh,

excellent, after fumbling my way throught the setup and reaching a brick wall I went to bed, got up and went to work and you'd already relpied; thank you.

I had generated the stanza but it never occured to me that I needed to do anything with it!

I put it at the end of httdp.conf. It doesn't seem to matter if it's enclosed as in:

<IfModule mod_fastcgi.c>
........
</IfModule>

then web syncmedia

OMERO.web now works although withought any CSS. I am saying this without double checking the guide or forums for help, which I will do,

Bernie
bernie
 
Posts: 50
Joined: Mon Aug 17, 2009 12:03 pm

Re: 4.2.2 OMERO.web starts Using FastCGI but URL fails

Postby jmoore » Tue Jan 04, 2011 11:14 am

The `<If .../>` block would only make a difference if you hadn't already installed fastcgi.

As for your CSS resources, I'd guess you need to run `bin/omero web syncmedia`.

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: 4.2.2 OMERO.web starts Using FastCGI but URL fails

Postby bernie » Tue Jan 04, 2011 11:53 am

Josh,

I did run bin/omero web syncmedia`

and have now tried it again (varying the point in the startup sequence at which I run it ie with the server off/on , web service off/on, retarting apache). Sorry, but no luck,

Bernie
bernie
 
Posts: 50
Joined: Mon Aug 17, 2009 12:03 pm

Re: 4.2.2 OMERO.web starts Using FastCGI but URL fails

Postby atarkowska » Thu Jan 13, 2011 10:09 am

Hi Bernie

In httpd.conf, did you add aliases:

Code: Select all
Alias /appmedia /OMERO_DIST/lib/python/omeroweb/media
Alias / "/OMERO_DIST/var/omero.fcgi/"
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: 4.2.2 OMERO.web starts Using FastCGI but URL fails

Postby bernie » Thu Jan 13, 2011 5:38 pm

Hi Atarkowska,

I did:

Alias /appmedia /home/omero/OMERO.server-Beta-4.2.2/lib/python/omeroweb/media
Alias / "/home/omero/OMERO.server-Beta-4.2.2/var/omero.fcgi/"

but have discovered that whereas /media exists, /omero.fcgi doesn't.

All I get:

ls -l /home/omero/OMERO.server-Beta-4.2.2/var/
total 16
-rw-r--r-- 1 omero omero 5 Jan 4 11:49 django.pid
drwxrwxr-x 2 omero omero 4096 Jan 3 18:07 log
drwxrwxr-x 5 omero omero 4096 Jan 3 18:07 master
drwxrwxr-x 2 omero omero 4096 Jan 3 18:07 registry

and

find /home/omero/ -name omero.fcgi

draws a blank.

I shall try and find out why it's not there!
bernie
 
Posts: 50
Joined: Mon Aug 17, 2009 12:03 pm

Re: 4.2.2 OMERO.web starts Using FastCGI but URL fails

Postby bernie » Thu Jan 13, 2011 6:24 pm

I'm assuming that omero.fcgi is supposed to be created at some point, but it isn't (or wasn't).
bernie
 
Posts: 50
Joined: Mon Aug 17, 2009 12:03 pm

Re: 4.2.2 OMERO.web starts Using FastCGI but URL fails

Postby atarkowska » Fri Jan 14, 2011 9:15 am

Hi Berni

The file /home/omero/OMERO.server-Beta-4.2.2/var/omero.fcgi/ doesn't actually have to exist. It's just a URL used by the Web server internally, a hook for signifying which requests at a URL should be handled by FastCGI. For more details please see http://docs.djangoproject.com/en/1.1/howto/deployment/fastcgi/

Just to confirm... in the last post your path to omero is
Code: Select all
/home/omero/OMERO.server-Beta-4.2.2/
, but on the previous you were using
Code: Select all
/OMERO_DIST/
, especially in the Apache config. Is this correctly set up on Apache?

Thank
Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: 4.2.2 OMERO.web starts Using FastCGI but URL fails

Postby bernie » Sun Jan 16, 2011 1:58 pm

Hey Atarkowska,

we use a symlink to manage server software upgrades. So the user omero's home directory looks like this:

[omero@omerodev ~]$ ls -l
total 269444
drwxr-xr-x 2 omero omero 4096 Aug 13 12:39 Desktop
drwxr-xr-x 8 omero omero 4096 Dec 23 14:51 omero
-rw-rw-r-- 1 omero omero 101383003 Dec 2 2009 omero-Beta4.1.1.tar.bz2
-rw-rw-r-- 1 omero omero 86515929 Jul 14 2010 omero-Beta4.2.0.tar.bz2
lrwxrwxrwx 1 omero omero 23 Jan 3 18:02 omero_dist -> OMERO.server-Beta-4.2.2
drwxr-xr-x 9 omero omero 4096 Jun 4 2010 omero_dist_old
drwxr-xr-x 9 omero omero 4096 Jan 3 18:01 OMERO.server-Beta-4.2.0
drwxr-xr-x 9 omero omero 4096 Jan 3 18:07 OMERO.server-Beta-4.2.2
-rw-rw-r-- 1 omero omero 87688037 Dec 6 13:36 OMERO.server-Beta-4.2.2.tar.bz2
drwxr-xr-x 2 apache apache 4096 Aug 12 14:12 webdb
drwxr-xr-x 2 apache apache 4096 Aug 12 13:45 weblog

Josh refers to OMERO_DIST but I can't see where I have in this thread, although the errors in the first post do refer to 'omero_dist'. But, could the symlink be the problem?

I think httpd.conf is correctly configured and I have attached it if you want to have a look.

Thanks for all your help,

Bernie
bernie
 
Posts: 50
Joined: Mon Aug 17, 2009 12:03 pm

Next

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest