Thank you Josh and Pual.
I have added all the configs and restarted the server. While trying to login I provided my ldap password but, it give an error complaining about server connection. I tried logging in via my local password same username (I obviously converted my local account to ldap using the ldap setdn command) and the exception is as follow:
- Code: Select all
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omeroweb/decorators.py", line 480, in wrapped
retval = f(request, *args, **kwargs)
File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omeroweb/decorators.py", line 530, in wrapper
context = f(request, *args, **kwargs)
File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omeroweb/webadmin/views.py", line 861, in my_account
prepare_experimenter(conn)
File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omeroweb/webadmin/views.py", line 106, in prepare_experimenter
isLdapUser = experimenter.isLdapUser()
File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omeroweb/webclient/webclient_gateway.py", line 2172, in isLdapUser
self.ldapUser = admin_serv.lookupLdapAuthExperimenter(self.id)
File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omero/gateway/__init__.py", line 4205, in __call__
return self.handle_exception(e, *args, **kwargs)
File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omeroweb/webclient/webclient_gateway.py", line 1992, in handle_exception
e, *args, **kwargs)
File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omero/gateway/__init__.py", line 4202, in __call__
return self.f(*args, **kwargs)
File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omero_api_IAdmin_ice.py", line 346, in lookupLdapAuthExperimenter
return _M_omero.api.IAdmin._op_lookupLdapAuthExperimenter.invoke(self, ((id, ), _ctx))
InternalException: exception ::omero::InternalException
{
serverStackTrace = ome.conditions.InternalException: Wrapped Exception: (org.springframework.ldap.CommunicationException):
localhost:389; nested exception is javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused]
at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:98)
at org.springframework.ldap.core.support.AbstractContextSource.createContext(AbstractContextSource.java:266)
at org.springframework.ldap.core.support.AbstractContextSource.getContext(AbstractContextSource.java:106)
at org.springframework.ldap.core.support.AbstractContextSource.getReadOnlyContext(AbstractContextSource.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
at com.sun.proxy.$Proxy64.getReadOnlyContext(Unknown Source)
at ome.logic.LdapImpl.getBase(LdapImpl.java:797)
at ome.logic.LdapImpl.getPersonContextMapper(LdapImpl.java:747)
at ome.logic.LdapImpl.findDN(LdapImpl.java:161)
at ome.logic.LdapImpl.lookupLdapAuthExperimenter(LdapImpl.java:689)
at ome.logic.AdminImpl.lookupLdapAuthExperimenter(AdminImpl.java:337)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at ome.security.basic.EventHandler.invoke(EventHandler.java:154)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy87.lookupLdapAuthExperimenter(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy87.lookupLdapAuthExperimenter(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:172)
at ome.services.throttling.Callback.run(Callback.java:56)
at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:140)
at ome.services.blitz.impl.AdminI.lookupLdapAuthExperimenter_async(AdminI.java:258)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at omero.cmd.CallContext.invoke(CallContext.java:78)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy88.lookupLdapAuthExperimenter_async(Unknown Source)
at omero.api._IAdminTie.lookupLdapAuthExperimenter_async(_IAdminTie.java:258)
at omero.api._IAdminDisp.___lookupLdapAuthExperimenter(_IAdminDisp.java:578)
at omero.api._IAdminDisp.__dispatch(_IAdminDisp.java:1523)
at IceInternal.Incoming.invoke(Incoming.java:222)
at Ice.ConnectionI.invokeAll(ConnectionI.java:2482)
at Ice.ConnectionI.dispatch(ConnectionI.java:1258)
at Ice.ConnectionI.message(ConnectionI.java:1213)
at IceInternal.ThreadPool.run(ThreadPool.java:321)
at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:693)
at java.lang.Thread.run(Thread.java:745)
serverExceptionClass = ome.conditions.InternalException
message = Wrapped Exception: (org.springframework.ldap.CommunicationException):
localhost:389; nested exception is javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused]
}
<WSGIRequest: GET '/webadmin/myaccount/edit/'>
The OMERO ldap config is as follow, which looks about alright to me except for the omero.ldap.username and omero.ldap.password, is this a user who have special rights to ldap or any user? I might have to ask the IT unit about this.
omero.data.dir=/OMERO
omero.db.name=omero_database
omero.db.pass=********
omero.db.user=********
omero.jvmcfg.percent.blitz=30
omero.jvmcfg.percent.pixeldata=30
omero.ldap.base=ou=KIR,ou=NDORMS,o=Medicine
omero.ldap.config=true
omero.ldap.group_filter=(&(objectClass=group)(mail=omero.flag))
omero.ldap.new_user_group=:attribute:memberOf
omero.ldap.password=******* (not sure which user password - so I provided my own password)
omero.ldap.urls=ldap://ldap1.*****.ox.ac.uk
omero.ldap.user.group_mapping=name=cn
omero.ldap.user.user_mapping=omeName=cn,firstName=givenName,lastName=sn,email=mail
omero.ldap.user_filter=(objectClass=person)
omero.ldap.username=******** (not sure which use so I provided my own ldap user)
omero.web.application_server=wsgi-tcp
Connection refused could be due to ldap.url not being ldaps or the ldap.username/ldap.password not being correct or the IT unit will have to allow my server to do LDAP authentication. First time, so I am a bit confused.