We're Hiring!

omero web not working on Apache

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.

omero web not working on Apache

Postby Raj » Thu Nov 14, 2013 6:27 pm

Can any one help me on troubleshooting this? Or is anyone aware if there are any issues with running omero and omero web server in Centos6/RHEL6?
While browsing omero.****.edu, I am getting :
NOT Found: The requested URL /omero/ was not found on this server.
Apache/2.2.15 (Red Hat) Server at omero.****.edu Port 80

I was able to start omero web server in development mode but NOT in through apache with fastcgi.
I got the mod_fastcgi installed from RPMforge as it is not available in RHN/EPEL.
Here are the configs I have:
[root@omero conf.d]# httpd -M | grep cgi
Syntax OK
cgi_module (shared)
fastcgi_module (shared)

[root@omero conf.d]# service httpd status
httpd (pid 4054) is running...

Here is my vhsot conf:
<VirtualHost *:80>
ServerName omero.****.edu
ServerAlias omero
RewriteEngine on
RewriteRule ^/?$ /omero/ [R]
FastCGIExternalServer "/omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi" -host 0.0.0.0:4080
<Directory "/omero/OMERO.server-4.4.9-ice35-b98/var">
Options -Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
<Directory "/omero/OMERO.server-4.4.9-ice35-b98/lib/python/omeroweb/static">
Options -Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
Alias /static /omero/OMERO.server-4.4.9-ice35-b98/lib/python/omeroweb/static
Alias /omero "/omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi/"
</VirtualHost>

[omero@omero log]$ omero config get
omero.data.dir=/omero/omero.data.dir
omero.db.name=******
omero.db.pass=********
omero.db.user=******
omero.web.application_host=http://omero.*****.edu:80

[omero@omero log]$ netstat -na | grep 4080
tcp 0 0 0.0.0.0:4080 0.0.0.0:* LISTEN


However, If I start omero as development (omero config set omero.web.application_server development), then I could get login page using http://localhost:4080

I guess I have some misconfiguration in apache that it is not able to communicate with fastcgiexternal server ? Appreeciate any help.

Thanks.
Raj
 
Posts: 6
Joined: Thu Nov 14, 2013 5:53 pm

Re: omero web not working on Apache

Postby Raj » Thu Nov 14, 2013 11:11 pm

More info: I obviously missed the fastcgi-tcp cnfig above: Anyway here it is, but still getting:
NOT Found: The requested URL /omero/ was not found on this server.

[omero@omero log]$ omero config get
omero.data.dir=/omero/omero.data.dir
omero.db.name=omero_database
omero.db.pass=********
omero.db.user=*********
omero.web.application_host=http://omero.***.edu:80
omero.web.application_server=fastcgi-tcp
Raj
 
Posts: 6
Joined: Thu Nov 14, 2013 5:53 pm

Re: omero web not working on Apache

Postby atarkowska » Fri Nov 15, 2013 11:47 am

Hi Raj

Could you send me apache access.log and error.log please?

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

Re: omero web not working on Apache

Postby Raj » Fri Nov 15, 2013 5:46 pm

Thanks Ola. Here are the logs when trying to access http://omero.***.edu

Here is the error_log when I start httpd:
[omero@omero ~]$ tail -f -n 0 /var/log/httpd/error_log
[Fri Nov 15 11:28:17 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Nov 15 11:28:17 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Nov 15 11:28:17 2013] [notice] Digest: done
[Fri Nov 15 11:28:17 2013] [notice] FastCGI: wrapper mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Nov 15 11:28:17 2013] [notice] FastCGI: process manager initialized (pid 11747)
[Fri Nov 15 11:28:17 2013] [notice] Apache/2.2.15 (Unix) mod_fastcgi/2.4.6 PHP/5.3.3 configured -- resuming normal operations

Here are the logs when I try to access htttp://omero.***.edu
[root@omero ****]# tail -f -n 0 /var/log/httpd/error_log
[Fri Nov 15 11:29:52 2013] [error] [client 147.134.*.*] File does not exist: /omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi

[omero@omero ~]$ tail -f -n 0 /var/log/httpd/access_log
147.134.*.* - - [15/Nov/2013:11:29:52 -0600] "GET / HTTP/1.1" 302 303 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0"
147.134.*.* - - [15/Nov/2013:11:29:52 -0600] "GET /omero/ HTTP/1.1" 404 290 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0"

[root@omero ****]# httpd -M | grep cgi
Syntax OK
cgi_module (shared)
fastcgi_module (shared)


[omero@omero ~]$ omero config get
omero.data.dir=/omero/omero.data.dir
omero.db.name=omero_database
omero.db.pass=***
omero.db.user=db_user
omero.web.application_host=http://omero.****.edu:80
omero.web.application_server=fastcgi-tcp
omero.web.debug=true


[root@omero conf.d]# cat fastcgi.conf | grep -v "^#" | grep -v "^$"
User apache
Group apache
LoadModule fastcgi_module modules/mod_fastcgi.so
FastCgiIpcDir /var/run/mod_fastcgi
FastCgiWrapper On
FastCgiConfig -idle-timeout 20 -maxClassProcesses 1

[root@omero conf.d]# cat omero_apache.conf | grep -v "^#" | grep -v "^$"
<VirtualHost *:80>
ServerName omero.***.edu
ServerAlias omero
RewriteEngine on
RewriteRule ^/?$ /omero/ [R]
FastCGIExternalServer "/omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi" -host 0.0.0.0:4080
<Directory "/omero/OMERO.server-4.4.9-ice35-b98/var">
Options -Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
<Directory "/omero/OMERO.server-4.4.9-ice35-b98/lib/python/omeroweb/static">
Options -Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
Alias /static /omero/OMERO.server-4.4.9-ice35-b98/lib/python/omeroweb/static
Alias /omero "/omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi/"
</VirtualHost>

Here is what I got before when starting omero admin and omero web:
[omero@omero ~]$ omero admin start
No descriptor given. Using etc/grid/default.xml
Waiting on startup. Use CTRL-C to exit

[omero@omero ~]$ omero web start
0 static files copied to '/omero/OMERO.server-4.4.9-ice35-b98/lib/python/omeroweb/static' (813 unmodified).
Starting OMERO.web... Removed stale /omero/OMERO.server-4.4.9-ice35-b98/var/django.pid
[OK]


Please let me know if you need more information.

Thanks.
Raj
 
Posts: 6
Joined: Thu Nov 14, 2013 5:53 pm

Re: omero web not working on Apache

Postby atarkowska » Mon Nov 18, 2013 11:33 am

Hi Raj

I think the problem is in either the permission or creation of pid file in /omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi. Either you can try to create it by typing:

Code: Select all
touch /omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi


or try to incise permission to make sure apache user has a full access there

I hope it will help

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

Re: omero web not working on Apache

Postby Raj » Mon Nov 18, 2013 5:29 pm

Thanks Ola. As I read from this link viewtopic.php?f=5&t=551&p=1888&hilit=omero.fcgi#p1888 , the file does not need to exist.Says, it is just a hook.
Anyway, I went ahead and created the file:
[omero@omero ~]$ touch /omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi
[omero@omero ~]$ ls -la /omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi
-rw-rw-r-- 1 omero omero 0 Nov 18 11:19 /omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi

And restarted the httpd and here is error log when I try to access the page;
[omero@omero ~]$ tail -f -n 0 /var/log/httpd/error_log
[Mon Nov 18 11:21:49 2013] [notice] caught SIGTERM, shutting down
[Mon Nov 18 11:21:49 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Nov 18 11:21:49 2013] [notice] Digest: generating secret for digest authentication ...
[Mon Nov 18 11:21:49 2013] [notice] Digest: done
[Mon Nov 18 11:21:49 2013] [notice] FastCGI: wrapper mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Nov 18 11:21:49 2013] [notice] FastCGI: process manager initialized (pid 5338)
[Mon Nov 18 11:21:49 2013] [notice] Apache/2.2.15 (Unix) mod_fastcgi/2.4.6 PHP/5.3.3 configured -- resuming normal operations
[Mon Nov 18 11:22:58 2013] [error] [client 10.47.160.68] File does not exist: /omero/OMERO.server-4.4.9-ice35-b98/var/omero.fcgi/
Raj
 
Posts: 6
Joined: Thu Nov 14, 2013 5:53 pm

Re: omero web not working on Apache

Postby Raj » Mon Nov 18, 2013 7:51 pm

Do I need to set anything on SetHandler or AddHandler directive on Apache? If so, what and where should I configure those. The "./omero web config apache" does not tell us anything about setting or adding handler.

Thanks.
Raj
 
Posts: 6
Joined: Thu Nov 14, 2013 5:53 pm

Re: omero web not working on Apache

Postby Raj » Mon Nov 18, 2013 10:53 pm

Yea ! It is finally working. At least I could now get into the login page:
Finally found the issue after discussion in mailing list. Here is the detail as it might help someone using fastcgi from RPMForge.
----
I have the fastcgi installed from the RPMForge as an RPM. I did not try compiling from source because I was getting dependency error when installting httpd-devel from rhn repo.

Error: Package: apr-util-devel-1.3.9-3.el6_0.1.x86_64 (rhel-x86_64-server-6)
Requires: db4-devel

And when I try to install db4-devel, this is what I got:
Setting up Install Process
Package db4-devel-4.7.25-18.el6_4.x86_64 is obsoleted by db53-devel-5.3.21-1ice.el6.x86_64 which is already installed Nothing to do

This was because the db53-devel installed from Zeroc-ice repo already has later version of db4-level and so conflicting with RHN repository. So, I did not even try to compile the fastcgi as I could not install the httpd-devel. Instead I downloaded and installed binary from RPMForge. And the default fastcgi.conf file it put is below:
-----
# WARNING: this is a kludge:
## The User/Group for httpd need to be set before we can load mod_fastcgi, ## but /etc/httpd/conf.d/fastcgi.conf on RHEL gets loaded before ## /etc/httpd/conf/httpd.conf, so we need to set them here :( ## mod_fcgid does not have this bug, ## but it does not handle child PHP processes appropriately per ## http://serverfault.com/questions/303535 ... 093#305093

User apache
Group apache

LoadModule fastcgi_module modules/mod_fastcgi.so

# dir for IPC socket files
FastCgiIpcDir /var/run/mod_fastcgi

# wrap all fastcgi script calls in suexec
FastCgiWrapper On

# global FastCgiConfig can be overridden by FastCgiServer options in vhost config FastCgiConfig -idle-timeout 20 -maxClassProcesses 1

# sample PHP config
# see /usr/share/doc/mod_fastcgi-2.4.6 for php-wrapper script # don't forget to disable mod_php in /etc/httpd/conf.d/php.conf!
#
# to enable privilege separation, add a "SuexecUserGroup" directive # and chown the php-wrapper script and parent directory accordingly # see also http://www.brandonturner.net/blog/2009/ ... ode_cache/
#
#FastCgiServer /var/www/cgi-bin/php-wrapper #AddHandler php-fastcgi .php #Action php-fastcgi /cgi-bin/php-wrapper #AddType application/x-httpd-php .php #DirectoryIndex index.php # #<Location /cgi-bin/php-wrapper>
# Order Deny,Allow
# Deny from All
# Allow from env=REDIRECT_STATUS
# Options ExecCGI
# SetHandler fastcgi-script
#</Location>
----

The issue was with FastCGIWrapper set to On. When I comment that line, then I was able to browse the login page. I am not actually sure what and why the FastCGIWrapper mean and did not work when set to on. Anyway, atleast I could now advance to the point where I could browse the login page.

Thanks.
Raj
 
Posts: 6
Joined: Thu Nov 14, 2013 5:53 pm


Return to Installation and Deployment

Who is online

Users browsing this forum: Google [Bot] and 1 guest