I'm trying to get the function conn.changeActiveGroup to work and I keep coming up with the following error. It works sometimes in one group that the user has created but not the others, despite the settings for the groups and the users being the exact same. I found the bug report on http://trac.openmicroscopy.org/ome/ticket/2339 that corresponds to it but I don't understand how I can work around it. Do I need to shut down the current session, and how do i do that (function/library)? I get it also when I try to change the session using the omero CLI using the same session as given in conn._getSessionId()
My code looks like (in webtest/views.py)
conn = kwargs['conn']
theAdminofGroup=conn._getSessionId()
ExImvar=conn.changeActiveGroup(154)
#ExImvar=dbconnect.mvImgtoDsPublicUsingexim(imgid,theAdminofGroup)
return HttpResponse(ExImvar)
The error is :-
- Code: Select all
Traceback (most recent call last):
File "/opt/OmeroServer/lib/python/django/core/handlers/base.py", line 92, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/opt/OmeroServer/lib/python/omeroweb/webclient/views.py", line 165, in wrapped
return f(request, *args, **kwargs)
File "/opt/OmeroServer/lib/python/omeroweb/webtest/views.py", line 212, in publishimage
ExImvar=conn.setGroupNameForSession('Amandas Test Group_public')
File "/opt/OmeroServer/lib/python/omero/gateway/__init__.py", line 1708, in setGroupNameForSession
return self.setGroupForSession(g.getId().val)
File "/opt/OmeroServer/lib/python/omero/gateway/__init__.py", line 1726, in setGroupForSession
self.c.sf.setSecurityContext(omero.model.ExperimenterGroupI(groupid, False))
File "/opt/OmeroServer/lib/python/omero_API_ice.py", line 198, in setSecurityContext
return _M_omero.api.ServiceFactory._op_setSecurityContext.invoke(self, ((obj, ), _ctx))
SecurityViolation: exception ::omero::SecurityViolation
{
serverStackTrace = ome.conditions.SecurityViolation: SecurityContext change cancelled:
Client e89d7076-5862-44c7-bfce-213293e4a4bd has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
Client 9a243304-9877-4261-bde0-5fe15fecb658 has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
Client 41dc15a8-6c08-4770-8c0f-a0728e2f6ecd has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
Client e1d324d5-e185-4f43-a0c8-38624ff19f41 has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
Client 054ee2c1-80fc-4f1c-afd4-bc7da516ab82 has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
Client fc6d99e3-ccf8-4be2-8fc6-098f69f3aea0 has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
at ome.services.sessions.events.ChangeSecurityContextEvent.throwIfCancelled(ChangeSecurityContextEvent.java:61)
at ome.services.sessions.SessionManagerImpl.setSecurityContext(SessionManagerImpl.java:1114)
at ome.services.blitz.impl.ServiceFactoryI.setSecurityContext(ServiceFactoryI.java:318)
at omero.api._ServiceFactoryDisp.___setSecurityContext(_ServiceFactoryDisp.java:393)
at omero.api._ServiceFactoryDisp.__dispatch(_ServiceFactoryDisp.java:1379)
at IceInternal.Incoming.invoke(Incoming.java:159)
at Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
at Ice.ConnectionI.message(ConnectionI.java:972)
at IceInternal.ThreadPool.run(ThreadPool.java:577)
at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)
serverExceptionClass = ome.conditions.SecurityViolation
message = SecurityContext change cancelled:
Client e89d7076-5862-44c7-bfce-213293e4a4bd has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
Client 9a243304-9877-4261-bde0-5fe15fecb658 has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
Client 41dc15a8-6c08-4770-8c0f-a0728e2f6ecd has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
Client e1d324d5-e185-4f43-a0c8-38624ff19f41 has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
Client 054ee2c1-80fc-4f1c-afd4-bc7da516ab82 has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
Client fc6d99e3-ccf8-4be2-8fc6-098f69f3aea0 has active stateful services:
84:ea:dd:c2:3981bbbb:133fcef8140:-7a2comero.api.RenderingEngine
}
<WSGIRequest
GET:<QueryDict: {}>,
POST:<QueryDict: {u'userId': [u'True'], u'imageIds': [u'3431'], u'isOwned': [u'True'], u'publish': [u'Publish']}>,
COOKIES:{'PHPSESSID': 'u4h1spls3sh63cooglie4p0re3',
'_#srchist': '',
'_#uid': '1310509963109.1002834041.2414.468737780',
'__utma': '43582067.747350716.1310509960.1323143287.1323150442.53',
'__utmc': '43582067',
'__utmz': '43582067.1322784305.49.37.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=eskitis',
'dActual': 'desktop',
'dVice': 'desktop',
'device': 'theme-standard',
'sessionid': 'bcdfed70488953c94b12ddbffaab9c8a',
'setSSO': '',
'text-size': '2'},
META:{'CONTENT_LENGTH': '54',
'CONTENT_TYPE': 'application/x-www-form-urlencoded',
'DOCUMENT_ROOT': '/var/www/html',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',
'HTTP_CACHE_CONTROL': 'max-age=0',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/11.04 Chromium/14.0.835.202 Chrome/14.0.835.202 Safari/535.1',
'PATH': '/sbin:/usr/sbin:/bin:/usr/bin',
'PATH_INFO': u'/webtest/publishimage/',
'PATH_TRANSLATED': '/opt/OmeroServer/var/omero.fcgi/webtest/publishimage/',
'QUERY_STRING': '',
'REQUEST_METHOD': 'POST',
'REQUEST_URI': '/webtest/publishimage/',