We're Hiring!

CLOSED:Beta 4.2 & web issue

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.

CLOSED:Beta 4.2 & web issue

Postby seb1435 » Fri Jul 16, 2010 12:22 pm

Hi !

I've just installed rev7575. desktop Clients working fine, but I've an issue installing OmeroWeb.

I've set all things like in instructions, using mod_python. But when I open my browser,
I get :

Code: Select all
MOD_PYTHON ERROR

ProcessId:      2166
Interpreter:    'omero-test-lenny64.cparis.fr'

ServerName:     'omero-test-lenny64.cparis.fr'
DocumentRoot:   '/var/www/'

URI:            '/'
Location:       '/'
Directory:      None
Filename:       '/var/www/'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'django.core.handlers.modpython'

Traceback (most recent call last):

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  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_dist/lib/python/django/core/handlers/base.py", line 33, in load_middleware
    for middleware_path in settings.MIDDLEWARE_CLASSES:

  File "/home/omero/omero_dist/lib/python/django/utils/functional.py", line 269, in __getattr__
    self._setup()

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

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

  File "/home/omero/omero_dist/lib/python/django/utils/importlib.py", line 35, in import_module
    __import__(name)

  File "/home/omero/omero_dist/lib/python/omeroweb/settings.py", line 44, in <module>
    sys.exit(1)

SystemExit: 1


It was working fine with Beta4.1...

Any clues ?

Thanks,

best regards,
Seb
seb1435
 
Posts: 8
Joined: Fri Jul 16, 2010 12:17 pm

Re: Beta 4.2 & web issue

Postby atarkowska » Fri Jul 16, 2010 1:29 pm

Please check the followings:

- /home/omero/omero_dist/var/lib/custom_settings.py is in place?
- apache_user has enough permissions to read from custom_settings.py?
- LOGDIR = '/home/omero/weblog/' and apache_user has enough permissions to write there?
- Could you please confirm you configure mod_python and set up pythonpath to:

Code: Select all
PythonPath "['/home/omero/omero_dist/lib/python', '/home/omero/omero_dist/var/lib', '/home/omero/omero_dist/lib/python/omeroweb'] + sys.path"
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Beta 4.2 & web issue

Postby seb1435 » Fri Jul 16, 2010 2:06 pm

Hi !

atarkowska wrote:- /home/omero/omero_dist/var/lib/custom_settings.py is in place?

atarkowska wrote:- apache_user has enough permissions to read from custom_settings.py?


> Yes it is. Apache user own it. If I set Apache user owner of the whole var/lib directory, I have error when I start omero throught omero admin start :

Code: Select all
Cannot access /home/omero/omero_dist/var/lib, a required directory for OMERO


atarkowska wrote:LOGDIR = '/home/omero/weblog/' and apache_user has enough permissions to write there?


> Apache user own this directory.

atarkowska wrote:- Could you please confirm you configure mod_python and set up pythonpath to:


Here the python path:

Code: Select all
PythonPath "['/opt/Ice-3.3/python', '/home/omero/omero_dist/lib/python', '/home/omero/omero_dist/var/lib', '/home/omero/omero_dist/lib/python/omeroweb'] + sys.path"


Thanks !

Best regards.
seb1435
 
Posts: 8
Joined: Fri Jul 16, 2010 12:17 pm

Re: Beta 4.2 & web issue

Postby seb1435 » Fri Jul 16, 2010 3:17 pm

In addtion, in var/log/master.err I have :

Code: Select all
Traceback (most recent call last):
  File "lib/python/runTables.py", line 13, in <module>
    __import__("tables")
ImportError: No module named tables


Maybe this can help !

Seb
seb1435
 
Posts: 8
Joined: Fri Jul 16, 2010 12:17 pm

Re: Beta 4.2 & web issue

Postby atarkowska » Fri Jul 16, 2010 3:59 pm

Could you please send me the content of home/omero/weblog/OMEROweb.log
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Beta 4.2 & web issue

Postby seb1435 » Fri Jul 16, 2010 4:29 pm

Here an old one. It was created when I ran
Code: Select all
admin web start
so by the Django server. I've reinstalled Omero4.2 rev7581 entirely, configuring all things. When using mod_python, there is no log in the folder... weblog dir is owned by apache user.
Attachments
OMEROweb.zip
(1.04 KiB) Downloaded 186 times
seb1435
 
Posts: 8
Joined: Fri Jul 16, 2010 12:17 pm

Re: Beta 4.2 & web issue

Postby atarkowska » Fri Jul 16, 2010 4:42 pm

First I would like to clarify documentation you should use.

Code: Select all
admin web start


starts lightweight development Web server bound to port 8000 on 127.0.0.1 when you deploy your OMERO.server instance. That configuration is not enough for mod_python.

If you deploy OMERO.web on the production web server you should follow the documentation on http://www.openmicroscopy.org.uk/site/support/omero4/server/install_web

Could you please confirm you set up LOGDIR in custom_settings.py?
Code: Select all
LOGDIR = '/home/omero/weblog/'

and apache_user has enough permissions to write there?
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Beta 4.2 & web issue

Postby seb1435 » Fri Jul 16, 2010 5:02 pm

I've used
Code: Select all
admin web start
only to see the improvments on WebUI of 4.2. I am not using Omero Django internal when using mod_python.

atarkowska wrote:If you deploy OMERO.web on the production web server you should follow the documentation on http://www.openmicroscopy.org.uk/site/s ... nstall_web


It is the documentation I've followed. 4.1 & mod_python was working like a charm.

atarkowska wrote:Could you please confirm you set up LOGDIR in custom_settings.py?


> Yes, it is set.

atarkowska wrote:and apache_user has enough permissions to write there?


> Yes too.

I've no idea why it is not working. I've rebooted, reload apache2... Nothing.
seb1435
 
Posts: 8
Joined: Fri Jul 16, 2010 12:17 pm

Re: Beta 4.2 & web issue

Postby atarkowska » Mon Jul 19, 2010 9:35 am

Oki, The problem is related to custom_settings.py

When you upgraded omero you must create settings for webclient by bin/omero web settings as the regular user (not apache).
If there were no problem you should have:
Code: Select all
omero@server ~/OMERO-CURRENT $ ls -al var/lib/
total 8
drwxr-xr-x 2 omero omero  128 Jul 19 10:20 .
drwxr-xr-x 6 omero omero  144 Jul 13 09:45 ..
-rwxrwxrwx 1 omero omero 1354 Jul 19 10:20 custom_settings.py
-rw-r--r-- 1 omero omero  455 Jul 19 10:20 custom_settings.pyc


Then you need to edit custom_settings.py and modify LOGDIR as shown on the documentation.
It is also worth to check if symlink was created.

Code: Select all
omero@server ~/OMERO-CURRENT $ ls -al lib/python/omeroweb/media
total 1
drwxr-xr-x  3 omero omero 104 Jul 19 10:20 .
drwxr-xr-x 12 omero omero 592 Jul 16 10:33 ..
drwxr-xr-x  6 omero omero 152 Jul 12 16:24 omeroweb
lrwxrwxrwx  1 omero omero  82 Jul 19 10:20 webgateway -> /home/jboss/OMERO.server-Beta-4.2.0-r7533-b14/lib/python/omeroweb/webgateway/media


Could you please double check if directories listed above looks the same?

If no, please clean 'OMERO/var/lib' and run 'bin/omero web settings' again.
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Beta 4.2 & web issue

Postby seb1435 » Mon Jul 19, 2010 12:08 pm

Hi !

I had done it already but I've done it another time:

Code: Select all
omero@omero-test-lenny64:~/omero_dist$ bin/omero admin start
No descriptor given. Using etc/grid/default.xml
Waiting on startup. Use CTRL-C to exit


Code: Select all
omero@omero-test-lenny64:~/omero_dist$ bin/omero web settings
/home/omero/omero_dist/var/lib/custom_settings.py already exist. Do you want to                                                                                                                                                              ovewrite it? (yes/no)yes
Please enter the domain you want to run OMERO.web on (http://www.domain.com:8000                                                                                                                                                             /):localhost
Please enter the Email address you want to send from (omero_admin@example.com):                                                                                                                                                              admin@cparis.fr
Please enter the SMTP server host you want to send from (smtp.example.com): 10.8                                                                                                                                                             .0.235
Optional: please enter the SMTP server port (default 25):
Optional: Please enter the SMTP server username:
Optional: Password:
Optional: TSL? (yes/no): no
Saved to /home/omero/omero_dist/var/lib/custom_settings.py
PYTHONPATH updated.


Code: Select all
omero@omero-test-lenny64:~/omero_dist$ vim var/lib/custom_settings.py
omero@omero-test-lenny64:~/omero_dist$ cat var/lib/custom_settings.py
#!/usr/bin/env python
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #              Django custom settings for OMERO.web project.          # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
#
# Copyright (c) 2009 University of Dundee.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Author: Aleksandra Tarkowska <A(dot)Tarkowska(at)dundee(dot)ac(dot)uk>, 2008.
#
# Version: 1.0

# Notification
# Application allows to notify user about new shares

LOGDIR = '/home/omero/weblog/'
SERVER_LIST = (
    ('localhost', 4064, 'omero'),
)

ADMINS = (
    # ('Name', 'email'),
)

SERVER_EMAIL = 'admin@cparis.fr'
EMAIL_HOST = '10.8.0.235'

APPLICATION_HOST='localhost'


Code: Select all
omero@omero-test-lenny64:~/omero_dist$ ls -al lib/python/omeroweb/media
total 12
drwxr-xr-x  3 omero omero 4096 jui 19 13:37 .
drwxr-xr-x 12 omero omero 4096 jui 19 10:46 ..
drwxr-xr-x  6 omero omero 4096 jui 16 16:48 omeroweb
lrwxrwxrwx  1 omero omero   59 jui 19 13:37 webgateway -> /home/omero/omero_dist/lib/python/omeroweb/webgateway/media
omero@omero-test-lenny64:~/omero_dist$


Then

Code: Select all
omero@omero-test-lenny64:~/omero_dist$ su -c 'chown www-data:www-data var/lib/custom_settings.py'
Mot de passe :
omero@omero-test-lenny64:~/omero_dist$ ls -al var/lib/
total 16
drwxr-xr-x 2 omero    omero    4096 jui 19 13:38 .
drwx------ 6 omero    omero    4096 jui 16 17:11 ..
-rw-r--r-- 1 www-data www-data 1357 jui 19 13:38 custom_settings.py
-rw-r--r-- 1 omero    omero     404 jui 19 13:37 custom_settings.pyc
omero@omero-test-lenny64:~/omero_dist$


Code: Select all
omero@omero-test-lenny64:~$ ls -l
drwxr-xr-x 11 omero    omero         4096 jui 19 13:30 omero-4.2.0
-rw-r--r--  1 omero    root     101383003 déc  2  2009 omero-Beta4.1.1.tar.bz2
-rw-r--r--  1 omero    omero     86515929 jui 14 19:18 omero-Beta4.2.0.tar.bz2
drwxr-xr-x  8 omero    omero         4096 jui 16 17:07 omero_dist
drwxr-xr-x  9 omero    omero         4096 jui  9 15:24 omero_dist_old
drwxr-xr-x  2 www-data www-data      4096 jui 16 18:31 weblog


Code: Select all
omero@omero-test-lenny64:~/omero_dist$ bin/omero admin restart
Waiting on shutdown. Use CTRL-C to exit
.No descriptor given. Using etc/grid/default.xml
Waiting on startup. Use CTRL-C to exit


But still an error. it seems more an import/Django related error no ?

Code: Select all
MOD_PYTHON ERROR

ProcessId:      2543
Interpreter:    'omero-test-lenny64.cparis.fr'

ServerName:     'omero-test-lenny64.cparis.fr'
DocumentRoot:   '/var/www/'

URI:            '/'
Location:       '/'
Directory:      None
Filename:       '/var/www/'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'django.core.handlers.modpython'

Traceback (most recent call last):

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  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_dist/lib/python/django/core/handlers/base.py", line 33, in load_middleware
    for middleware_path in settings.MIDDLEWARE_CLASSES:

  File "/home/omero/omero_dist/lib/python/django/utils/functional.py", line 269, in __getattr__
    self._setup()

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

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

  File "/home/omero/omero_dist/lib/python/django/utils/importlib.py", line 35, in import_module
    __import__(name)

  File "/home/omero/omero_dist/lib/python/omeroweb/settings.py", line 44, in <module>
    sys.exit(1)

SystemExit: 1


My apache2 mod_python :

Code: Select all
    <Location "/">
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE omeroweb.settings
        PythonDebug On
        PythonPath "['/home/omero/omero_dist/lib/python', '/home/omero/omero_dist/var/lib', '/home/omero/omero_dist/lib/python/omeroweb', '/opt/Ice-3.3/python'] + sys.path"
    </Location>


And my /etc/profile:

Code: Select all
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
fi

if [ "$PS1" ]; then
  if [ "$BASH" ]; then
    PS1='\u@\h:\w\$ '
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

export ICE_HOME=/opt/Ice-3.3
export PATH=$PATH:$ICE_HOME/bin
export PYTHONPATH=$ICE_HOME/python:$PYTHONPATH
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$ICE_HOME/lib

export PATH

umask 022
omero-test-lenny64:/home/omero/omero_dist#
seb1435
 
Posts: 8
Joined: Fri Jul 16, 2010 12:17 pm

Next

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest

cron