Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #9192 (closed)

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

Bug: conn cleanup in /get_original_file/

Reported by: wmoore Owned by: cxallan
Priority: blocker Milestone: OMERO-4.4
Component: Client Version: n.a.
Keywords: n.a. Cc: web-team@…, jburel, cblackburn
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-07-03 (18)

Description

E.g. open run-script dialog and click on "View Script"

http://localhost:8000/webclient/get_original_file/8/

Is this related to
https://github.com/aleksandra-tarkowska/openmicroscopy/pull/4 ??

Traceback (most recent call last):

  File "/Users/will/Desktop/OMERO/dist/lib/python/django/core/servers/basehttp.py", line 284, in run
    self.finish_response()

  File "/Users/will/Desktop/OMERO/dist/lib/python/django/core/servers/basehttp.py", line 323, in finish_response
    for data in self.result:

  File "/Users/will/Desktop/OMERO/dist/lib/python/django/http/__init__.py", line 614, in next
    chunk = self._iterator.next()

  File "/Users/will/Desktop/OMERO/dist/lib/python/omero/gateway/__init__.py", line 3715, in getFileInChunks
    store.setFileId(self._obj.id.val, self._conn.CONFIG)

  File "/Users/will/Desktop/OMERO/dist/lib/python/omero/gateway/__init__.py", line 3246, in __call__
    return self.handle_exception(e, *args, **kwargs)

  File "/Users/will/Desktop/OMERO/components/tools/OmeroWeb/omeroweb/webclient/webclient_gateway.py", line 1824, in handle_exception
    e, *args, **kwargs)

  File "/Users/will/Desktop/OMERO/dist/lib/python/omero/gateway/__init__.py", line 3243, in __call__
    return self.f(*args, **kwargs)

  File "/Users/will/Desktop/OMERO/dist/lib/python/omero_api_RawFileStore_ice.py", line 101, in setFileId
    return _M_omero.api.RawFileStore._op_setFileId.invoke(self, ((fileId, ), _ctx))

UnknownException: exception ::Ice::UnknownException
{
    unknown = ome.conditions.ApiUsageException: Uuid cannot be null.
	at ome.services.sessions.state.SessionCache.getSessionContext(SessionCache.java:348)
	at ome.security.basic.CurrentDetails.login(CurrentDetails.java:137)
	at ome.services.util.Executor$Impl.execute(Executor.java:398)
	at ome.services.util.Executor$Impl.execute(Executor.java:350)
	at ome.services.blitz.repo.PublicRepositoryI.getFile(PublicRepositoryI.java:1189)
	at ome.services.blitz.repo.PublicRepositoryI.file(PublicRepositoryI.java:702)
	at omero.grid._RepositoryDisp.___file(_RepositoryDisp.java:592)
	at omero.grid._RepositoryDisp.__dispatch(_RepositoryDisp.java:889)
	at IceInternal.Incoming.invoke(Incoming.java:159)
	at Ice.ConnectionI.invokeAll(ConnectionI.java:2357)
	at Ice.ConnectionI.dispatch(ConnectionI.java:1208)
	at Ice.ConnectionI.message(ConnectionI.java:1163)
	at IceInternal.ThreadPool.run(ThreadPool.java:302)
	at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643)
	at java.lang.Thread.run(Thread.java:680)

}


Change History (12)

comment:1 Changed 7 years ago by jburel

  • Sprint changed from 2012-06-19 (17) to 2012-07-03 (18)

Moved from sprint 2012-06-19 (17)

comment:2 Changed 7 years ago by cxallan

  • Remaining Time set to 0.25

comment:3 Changed 7 years ago by cxallan

  • Status changed from new to accepted

comment:4 Changed 7 years ago by cxallan

  • Component changed from Web to Services
  • Owner changed from cxallan to jmoore
  • Priority changed from critical to blocker

Server side issue when attempting to read the contents of a script. Passing off to Josh to look at and raising to blocker. Test cases have been written:

comment:5 Changed 7 years ago by jmoore

First round of minor fixes pushed to sprint18-bugfixes. Most importantly:

commit 9bb8570ec1f82451a4ae43641eb9281f3dc4b884
Author: jmoore <josh@glencoesoftware.com>
Date:   Mon Jun 25 10:02:10 2012

    Replace "omero.session" with SESSIONUUID (See #9192)
    
    At some point, part of the public repo infrastructure
    started using SESSIONUUID, leaving several null values
    for session ids in the call stack.

diff --git a/components/blitz/src/ome/services/blitz/impl/RawFileStoreI.java b/components/blitz/src/ome/services/blitz/impl/RawFileStoreI.java
index 0bf5328..f31ac91 100644
--- a/components/blitz/src/ome/services/blitz/impl/RawFileStoreI.java
+++ b/components/blitz/src/ome/services/blitz/impl/RawFileStoreI.java
@@ -145,7 +145,7 @@ _RawFileStoreOperations, ServiceFactoryAware, TieAware {
         // If this isn't available, it won't be possible for this instance
         // to be registered with
         Map<String, String> adjustedCtx = new HashMap<String, String>(current.ctx);
-        adjustedCtx.put("omero.session", current.id.category);
+        adjustedCtx.put(omero.constants.SESSIONUUID.value, current.id.category);
 
...

comment:6 Changed 7 years ago by jmoore

  • Cc jburel cblackburn added
  • Component changed from Services to Client
  • Remaining Time changed from 0.25 to 0.5

This leaves a larger issue that will require some discussion, namely that the contents of the implicit context are not being passed to the server when a call context dictionary is used. In most cases (currently) this is fine. But in some, as here with get_original_file, it's necessary to have the client uuid in order to proper resolution server-side. We will need to amend our creation of call contexts in order to include the contents of client.getImplicitContext().getContext().

comment:7 Changed 7 years ago by jmoore

In discussion with Jean-Marie, there's no issue on the insight side since call contexts are not used. For all API users, this may mean primarily a documentation issue of "use the implicit context for the call context default".

comment:8 Changed 7 years ago by jmoore

  • Owner changed from jmoore to cxallan

Chris and Carlos are currently working on this.

comment:9 Changed 7 years ago by cxallan

  • Remaining Time changed from 0.5 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

comment:10 Changed 7 years ago by Chris Allan <callan@…>

(In [d3405d76a887324d5d9633dd8307269608dd96e9/ome.git] on branch develop) Test case for issues reading script data. (See #9192)

comment:11 Changed 7 years ago by jmoore <josh@…>

(In [9bb8570ec1f82451a4ae43641eb9281f3dc4b884/ome.git] on branch develop) Replace "omero.session" with SESSIONUUID (See #9192)

At some point, part of the public repo infrastructure
started using SESSIONUUID, leaving several null values
for session ids in the call stack.

comment:12 Changed 7 years ago by jmoore <josh@…>

(In [4320f2591d4d9659b38d3458f6300743fba24dd2/ome.git] on branch develop) Modify permissions test to pass (See #9192)

Once the SESSIONUUID issue was cleaned up for script
repo files, another issue appeared caused by the passing
of a call context. Namely, some of the grid infrastructure
relies on the presence of the client UUID in the context
in order to lookup servants. When an explicit call context
is passed, this value is lost. Clients can copy the current
implicit context in order to maintain this value, but we
are currently not doing that.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.153886 sec.)

We're Hiring!