Page 1 of 2

omero.web Permission denied: access to /omero denied

PostPosted: Fri Mar 14, 2014 7:23 pm
by Tom
Problem: http://localhost/omero failure with log error "Permission denied: access to /omero denied"

System environment:
Omero 5.0, Apache 2.2.15-29, Cent OS 6.2, FastCFI mod_fastcgi 2.4.6
# sudo -u omero bin/omero config get
# (some info hidden)
DYLD_LIBRARY_PATH=/usr/share/java:/usr/lib/:
ICE_HOME=/usr/share/Ice-3.4.2
LD_LIBRARY_PATH=/usr/share/java:/usr/lib:
OMERO_HOME=/usr/local/omero.server
omero.db.name=****
omero.db.user=****
omero.security.password_provider=chainedPasswordProvider
omero.web=True
omero.web.application_server=fastcgi-tcp

# ls -ld var/
drwxrwxrwx. 5 omero omero 4096 Mar 14 14:07 var/
# ls -ld var/om*
-rw-rw-rw-. 1 omero omero 0 Mar 14 13:25 var/omero.fcgi

# httpd configuration:
RewriteEngine on
RewriteRule ^/?$ /omero/ [R]

FastCGIExternalServer "$OMERO_HOME/var/omero.fcgi" -host 0.0.0.0:
4080

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

<Directory "/usr/local/OMERO.server-5.0.0-ice34-b19/lib/python/omeroweb/static">
Options -Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>

Alias /static $OMERO_HOME/lib/python/omeroweb/static
Alias /omero "$OMERO_HOME/var/omero.fcgi/"


And the FastCGI seems to be listening:
[root@newton omero.server]# netstat -an | grep 4080
tcp 0 0 0.0.0.0:4080 0.0.0.0:* LISTEN

Re: omero.web Permission denied: access to /omero denied

PostPosted: Fri Mar 14, 2014 7:26 pm
by Tom
the http://localhost/omero is supposed to be captured by FastCGI socket at 4080 but somehow it was not, and passed to Apache.

Any hint/help is greatly appreciated. Thanks in advance.
Tom

Re: omero.web Permission denied: access to /omero denied

PostPosted: Fri Mar 14, 2014 9:00 pm
by jburel

Re: omero.web Permission denied: access to /omero denied

PostPosted: Sun Mar 16, 2014 2:18 am
by Tom
Thank you jmarie. That link is really informative and helpful.
So I followed with it, and reproduced same issue they had in the end: access to /omero denied.
I got the development model working too, as they did.

Any other hint/comment? Gratefully thanks.
Tom

Re: omero.web Permission denied: access to /omero denied

PostPosted: Sun Mar 16, 2014 9:31 pm
by Tom
Well... actually, by following with steps here:
https://confluence-vre.its.monash.edu.au/display/CVL/Installing+Omero+on+CentOS+6.3+%2864-bit%29 except java part, I got same "access to /omero denied" error.

I regret that did replaced the openjdk with Oracle one. After that the omera server would not start again. Even worse, even though I removed Oracle JDK and reinstalled openjdk, OMERO server is still not happy.
This time, it seems to be somethging wrong with Java bean:
2014-03-16 16:53:08,577 ERROR [ ome.services.blitz.Entry] ( main) Error on startup.
org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [OMERO.blitz], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'OMERO.blitz' defined in URL [jar:file:/usr/local/OMERO.server-5.0.0-ice34-b19/lib/server/blitz.jar!/beanRefContext.xml]: Cannot resolve reference to bean 'ome.server' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ome.server' defined in URL [jar:file:/usr/local/OMERO.server-5.0.0-ice34-b19/lib/server/server.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [ome.system.OmeroContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'internal-ome.api.IDelete' defined in URL [jar:file:/usr/local/OMERO.server-5.0.0-ice34-b19/lib/server/server.jar!/ome/services/service-ome.api.IDelete.xml]: Cannot resolve reference to bean 'internal-ome.api.LocalAdmin' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'internal-ome.api.IAdmin' defined in URL [jar:file:/usr/local/OMERO.server-5.0.0-ice34-b19/lib/server/server.jar!/ome/services/service-ome.api.IAdmin.xml]: Cannot resolve reference to bean 'passwordProvider' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'LdapPasswordProvider' is defined


It is giving me hard time. ...
Should I create another thread for it? Thanks in advance for any suggestion/hint.

Re: omero.web Permission denied: access to /omero denied

PostPosted: Sun Mar 16, 2014 9:44 pm
by Tom
Someone had this issue before with openjdk. Interesting thing is that it was ok with openjdk for me. The problem came with after I switched to Sun Java and switched back.
Crying ....

Re: omero.web Permission denied: access to /omero denied

PostPosted: Mon Mar 17, 2014 9:20 am
by manics
Hi Tom

Could you try replacing $OMERO_HOME in your httpd config with the actual path?

Regarding the Java error, are you explicitly setting $OMERO_HOME? If so this can cause problems as it's used internally by OMERO, see https://www.openmicroscopy.org/site/sup ... refix.html

Simon

Re: omero.web Permission denied: access to /omero denied

PostPosted: Mon Mar 17, 2014 1:23 pm
by Tom
Hi Simon,

Thank you so much for prompt response.
I checked the omero http config file generated for apache. Good it does not contain the environment variable $OMERO_HOME. The OMERO path is hard coded (as "/usr/local/OMERO.server-5.0.0-ice34-b19" ).

Yes I did set $OMERO_HOME in OS env as well with omero config set. Thanks for the advice, I now removed them, and did a restart of the omero server .... same error though:
Unable to return specified BeanFactory instance: factory key [OMERO.blitz], from group with resource name [classpath*:beanRefContext.xml]


Some thing to do with java, may be? This is a reinstalled openjdk. I can not roll back to the previous instance of openjdk (slightly older mini version) that worked at least for starting omero server.

Shall I wipe the openjdk and reinstall Sun Java or stay with this openjdk with more troubleshooting?
Thanks again,
Tom

Re: omero.web Permission denied: access to /omero denied

PostPosted: Mon Mar 17, 2014 2:59 pm
by Tom
Hmm .... the OMERO.server start up issue is now resolved by setting explicitly:

$ omero config set omero.security.password_provider chainedPasswordProvider

Now I am back to the original issue of OMERO.web. Will get back to this soon ...

Re: omero.web Permission denied: access to /omero denied

PostPosted: Mon Mar 17, 2014 3:01 pm
by Tom
same issue with same error:
Permission denied: access to /omero denied