We're Hiring!

Ldap authentication

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.

Re: Ldap authentication

Postby joshBC » Fri Feb 19, 2010 10:06 am

I got it! Ldap authentication works!
Thanks for your support. My base dn seemed to be wrong and i blanked out the field for the ldap groups.
But thanks again for support.

unfortunately during the testing phase another error occured.
at first we used django but now we want to switch to apache. i used the documentation but i'm getting an MOD_PYTHON ERROR at the end.

system:
opensuse 11.1 (64Bit)
apache 2.2.10-2.8.1
mod_python 3.3.1-147.35
python 2.6

the edited entries in the settings.py look like this:
DATABASE_NAME = '/srv/omero/webdb/db.sqlite3'
LOGDIR = '/srv/omero/weblog/'

those two directories (/srv/omero/webdb & /srv/omero/weblog) and subdirectories have the following permissions: -rw-rw-rw-
user: wwwrun
group: www
(the omero directory (/srv/omero/omero_dist/ has user:omero group:users)

the mod_python configuration is located in /etc/apache2/conf.d/ and looks like this:
<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>


when configurating the web settings my console says:
omero@sandstorm:/srv/omero/omero_dist> bin/omero web settings
/srv/omero/omero_dist/lib/python/omeroweb/custom_settings.py already exist. Do you want to ovewrite it? (yes/no)no

/srv/omero/omero_dist/lib/python/omeroweb/initial_data.json already exist. Do you want to ovewrite it? (yes/no)no

Database synchronization...
Installing json fixture 'initial_data' from absolute path.
Installed 2 object(s) from 1 fixture(s)
OMERO.web was configured successful. Please start the application.


The MOD_PYTHON ERROR:
ProcessId: 1709
Interpreter: 'sandstorm.charite.de'

ServerName: 'sandstorm.charite.de'
DocumentRoot: '/srv/www/htdocs'

URI: '/error/HTTP_SERVICE_UNAVAILABLE.html.var'
Location: '/'
Directory: None
Filename: '/usr/share/apache2/error/HTTP_SERVICE_UNAVAILABLE.html.var'
PathInfo: ''

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

Traceback (most recent call last):

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

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

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

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

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

File "/srv/omero/omero_dist/lib/python/django/core/handlers/base.py", line 31, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:

File "/srv/omero/omero_dist/lib/python/django/conf/__init__.py", line 28, in __getattr__
self._import_settings()

File "/srv/omero/omero_dist/lib/python/django/conf/__init__.py", line 59, in _import_settings
self._target = Settings(settings_module)

File "/srv/omero/omero_dist/lib/python/django/conf/__init__.py", line 92, in __init__
mod = __import__(self.SETTINGS_MODULE, {}, {}, [''])

File "/srv/omero/omero_dist/lib/python/omeroweb/settings.py", line 181, in <module>
filemode='a')

File "/usr/lib64/python2.6/logging/__init__.py", line 1358, in basicConfig
hdlr = FileHandler(filename, mode)

File "/usr/lib64/python2.6/logging/__init__.py", line 790, in __init__
stream = self._open()

File "/usr/lib64/python2.6/logging/__init__.py", line 810, in _open
stream = open(self.baseFilename, self.mode)

IOError: [Errno 13] Permission denied: '/srv/omero/weblog/OMEROweb.log'
joshBC
 
Posts: 16
Joined: Tue Feb 16, 2010 3:46 pm

Re: Ldap authentication

Postby cxallan » Fri Feb 19, 2010 10:34 am

You probably have an old OMEROweb.log in the /srv/omero/weblog directory with the wrong permissions. It should be safe to delete it.
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Ldap authentication

Postby joshBC » Fri Feb 19, 2010 10:48 am

Okay i've deleted all logfiles. Restarted Apache. Configured the websettings again (same results as posted above) and restarted omero.
But the error is still the same.
joshBC
 
Posts: 16
Joined: Tue Feb 16, 2010 3:46 pm

Re: Ldap authentication

Postby cxallan » Fri Feb 19, 2010 10:58 am

When you configure the web settings it writes to the log file as whatever user executes the command. Just delete the log file and hit a WebAdmin or WebClient page in your browser. If that doesn't work, try an Apache restart. If you're still in trouble, I'll need the output of ls -al /srv/omero/weblog.
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Ldap authentication

Postby joshBC » Fri Feb 19, 2010 11:35 am

Okay I've done what you said and the old error is gone BUT unfortunately a new one occurs:
When hitting webadmin or webclient I get an 404 Error from omero
I've attached the logfiles from /srv/weblog/
Attachments
logfiles.tar.gz
(265 Bytes) Downloaded 226 times
joshBC
 
Posts: 16
Joined: Tue Feb 16, 2010 3:46 pm

Re: Ldap authentication

Postby cxallan » Fri Feb 19, 2010 11:44 am

I'll need the output of the following:

Code: Select all
ls -al '/srv/omero/webdb/'
ls -al '/srv/omero/weblog/'
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Ldap authentication

Postby joshBC » Fri Feb 19, 2010 12:04 pm

sandstorm:/srv/omero/omero_dist # ls -al '/srv/omero/webdb/'
insgesamt 44
drwxrwxrwx 2 wwwrun www 4096 19. Feb 12:28 .
drwxr-xr-x 5 omero users 4096 19. Feb 11:39 ..
-rw-rw-rw- 1 wwwrun www 33792 19. Feb 12:28 db.sqlite3

sandstorm:/srv/omero/omero_dist # ls -al '/srv/omero/weblog/'
insgesamt 16
drwxrwxrwx 2 wwwrun www 4096 19. Feb 12:29 .
drwxr-xr-x 5 omero users 4096 19. Feb 11:39 ..
-rw-r--r-- 1 wwwrun www 879 19. Feb 12:29 OMEROweb.log
-rw-r--r-- 1 wwwrun www 1869 19. Feb 12:29 OMEROweb.log.2010-02-19
joshBC
 
Posts: 16
Joined: Tue Feb 16, 2010 3:46 pm

Re: Ldap authentication

Postby cxallan » Fri Feb 19, 2010 12:46 pm

Okay, cool. What error are you getting then? The logs have no information I'm afraid.
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Ldap authentication

Postby joshBC » Fri Feb 19, 2010 12:48 pm

I get an 404 Error from omero.
joshBC
 
Posts: 16
Joined: Tue Feb 16, 2010 3:46 pm

Re: Ldap authentication

Postby cxallan » Fri Feb 19, 2010 12:54 pm

Can you be more specific? Just a 404? A screenshot perhaps?
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

PreviousNext

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest