IDR / idr-metadata

Curated metadata for all studies published in the Image Data Resource
https://idr.openmicroscopy.org
14 stars 24 forks source link

Replace existing Fileset with NGFF Fileset #652

Open will-moore opened 1 year ago

will-moore commented 1 year ago

To avoid re-importing Images when updating data to NGFF, we want to create a new Fileset for the NGFF data, and replace old Filesets.

Testing workflow:

Imported png: https://merge-ci.openmicroscopy.org/web/webclient/?show=image-257915

Converted same png to NGFF:

$ bioformats2raw OME_screenshot.png OME_screenshot.zarr --tile_width 256

To be able to tell an NGFF image, removed chunk of alpha channel:

$ rm OME_screenshot.zarr/0/0/0/3/0/0/0

Edited import.py to upload ALL files in directory:

def get_files_for_fileset(fs_path):
    filepaths = []
    for path, subdirs, files in os.walk(fs_path):
        for name in files:
            print(os.path.join(path, name))
            filepaths.append(os.path.join(path, name))
    return filepaths

Import the Zarr to create a Fileset AND import the Fileset

$ python import.py OME_screenshot.zarr --dataset 67919

Re-import this... NGFF_missing_chunk - as expected

https://merge-ci.openmicroscopy.org/web/webclient/?show=image-257917

Fileset ID: 138110

We want to update the Image:257915 (png) above to use Fileset:138110

$ omero obj update Image:257915 fileset=Fileset:138110

The 'png' image now lists NGFF files in it's Fileset, but looks the same.

Now try deleting the png Fileset...

$ omero delete Fileset:138108 --report
omero.cmd.Delete2 Fileset:138108 ok
Steps: 6
Elapsed time: 0.674 secs.
Flags: []
Deleted objects
  OriginalFile:1767759,1767760
  Fileset:138108
  FilesetEntry:1058458
  FilesetJobLink:429236-429240
  IndexingJob:498962
  JobOriginalFileLink:216552
  MetadataImportJob:498959
  PixelDataJob:498960
  ThumbnailGenerationJob:498961
  UploadJob:498958

Now, trying to view the 'png' image gives:

File "/home/omero/workspace/OMERO-web/.venv3/lib64/python3.6/site-packages/omero_api_RenderingEngine_ice.py", line 1192, in load
    return _M_omero.api.RenderingEngine._op_load.invoke(self, ((), _ctx))
...
    serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /home/omero/omero-server-data/ManagedRepository/user-3_454/Blitz-0-Ice.ThreadPool.Server-10/2023-02/23/09-01-23.654/OME_screenshot.png
}

To cut a long story short...

@jburel found that you need to update Pixels to point at the new NGFF data:

psql -U postgres -d OMERO-server -c "UPDATE pixels SET name = '.zattrs', path = 'user-3_454/Blitz-0-Ice.ThreadPool.Server-5/2023-02/23/09-26-58.983/OME_screenshot.zarr' where id = 256813" UPDATE 1



This allows you to view the original `png` using the underlying NGFF Fileset!
jburel commented 1 year ago

Strategy in place in omero-blitz/src/main/java/omero/cmd/graphs/DuplicateI.java could be re-used and we can introduce a "swapFileSet"

will-moore commented 1 year ago

Created a script at https://gist.github.com/will-moore/56f03cd126dcac9981bceeb8e7cdb393

This uploads a directory of files (all files uploaded) to create a new Fileset. Then it finds the images linked to the replacefileset specified and re-links those Images to the new Fileset. The old Fileset is deleted.

The only step that is needed after this is a psql command that is printed by the script.

$ python replace_fileset.py OME_screenshot.zarr/ --replacefileset=138127
Importing: OME_screenshot.zarr/
Uploading: OME_screenshot.zarr/.zattrs
Uploading: OME_screenshot.zarr/.zgroup
Uploading: OME_screenshot.zarr/0/.zattrs
Uploading: OME_screenshot.zarr/0/.zgroup
Uploading: OME_screenshot.zarr/0/0/.zarray
Uploading: OME_screenshot.zarr/0/0/0/0/0/0/1
Uploading: OME_screenshot.zarr/0/0/0/1/0/0/0
Uploading: OME_screenshot.zarr/0/0/0/1/0/0/1
Uploading: OME_screenshot.zarr/0/0/0/3/0/0/1
Uploading: OME_screenshot.zarr/0/0/0/2/0/0/0
Uploading: OME_screenshot.zarr/0/0/0/2/0/0/1
Uploading: OME_screenshot.zarr/0/1/.zarray
Uploading: OME_screenshot.zarr/0/1/0/1/0/0/0
Uploading: OME_screenshot.zarr/0/1/0/3/0/0/0
Uploading: OME_screenshot.zarr/0/1/0/2/0/0/0
Uploading: OME_screenshot.zarr/OME/METADATA.ome.xml
orig_file 1768428
orig_file user-3_454/Blitz-0-Ice.ThreadPool.Server-53/2023-02/23/17-52-58.270/OME_screenshot.zarr/
orig_file .zattrs
Updating image OME_screenshot.png 257920

psql -U postgres -d OMERO-server -c "UPDATE pixels SET  name = '.zattrs',  path = 'user-3_454/Blitz-0-Ice.ThreadPool.Server-53/2023-02/23/17-52-58.270/OME_screenshot.zarr/' where id = 256818

Deleting Fileset 138127
jburel commented 1 year ago

In order to avoid the direct psql command We will need to do something like https://github.com/ome/omero-blitz/blob/master/src/main/java/omero/cmd/graphs/DuplicateI.java#L1019 via a new command e.g. swapFileset

will-moore commented 1 year ago

The script above uses regular "upload" to create a Fileset. But for IDR we will really want an "in-place" Fileset creation. However, I don't know how to adapt the script to achieve that?? cc @joshmoore

will-moore commented 1 year ago

Discussed today: https://github.com/ome/omero-upload/blob/master/src/omero_upload/library.py#L36 looks like a good place to start looking at in-place import

Test on training server 3 or 4

will-moore commented 1 year ago

The library above creates file with conn.createOriginalFileFromFileObj() and creates a file at managed-repo/Files/ID which is then replaced with a sym-link to the actual in-place file. Is that what happens with a standard in-place import @sbesson? It seems not, because in general on IDR, when you check the paths to files in a Fileset, these are not of that form with Files but are like demo_2/2015-11/23/16-25-15.579/Meas_03(2012-07-31_13-12-10)/005010001.flex

Perhaps I can create the symlinks in the ManagedRepository, similar to https://github.com/IDR/idr0125-way-cellpainting/blob/main/scripts/symlinks.bash and then create an OriginalFile object, simply passing it the path...?

will-moore commented 1 year ago

To test creation of a Fileset, can try to create symlinks as above, then create the Fileset from there.

First, try to import a test image into a test server. Use idr0125-pilot, since I have been using this as a test server and creating symlinks there etc...

Try to connect locally...

$ ssh pilot-idr0125 -L 40064:localhost:4064

then

$ omero import -d 15301 OME_screenshot.png 
# login to localhost:40064
Fileset:5286801

$ omero import -d 15301 --depth=20 OME_screenshot.zarr/
Fileset:5286802
will-moore commented 1 year ago

I assume that if a File doesn't exist for an Original File based on it's ID: e.g. 4879195 is in: $ ls /data/OMERO/Files/Dir-004/Dir-879 then OMERO uses the path and name to find the file directly?

E.g. from import above: Original File: 48780012, path: demo_2/Blitz-0-Ice.ThreadPool.Server-25/2023-03/06/15-59-36.479/OME_screenshot.zarr/ name: .zattrs.

will-moore commented 1 year ago

Test on idr0054 Tonsil 2 image: https://idr.openmicroscopy.org/webclient/?show=image-5025552

NGFF data is at...

$ ssh pilot-idrtesting
$ ls /ngff/idr0054
Tonsil 2.ome.zarr

So we want to try an in-place import to the server there. Unfortunately that server doesn't have the original pattern file imported image, but we can use the NGFF image instead...

e.g. use this to access via web...

ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' pilot-idrtesting-omeroreadwrite -L 1080:localhost:80

NGFF Image has been imported previously (regular ZarrReader import) at:

demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/Tonsil 2.ome.zarr/

So we want to create symlinks:

$ ssh pilot-idrtesting
sudo -u omero-server -s
cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557
mkdir ngff
cd ngff
ln -s "/ngff/idr0054/Tonsil 2.ome.zarr" "Tonsil 2.ome.zarr"
will-moore commented 1 year ago

Using script at https://gist.github.com/will-moore/671a9f971f49661d097aa1655476878e

$ sudo -u omero-server -s
$ cd
$ pwd
/opt/omero/server
$ vi inplace_fileset.py
# paste in script above and save...

$ source /opt/omero/server/venv3/bin/activate
$ omero login demo@localhost
$ python inplace_fileset.py 9353 9353
...
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr .zattrs 33 1a45bdb742869f84fd71ae0fd67f79f1b26923fe
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0 .zattrs 9024 d1081971a9fa36eab85dfc677c8d41fdbcd71ef8
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0 .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/0 .zarray 328 a902050bf764318cdb65511209294d576723e7d2
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/1 .zarray 328 5acab8b416b346283b6fe770c205aa40f92d784e
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/2 .zarray 324 0be6b77260346499af5633a763571753660ee9ab
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/3 .zarray 324 daad3d12d69b2c5e1daa6499a2ac9d15027444fc
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/4 .zarray 324 5d9f748f84e3e21f8e77d8b47e8742cacde376db
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME .zattrs 24 156e48269827cb4611d5a3899d862c60c8f483f4
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME METADATA.ome.xml 2391 8f01227852e065e2bd8ac6d82be8644654089898
Created new_fileset 9363
Updating image METADATA.ome.xml 46035
psql -U postgres -d OMERO-server -c "UPDATE pixels SET  name = '.zattrs',  path = '/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr' where id = 46035

Delete Fileset:

$ omero delete Fileset:9353 --report
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: demo
omero.cmd.Delete2 Fileset:9353 ok
Steps: 6
Elapsed time: 3.818 secs.
Flags: []
Deleted objects
  CommentAnnotation:33553
  FilesetAnnotationLink:9303
  OriginalFile:1067474-1067918
  Fileset:9353
  FilesetEntry:975569-976012
  FilesetJobLink:45909-45913
  IndexingJob:45913
  JobOriginalFileLink:9353
  MetadataImportJob:45910
  PixelDataJob:45911
  ThumbnailGenerationJob:45912
  UploadJob:45909
will-moore commented 1 year ago

Use omero config get --show-password to get psql credentials etc.. then

PGPASSWORD=password psql -U omero -d idr -h 192.168.10.117

idr=> UPDATE pixels SET  name = '.zattrs',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr' where id = 46035;
UPDATE 1
will-moore commented 1 year ago

But we get this error when trying to view the image:

ResourceError ``` Traceback (most recent call last): File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 538, in wrapped retval = f(request, *args, **kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 597, in wrapper context = f(request, *args, **kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/webclient/views.py", line 1754, in load_metadata_preview rdefId = manager.image.getRenderingDefId() File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 7881, in wrapped if not self._prepareRenderingEngine() \ File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 8157, in _prepareRenderingEngine self._re = self._prepareRE(rdid=rdid) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 8136, in _prepareRE re.load(ctx) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4796, in __call__ return self.handle_exception(e, *args, **kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/webclient/webclient_gateway.py", line 2222, in handle_exception super(OmeroWebSafeCallWrapper, self).handle_exception(e, *args, **kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4793, in __call__ return self.f(*args, **kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero_api_RenderingEngine_ice.py", line 1192, in load return _M_omero.api.RenderingEngine._op_load.invoke(self, ((), _ctx)) omero.ResourceError: exception ::omero::ResourceError { serverStackTrace = ome.conditions.ResourceError: Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/.zattrs at ome.io.nio.PixelsService.createBfPixelBuffer(PixelsService.java:907) at ome.io.nio.PixelsService._getPixelBuffer(PixelsService.java:653) at ome.io.nio.PixelsService.getPixelBuffer(PixelsService.java:571) at ome.services.RenderingBean$12.doWork(RenderingBean.java:2205) at jdk.internal.reflect.GeneratedMethodAccessor302.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.security.basic.EventHandler.invoke(EventHandler.java:154) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy100.doWork(Unknown Source) at ome.services.util.Executor$Impl.execute(Executor.java:447) at ome.services.util.Executor$Impl.execute(Executor.java:392) at ome.services.RenderingBean.getPixelBuffer(RenderingBean.java:2202) at ome.services.RenderingBean.load(RenderingBean.java:417) at jdk.internal.reflect.GeneratedMethodAccessor1950.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy122.load(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor1950.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy122.load(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor1978.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) 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.RenderingEngineI.load_async(RenderingEngineI.java:316) at jdk.internal.reflect.GeneratedMethodAccessor1977.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at omero.cmd.CallContext.invoke(CallContext.java:85) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy124.load_async(Unknown Source) at omero.api._RenderingEngineTie.load_async(_RenderingEngineTie.java:248) at omero.api._RenderingEngineDisp.___load(_RenderingEngineDisp.java:1223) at omero.api._RenderingEngineDisp.__dispatch(_RenderingEngineDisp.java:2405) at IceInternal.Incoming.invoke(Incoming.java:221) at Ice.ConnectionI.invokeAll(ConnectionI.java:2536) at Ice.ConnectionI.dispatch(ConnectionI.java:1145) at Ice.ConnectionI.message(ConnectionI.java:1056) at IceInternal.ThreadPool.run(ThreadPool.java:395) at IceInternal.ThreadPool.access$300(ThreadPool.java:12) at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832) at java.base/java.lang.Thread.run(Thread.java:829) serverExceptionClass = ome.conditions.ResourceError message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/.zattrs } ```
will-moore commented 1 year ago

cc @joshmoore @jburel That's the current state of where I'm at with creating a Fileset in-place... I don't know why I'm getting that exception. The path in the exception certainly points at correct files (via the symlink):

$ ls -alh "/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/"
total 8.0K
drwxrwxr-x. 4 dlindner dlindner 56 Feb 17 13:27 .
drwxrwxr-x. 3 dlindner dlindner 31 Feb 17 13:27 ..
drwxrwxr-x. 7 dlindner dlindner 81 Feb 17 13:27 0
drwxrwxr-x. 2 dlindner dlindner 60 Feb 17 13:27 OME
-rw-rw-r--. 1 dlindner dlindner 33 Feb 17 13:27 .zattrs
-rw-rw-r--. 1 dlindner dlindner 23 Feb 17 13:27 .zgroup
joshmoore commented 1 year ago

I assume the previous value wasn't escaped in anyway?

joshmoore commented 1 year ago

The server master.err log shows:

java.io.IOException: '.zarray' expected but is not readable or missing in store.
        at com.bc.zarr.ZarrArray.open(ZarrArray.java:106)
will-moore commented 1 year ago

"escaped in anyway" - you mean the file path escaping of white-space? Is that needed when I use quotes in:

UPDATE pixels SET  name = '.zattrs',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr' where id = 46035;

Looking for the ".zarray" files, they seem to be there...

$ cd "/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/"

$ find ./ -name ".zarray"
./0/0/.zarray
./0/1/.zarray
./0/2/.zarray
./0/3/.zarray
./0/4/.zarray

Ah, I wonder if the ".zattrs" that I'm pointing to in this case is the wrong file? I pointed at the image.zarr/.zattrs in our previous tests on this, but that was the image itself, not a bioformats2raw.layout, so maybe I should point to the /Tonsil 2.ome.zarr/OME/METADATA.xml?...

UPDATE pixels SET  name = 'METADATA.ome.xml',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME' where id = 46035;
UPDATE 1

Hmm - now I just get...

    serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME/METADATA.ome.xml
}
will-moore commented 1 year ago

Full stack track is:

ome.conditions.ResourceError ``` 2023-03-13 10:52:34,794 ERROR [ ome.io.nio.PixelsService] (l.Server-0) Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME/METADATA.ome.xml java.lang.RuntimeException: java.lang.IllegalArgumentException: Invalid index: -1 at ome.io.bioformats.BfPixelBuffer.reader(BfPixelBuffer.java:79) at ome.io.bioformats.BfPixelBuffer.setSeries(BfPixelBuffer.java:124) at ome.io.nio.PixelsService.createBfPixelBuffer(PixelsService.java:898) at ome.io.nio.PixelsService._getPixelBuffer(PixelsService.java:653) at ome.io.nio.PixelsService.getPixelBuffer(PixelsService.java:571) at ome.services.RenderingBean$12.doWork(RenderingBean.java:2205) at jdk.internal.reflect.GeneratedMethodAccessor302.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.security.basic.EventHandler.invoke(EventHandler.java:154) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy100.doWork(Unknown Source) at ome.services.util.Executor$Impl.execute(Executor.java:447) at ome.services.util.Executor$Impl.execute(Executor.java:392) at ome.services.RenderingBean.getPixelBuffer(RenderingBean.java:2202) at ome.services.RenderingBean.load(RenderingBean.java:417) at jdk.internal.reflect.GeneratedMethodAccessor1950.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy122.load(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor1950.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy122.load(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor1978.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) 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.RenderingEngineI.load_async(RenderingEngineI.java:316) at jdk.internal.reflect.GeneratedMethodAccessor1977.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at omero.cmd.CallContext.invoke(CallContext.java:85) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy124.load_async(Unknown Source) at omero.api._RenderingEngineTie.load_async(_RenderingEngineTie.java:248) at omero.api._RenderingEngineDisp.___load(_RenderingEngineDisp.java:1223) at omero.api._RenderingEngineDisp.__dispatch(_RenderingEngineDisp.java:2405) at IceInternal.Incoming.invoke(Incoming.java:221) at Ice.ConnectionI.invokeAll(ConnectionI.java:2536) at Ice.ConnectionI.dispatch(ConnectionI.java:1145) at Ice.ConnectionI.message(ConnectionI.java:1056) at IceInternal.ThreadPool.run(ThreadPool.java:395) at IceInternal.ThreadPool.access$300(ThreadPool.java:12) at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.IllegalArgumentException: Invalid index: -1 at loci.formats.FormatReader.coreIndexToSeries(FormatReader.java:1328) at loci.formats.FormatReader.getSeriesCount(FormatReader.java:963) at loci.formats.MetadataTools.populatePixels(MetadataTools.java:137) at loci.formats.MetadataTools.populatePixels(MetadataTools.java:116) at loci.formats.in.ZarrReader.initFile(ZarrReader.java:282) at loci.formats.FormatReader.setId(FormatReader.java:1443) at loci.formats.ImageReader.setId(ImageReader.java:849) at ome.io.nio.PixelsService$3.setId(PixelsService.java:869) at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650) at loci.formats.ChannelFiller.setId(ChannelFiller.java:234) at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650) at loci.formats.ChannelSeparator.setId(ChannelSeparator.java:293) at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650) at loci.formats.Memoizer.setId(Memoizer.java:690) at ome.io.bioformats.BfPixelsWrapper.(BfPixelsWrapper.java:52) at ome.io.bioformats.BfPixelBuffer.reader(BfPixelBuffer.java:73) ... 82 common frames omitted ```

But I don't see any new errors added to the master.err log.

The last error on that log is the one Josh reported above:

master.err ``` java.io.IOException: '.zarray' expected but is not readable or missing in store. at com.bc.zarr.ZarrArray.open(ZarrArray.java:106) at com.bc.zarr.ZarrArray.open(ZarrArray.java:99) at com.bc.zarr.ZarrArray.open(ZarrArray.java:95) at com.bc.zarr.ZarrArray.open(ZarrArray.java:91) at loci.formats.services.JZarrServiceImpl.open(JZarrServiceImpl.java:89) at loci.formats.in.ZarrReader.openZarr(ZarrReader.java:434) at loci.formats.in.ZarrReader.setSeries(ZarrReader.java:414) at loci.formats.ImageReader.setSeries(ImageReader.java:491) at loci.formats.ReaderWrapper.setSeries(ReaderWrapper.java:375) at loci.formats.ReaderWrapper.setSeries(ReaderWrapper.java:375) at loci.formats.ReaderWrapper.setSeries(ReaderWrapper.java:375) at ome.io.bioformats.BfPixelBuffer.setSeries(BfPixelBuffer.java:125) at ome.io.nio.PixelsService.createBfPixelBuffer(PixelsService.java:898) at ome.io.nio.PixelsService._getPixelBuffer(PixelsService.java:653) at ome.io.nio.PixelsService.getPixelBuffer(PixelsService.java:571) at ome.services.RenderingBean$12.doWork(RenderingBean.java:2205) at jdk.internal.reflect.GeneratedMethodAccessor302.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.security.basic.EventHandler.invoke(EventHandler.java:154) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy100.doWork(Unknown Source) at ome.services.util.Executor$Impl.execute(Executor.java:447) at ome.services.util.Executor$Impl.execute(Executor.java:392) at ome.services.RenderingBean.getPixelBuffer(RenderingBean.java:2202) at ome.services.RenderingBean.load(RenderingBean.java:417) at jdk.internal.reflect.GeneratedMethodAccessor1950.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy122.load(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor1950.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy122.load(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor1978.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) 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.RenderingEngineI.load_async(RenderingEngineI.java:316) at jdk.internal.reflect.GeneratedMethodAccessor1977.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at omero.cmd.CallContext.invoke(CallContext.java:85) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy124.load_async(Unknown Source) at omero.api._RenderingEngineTie.load_async(_RenderingEngineTie.java:248) at omero.api._RenderingEngineDisp.___load(_RenderingEngineDisp.java:1223) at omero.api._RenderingEngineDisp.__dispatch(_RenderingEngineDisp.java:2405) at IceInternal.Incoming.invoke(Incoming.java:221) at Ice.ConnectionI.invokeAll(ConnectionI.java:2536) at Ice.ConnectionI.dispatch(ConnectionI.java:1145) at Ice.ConnectionI.message(ConnectionI.java:1056) at IceInternal.ThreadPool.run(ThreadPool.java:395) at IceInternal.ThreadPool.access$300(ThreadPool.java:12) at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832) at java.base/java.lang.Thread.run(Thread.java:829) ```
will-moore commented 1 year ago

Checking image again...

ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite -L 1080:localhost:80

http://localhost:1080/webclient/?show=image-46035

This uses Fileset: 9363 with paths on server (from web UI):

/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OMEMETADATA.ome.xml
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME.zattrs
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/4.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/3.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/2.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/1.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/0.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0.zattrs
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr.zattrs

NB: These paths are missing the trailing / compared to other images in IDR. Also, the whitespace might be causing problems...

Use $ omero delete Fileset:9363 --report --dry-run to get a handle on OriginalFile IDs for this Fileset: OriginalFile:1999565-1999576

then:

$ omero hql -q --limit=10 "select name, path from OriginalFile where id=1999576"
 # | Col1             | Col2                                                                                                                     
---+------------------+--------------------------------------------------------------------------------------------------------------------------
 0 | METADATA.ome.xml | /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME 

Try to fix...

For 1999574, 1999575, 1999576:

$ omero obj update OriginalFile:1999574 path=/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/OME/

For 1999565 - 1999574:

$ omero obj update OriginalFile:1999573 path=/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/

Update symlink, replacing link from "Tonsil 2.ome.zarr" with link from "Tonsil2.ome.zarr"

$ ssh pilot-idrtesting
$ sudo -u omero-server -s
$ cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff
$ ln -s "/ngff/idr0054/Tonsil 2.ome.zarr" "Tonsil2.ome.zarr"
$ ls -alh
total 0
drwxr-sr-x. 2 omero-server idr-data 55 Mar 21 10:23 .
drwxrwsr-x. 4 omero-server idr-data 43 Mar  7 16:23 ..
lrwxrwxrwx. 1 omero-server idr-data 31 Mar  7 16:23 Tonsil 2.ome.zarr -> /ngff/idr0054/Tonsil 2.ome.zarr
lrwxrwxrwx. 1 omero-server idr-data 31 Mar 21 10:23 Tonsil2.ome.zarr -> /ngff/idr0054/Tonsil 2.ome.zarr
$ rm "Tonsil 2.ome.zarr"
idr=> UPDATE pixels SET  name = '.zattrs',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr' where id = 46035;
UPDATE 1

Then tried to view image again - still fails:

Exception ``` Traceback (most recent call last): File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 538, in wrapped retval = f(request, *args, **kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 597, in wrapper context = f(request, *args, **kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/webclient/views.py", line 1754, in load_metadata_preview rdefId = manager.image.getRenderingDefId() File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 7881, in wrapped if not self._prepareRenderingEngine() \ File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 8157, in _prepareRenderingEngine self._re = self._prepareRE(rdid=rdid) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 8136, in _prepareRE re.load(ctx) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4796, in __call__ return self.handle_exception(e, *args, **kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/webclient/webclient_gateway.py", line 2222, in handle_exception super(OmeroWebSafeCallWrapper, self).handle_exception(e, *args, **kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4793, in __call__ return self.f(*args, **kwargs) File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero_api_RenderingEngine_ice.py", line 1192, in load return _M_omero.api.RenderingEngine._op_load.invoke(self, ((), _ctx)) omero.ResourceError: exception ::omero::ResourceError { serverStackTrace = ome.conditions.ResourceError: Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs at ome.io.nio.PixelsService.createBfPixelBuffer(PixelsService.java:907) at ome.io.nio.PixelsService._getPixelBuffer(PixelsService.java:653) at ome.io.nio.PixelsService.getPixelBuffer(PixelsService.java:571) at ome.services.RenderingBean$12.doWork(RenderingBean.java:2205) at jdk.internal.reflect.GeneratedMethodAccessor302.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.security.basic.EventHandler.invoke(EventHandler.java:154) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy100.doWork(Unknown Source) at ome.services.util.Executor$Impl.execute(Executor.java:447) at ome.services.util.Executor$Impl.execute(Executor.java:392) at ome.services.RenderingBean.getPixelBuffer(RenderingBean.java:2202) at ome.services.RenderingBean.load(RenderingBean.java:417) at jdk.internal.reflect.GeneratedMethodAccessor1950.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy122.load(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor1950.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy122.load(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor1978.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) 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.RenderingEngineI.load_async(RenderingEngineI.java:316) at jdk.internal.reflect.GeneratedMethodAccessor1977.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at omero.cmd.CallContext.invoke(CallContext.java:85) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy124.load_async(Unknown Source) at omero.api._RenderingEngineTie.load_async(_RenderingEngineTie.java:248) at omero.api._RenderingEngineDisp.___load(_RenderingEngineDisp.java:1223) at omero.api._RenderingEngineDisp.__dispatch(_RenderingEngineDisp.java:2405) at IceInternal.Incoming.invoke(Incoming.java:221) at Ice.ConnectionI.invokeAll(ConnectionI.java:2536) at Ice.ConnectionI.dispatch(ConnectionI.java:1145) at Ice.ConnectionI.message(ConnectionI.java:1056) at IceInternal.ThreadPool.run(ThreadPool.java:395) at IceInternal.ThreadPool.access$300(ThreadPool.java:12) at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832) at java.base/java.lang.Thread.run(Thread.java:829) serverExceptionClass = ome.conditions.ResourceError message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs } ```

Tried pointing at a few different locations, but each gave the same error

idr=> UPDATE pixels SET  name = '.zattrs',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr' where id = 46035;
UPDATE 1
idr=> UPDATE pixels SET  name = '.zattrs',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/0/' where id = 46035;
UPDATE 1
idr=> UPDATE pixels SET  name = 'METADATA.ome.xml',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/OME/' where id = 46035;
UPDATE 1
idr=> UPDATE pixels SET  name = '.zattrs',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/' where id = 46035;
UPDATE 1
will-moore commented 1 year ago

cc @joshmoore @sbesson @jburel - I'm still stuck at the same point here, and this is currently a blocker for NGFF Fileset replacement.

I have created a new Fileset, with links to new OriginalFiles (except for chunks), based on path/name of NGFF files, where the path contains a symlink to files at /ngff/idr0054/Tonsil 2.ome.zarr. Also updated the pixels to point at symlinked files.

will-moore commented 1 year ago

Discussed in IDR meeting today: Need Blitz log...

$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite -L 1080:localhost:80
$ cd /opt/omero/server/OMERO.server
$ $ tail -f var/log/Blitz-0.log

Then go to http://localhost:1080/webclient/?show=image-46035 and open Preview Tab...

NB: lots of other activity adding to the Blitz log just now, so not limited to the action above...

Blitz log ``` 2023-03-27 10:00:00,914 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911200914] time[0] tag[omero.repo.internal_register.find_repo_files] 2023-03-27 10:00:02,979 INFO [ ome.services.blitz.fire.SessionManagerI] (.Server-11) Found session locally: e5218453-c253-4b07-b3dd-3d7c0ffd2cfc 2023-03-27 10:00:02,980 INFO [ ome.services.blitz.fire.SessionManagerI] (.Server-11) Rejoining session ServiceFactoryI(session-878a0e38-c7f9-4558-b354-987a7c1be757/e5218453-c253-4b07-b3dd-3d7c0ffd2cfc) (agent=OMERO.web) 2023-03-27 10:00:02,985 INFO [ omero.cmd.SessionI] (.Server-13) Added servant to adapter: e5218453-c253-4b07-b3dd-3d7c0ffd2cfc/878a0e38-c7f9-4558-b354-987a7c1be757omero.api.IConfig(omero.api._IConfigTie@5a03ddb1) 2023-03-27 10:00:02,986 INFO [ ome.services.util.ServiceHandler] (.Server-14) Meth: interface ome.api.IConfig.getConfigValues 2023-03-27 10:00:02,986 INFO [ ome.services.util.ServiceHandler] (.Server-14) Args: [^omero\.cluster\.read_only\.runtime\.] 2023-03-27 10:00:02,990 INFO [ ome.security.basic.EventHandler] (.Server-14) Auth: user=2,group=3,event=null(User),sess=e5218453-c253-4b07-b3dd-3d7c0ffd2cfc 2023-03-27 10:00:02,993 INFO [ org.perf4j.TimingLogger] (.Server-14) start[1679911202986] time[6] tag[omero.call.success.ome.logic.ConfigImpl.getConfigValues] 2023-03-27 10:00:02,993 INFO [ ome.services.util.ServiceHandler] (.Server-14) Rslt: {omero.cluster.read_only.runtime.db=false, omero.cluster.read_only.runtime.repo=false} 2023-03-27 10:00:02,994 INFO [ ome.services.util.ServiceHandler] (l.Server-5) Meth: interface ome.api.IConfig.getClientConfigValues 2023-03-27 10:00:02,994 INFO [ ome.services.util.ServiceHandler] (l.Server-5) Args: () 2023-03-27 10:00:02,997 INFO [ ome.security.basic.EventHandler] (l.Server-5) Auth: user=2,group=3,event=null(User),sess=e5218453-c253-4b07-b3dd-3d7c0ffd2cfc 2023-03-27 10:00:03,016 INFO [ org.perf4j.TimingLogger] (l.Server-5) start[1679911202994] time[22] tag[omero.call.success.ome.logic.ConfigImpl.getClientConfigValues] 2023-03-27 10:00:03,017 INFO [ ome.services.util.ServiceHandler] (l.Server-5) Rslt: {omero.client.ui.tree.orphans.name=Orphaned Images, omero.client.browser.thumb_default_size=96, omero.client.viewer.initial_zoom_level=0, ... 14 more} 2023-03-27 10:00:03,018 INFO [ ome.services.util.ServiceHandler] (l.Server-2) Meth: interface ome.api.IConfig.getConfigValue 2023-03-27 10:00:03,018 INFO [ ome.services.util.ServiceHandler] (l.Server-2) Args: [omero.mail.config] 2023-03-27 10:00:03,020 INFO [ ome.security.basic.EventHandler] (l.Server-2) Auth: user=2,group=3,event=null(User),sess=e5218453-c253-4b07-b3dd-3d7c0ffd2cfc 2023-03-27 10:00:03,022 INFO [ org.perf4j.TimingLogger] (l.Server-2) start[1679911203018] time[3] tag[omero.call.success.ome.logic.ConfigImpl.getConfigValue] 2023-03-27 10:00:03,022 INFO [ ome.services.util.ServiceHandler] (l.Server-2) Rslt: false 2023-03-27 10:00:03,023 INFO [ ome.services.util.ServiceHandler] (.Server-15) Executor.doWork -- ome.services.blitz.impl.ServiceFactoryI.isGuest[] 2023-03-27 10:00:03,023 INFO [ ome.services.util.ServiceHandler] (.Server-15) Args: [null, InternalSF@38784987] 2023-03-27 10:00:03,024 INFO [ ome.security.basic.EventHandler] (.Server-15) Auth: user=2,group=3,event=null(User),sess=e5218453-c253-4b07-b3dd-3d7c0ffd2cfc 2023-03-27 10:00:03,025 INFO [ org.perf4j.TimingLogger] (.Server-15) start[1679911203023] time[1] tag[omero.call.success.ome.services.blitz.impl.ServiceFactoryI$3.doWork] 2023-03-27 10:00:03,025 INFO [ ome.services.util.ServiceHandler] (.Server-15) Rslt: false 2023-03-27 10:00:03,025 INFO [ omero.cmd.SessionI] (.Server-15) Added servant to adapter: e5218453-c253-4b07-b3dd-3d7c0ffd2cfc/878a0e38-c7f9-4558-b354-987a7c1be757omero.api.IQuery(omero.api._IQueryTie@40b97a27) 2023-03-27 10:00:03,026 INFO [ ome.services.util.ServiceHandler] (l.Server-0) Meth: interface ome.api.IQuery.findAllByQuery 2023-03-27 10:00:03,026 INFO [ ome.services.util.ServiceHandler] (l.Server-0) Args: [select obj from Screen obj join fetch obj.details.owner as owner join fetch obj.details.creationEven, PARAMS:ids=ArrayList(1) ] 2023-03-27 10:00:03,027 INFO [ ome.security.basic.BasicEventContext] (l.Server-0) cctx: group=-1 2023-03-27 10:00:03,029 INFO [ ome.security.basic.EventHandler] (l.Server-0) Auth: user=2,group=-1,event=null(User),sess=e5218453-c253-4b07-b3dd-3d7c0ffd2cfc 2023-03-27 10:00:03,030 INFO [ org.perf4j.TimingLogger] (l.Server-0) start[1679911203026] time[3] tag[omero.call.success.ome.logic.QueryImpl.findAllByQuery] 2023-03-27 10:00:03,030 INFO [ ome.services.util.ServiceHandler] (l.Server-0) Rslt: () 2023-03-27 10:00:03,031 INFO [ ome.services.util.ServiceHandler] (l.Server-7) Meth: interface ome.api.IQuery.findByQuery 2023-03-27 10:00:03,031 INFO [ ome.services.util.ServiceHandler] (l.Server-7) Args: [select obj from Screen obj join fetch obj.details.owner as owner join fetch obj.details.creationEven, PARAMS:ids=ArrayList(1) ] 2023-03-27 10:00:03,031 INFO [ ome.security.basic.BasicEventContext] (l.Server-7) cctx: group=-1 2023-03-27 10:00:03,033 INFO [ ome.security.basic.EventHandler] (l.Server-7) Auth: user=2,group=-1,event=null(User),sess=e5218453-c253-4b07-b3dd-3d7c0ffd2cfc 2023-03-27 10:00:03,034 INFO [ org.perf4j.TimingLogger] (l.Server-7) start[1679911203031] time[2] tag[omero.call.success.ome.logic.QueryImpl.findByQuery] 2023-03-27 10:00:03,034 INFO [ ome.services.util.ServiceHandler] (l.Server-7) Rslt: null 2023-03-27 10:00:03,036 INFO [o.services.sessions.SessionContext$Count] (l.Server-3) -Reference count: e5218453-c253-4b07-b3dd-3d7c0ffd2cfc=0 2023-03-27 10:00:03,036 INFO [ omero.cmd.SessionI] (l.Server-3) cleanupSelf(ServiceFactoryI(session-878a0e38-c7f9-4558-b354-987a7c1be757/e5218453-c253-4b07-b3dd-3d7c0ffd2cfc)). 2023-03-27 10:00:03,036 INFO [ omero.cmd.SessionI] (l.Server-3) Unregistered servant:e5218453-c253-4b07-b3dd-3d7c0ffd2cfc/878a0e38-c7f9-4558-b354-987a7c1be757omero.api.IQuery(omero.api._IQueryTie@40b97a27) 2023-03-27 10:00:03,036 INFO [ omero.cmd.SessionI] (l.Server-3) Removed servant from adapter: 878a0e38-c7f9-4558-b354-987a7c1be757omero.api.IQuery 2023-03-27 10:00:03,036 INFO [ omero.cmd.SessionI] (l.Server-3) Unregistered servant:e5218453-c253-4b07-b3dd-3d7c0ffd2cfc/878a0e38-c7f9-4558-b354-987a7c1be757omero.api.IConfig(omero.api._IConfigTie@5a03ddb1) 2023-03-27 10:00:03,036 INFO [ omero.cmd.SessionI] (l.Server-3) Removed servant from adapter: 878a0e38-c7f9-4558-b354-987a7c1be757omero.api.IConfig 2023-03-27 10:00:03,862 INFO [ ome.security.basic.CurrentDetails] (l.Server-8) Adding log:INSERT,class ome.model.core.OriginalFile,2943659 2023-03-27 10:00:04,112 INFO [ ome.services.util.ServiceHandler] (read-11649) Executor.doWork -- ome.services.sessions.SessionManagerImpl.reload[9da4d1e1-1d05-4e19-9ea7-0cf90e0a1c0f] 2023-03-27 10:00:04,112 INFO [ ome.services.util.ServiceHandler] (read-11649) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,116 INFO [ ome.security.basic.EventHandler] (read-11649) Auth: user=0,group=0,event=null(Sessions),sess=3cd415eb-d1f7-4d4e-970f-2c59b8ff4b9d 2023-03-27 10:00:04,121 INFO [ org.perf4j.TimingLogger] (read-11649) start[1679911204112] time[8] tag[omero.call.success.ome.services.sessions.SessionManagerImpl$6.doWork] 2023-03-27 10:00:04,121 INFO [ ome.services.util.ServiceHandler] (read-11649) Rslt: (ome.model.meta.Experimenter:Id_52, ome.model.meta.ExperimenterGroup:Id_3, (), ... 5 more) 2023-03-27 10:00:04,316 INFO [ ome.security.basic.CurrentDetails] (.Server-12) Adding log:INSERT,class ome.model.core.OriginalFile,2943660 2023-03-27 10:00:04,316 INFO [ ome.security.basic.CurrentDetails] (.Server-12) Adding log:INSERT,class ome.model.core.OriginalFile,2943661 2023-03-27 10:00:04,333 INFO [ ome.services.blitz.fire.SessionManagerI] (l.Server-3) Found session locally: 54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,334 INFO [ ome.services.blitz.fire.SessionManagerI] (l.Server-3) Rejoining session ServiceFactoryI(session-0bdc9399-a412-4b0f-bdb6-59c54d84602b/54f159c4-dfe3-4f43-8de4-60b0a9a9fb84) (agent=OMERO.web) 2023-03-27 10:00:04,339 INFO [ ome.services.util.ServiceHandler] (l.Server-4) Executor.doWork -- ome.services.blitz.impl.ServiceFactoryI.isGuest[] 2023-03-27 10:00:04,339 INFO [ ome.services.util.ServiceHandler] (l.Server-4) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,343 INFO [ ome.security.basic.EventHandler] (l.Server-4) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,344 INFO [ org.perf4j.TimingLogger] (l.Server-4) start[1679911204339] time[4] tag[omero.call.success.ome.services.blitz.impl.ServiceFactoryI$3.doWork] 2023-03-27 10:00:04,344 INFO [ ome.services.util.ServiceHandler] (l.Server-4) Rslt: false 2023-03-27 10:00:04,344 INFO [ omero.cmd.SessionI] (l.Server-4) Added servant to adapter: 54f159c4-dfe3-4f43-8de4-60b0a9a9fb84/0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IQuery(omero.api._IQueryTie@5b3bd1c5) 2023-03-27 10:00:04,346 INFO [ ome.services.util.ServiceHandler] (l.Server-6) Meth: interface ome.api.IQuery.findByQuery 2023-03-27 10:00:04,346 INFO [ ome.services.util.ServiceHandler] (l.Server-6) Args: [select obj from Image obj join fetch obj.details.owner as owner join fetch obj.details.creationEvent, PARAMS:ids=ArrayList(1) ] 2023-03-27 10:00:04,347 INFO [ ome.security.basic.BasicEventContext] (l.Server-6) cctx: group=-1 2023-03-27 10:00:04,352 INFO [ ome.security.basic.EventHandler] (l.Server-6) Auth: user=2,group=-1,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,356 INFO [ org.perf4j.TimingLogger] (l.Server-6) start[1679911204346] time[10] tag[omero.call.success.ome.logic.QueryImpl.findByQuery] 2023-03-27 10:00:04,356 INFO [ ome.services.util.ServiceHandler] (l.Server-6) Rslt: ome.model.core.Image:Id_46035 2023-03-27 10:00:04,362 INFO [ ome.services.util.ServiceHandler] (.Server-13) Executor.doWork -- ome.services.blitz.impl.ServiceFactoryI.isGuest[] 2023-03-27 10:00:04,362 INFO [ ome.services.util.ServiceHandler] (.Server-13) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,364 INFO [ ome.security.basic.EventHandler] (.Server-13) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,364 INFO [ org.perf4j.TimingLogger] (.Server-13) start[1679911204362] time[2] tag[omero.call.success.ome.services.blitz.impl.ServiceFactoryI$3.doWork] 2023-03-27 10:00:04,364 INFO [ ome.services.util.ServiceHandler] (.Server-13) Rslt: false 2023-03-27 10:00:04,364 INFO [ omero.cmd.SessionI] (.Server-13) Added servant to adapter: 54f159c4-dfe3-4f43-8de4-60b0a9a9fb84/0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IContainer(omero.api._IContainerTie@55c38123) 2023-03-27 10:00:04,366 INFO [ ome.services.util.ServiceHandler] (.Server-14) Meth: interface ome.api.IContainer.getImages 2023-03-27 10:00:04,366 INFO [ ome.services.util.ServiceHandler] (.Server-14) Args: [class ome.model.core.Image, (46035), null] 2023-03-27 10:00:04,367 INFO [ ome.security.basic.BasicEventContext] (.Server-14) cctx: group=3 2023-03-27 10:00:04,368 INFO [ ome.security.basic.EventHandler] (.Server-14) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,374 INFO [ org.perf4j.TimingLogger] (.Server-14) start[1679911204366] time[7] tag[omero.call.success.ome.logic.PojosImpl.getImages] 2023-03-27 10:00:04,374 INFO [ ome.services.util.ServiceHandler] (.Server-14) Rslt: (ome.model.core.Image:Id_46035) 2023-03-27 10:00:04,380 INFO [ ome.services.util.ServiceHandler] (l.Server-5) Executor.doWork -- ome.services.blitz.impl.ServiceFactoryI.isGuest[] 2023-03-27 10:00:04,380 INFO [ ome.services.util.ServiceHandler] (l.Server-5) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,381 INFO [ ome.security.basic.EventHandler] (l.Server-5) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,382 INFO [ org.perf4j.TimingLogger] (l.Server-5) start[1679911204380] time[1] tag[omero.call.success.ome.services.blitz.impl.ServiceFactoryI$3.doWork] 2023-03-27 10:00:04,382 INFO [ ome.services.util.ServiceHandler] (l.Server-5) Rslt: false 2023-03-27 10:00:04,382 INFO [ omero.cmd.SessionI] (l.Server-5) Added servant to adapter: 54f159c4-dfe3-4f43-8de4-60b0a9a9fb84/0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IPixels(omero.api._IPixelsTie@4e092dcb) 2023-03-27 10:00:04,384 INFO [ ome.services.util.ServiceHandler] (l.Server-2) Meth: interface ome.api.IPixels.retrieveAllRndSettings 2023-03-27 10:00:04,384 INFO [ ome.services.util.ServiceHandler] (l.Server-2) Args: [46035, -1] 2023-03-27 10:00:04,384 INFO [ ome.security.basic.BasicEventContext] (l.Server-2) cctx: group=-1 2023-03-27 10:00:04,386 INFO [ ome.security.basic.EventHandler] (l.Server-2) Auth: user=2,group=-1,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,399 INFO [ org.perf4j.TimingLogger] (l.Server-2) start[1679911204384] time[15] tag[omero.call.success.ome.logic.PixelsImpl.retrieveAllRndSettings] 2023-03-27 10:00:04,399 INFO [ ome.services.util.ServiceHandler] (l.Server-2) Rslt: (ome.model.display.RenderingDef:Id_42502) 2023-03-27 10:00:04,414 INFO [ ome.services.util.ServiceHandler] (.Server-15) Executor.doWork -- ome.services.blitz.impl.ServiceFactoryI.isGuest[] 2023-03-27 10:00:04,414 INFO [ ome.services.util.ServiceHandler] (.Server-15) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,418 INFO [ ome.security.basic.EventHandler] (.Server-15) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,419 INFO [ org.perf4j.TimingLogger] (.Server-15) start[1679911204414] time[4] tag[omero.call.success.ome.services.blitz.impl.ServiceFactoryI$3.doWork] 2023-03-27 10:00:04,419 INFO [ ome.services.util.ServiceHandler] (.Server-15) Rslt: false 2023-03-27 10:00:04,420 INFO [ ome.services.util.ServiceHandler] (.Server-15) Executor.doWork -- ome.services.blitz.impl.ServiceFactoryI.isGuest[] 2023-03-27 10:00:04,420 INFO [ ome.services.util.ServiceHandler] (.Server-15) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,422 INFO [ ome.security.basic.EventHandler] (.Server-15) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,422 INFO [ org.perf4j.TimingLogger] (.Server-15) start[1679911204420] time[2] tag[omero.call.success.ome.services.blitz.impl.ServiceFactoryI$3.doWork] 2023-03-27 10:00:04,422 INFO [ ome.services.util.ServiceHandler] (.Server-15) Rslt: false 2023-03-27 10:00:04,423 INFO [ omero.cmd.SessionI] (.Server-15) Added servant to adapter: 54f159c4-dfe3-4f43-8de4-60b0a9a9fb84/0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IRoi(omero.api._IRoiTie@2e1aa143) 2023-03-27 10:00:04,423 INFO [ omero.cmd.SessionI] (.Server-15) Added servant to adapter: 54f159c4-dfe3-4f43-8de4-60b0a9a9fb84/acdfc40d-858d-4254-96ac-9e5c8dca2f5bomero.api.RenderingEngine(omero.api._RenderingEngineTie@2917797f) 2023-03-27 10:00:04,426 INFO [ ome.services.util.ServiceHandler] (l.Server-0) Meth: interface omeis.providers.re.RenderingEngine.lookupPixels 2023-03-27 10:00:04,426 INFO [ ome.services.util.ServiceHandler] (l.Server-0) Args: [46035] 2023-03-27 10:00:04,427 INFO [ ome.services.util.ServiceHandler] (l.Server-0) Executor.doWork -- ome.services.RenderingBean.retrievePixels[] 2023-03-27 10:00:04,427 INFO [ ome.services.util.ServiceHandler] (l.Server-0) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,428 INFO [ ome.security.basic.BasicEventContext] (l.Server-0) cctx: group=3 2023-03-27 10:00:04,429 INFO [ ome.security.basic.EventHandler] (l.Server-0) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,440 INFO [ org.perf4j.TimingLogger] (l.Server-0) start[1679911204427] time[13] tag[omero.call.success.ome.services.RenderingBean$4.doWork] 2023-03-27 10:00:04,440 INFO [ ome.services.util.ServiceHandler] (l.Server-0) Rslt: ome.model.core.Pixels:Id_46035 2023-03-27 10:00:04,440 INFO [ org.perf4j.TimingLogger] (l.Server-0) start[1679911204426] time[13] tag[omero.call.success.ome.services.RenderingBean.lookupPixels] 2023-03-27 10:00:04,441 INFO [ ome.services.util.ServiceHandler] (l.Server-0) Rslt: null 2023-03-27 10:00:04,442 INFO [ ome.services.util.ServiceHandler] (l.Server-7) Meth: interface omeis.providers.re.RenderingEngine.lookupRenderingDef 2023-03-27 10:00:04,442 INFO [ ome.services.util.ServiceHandler] (l.Server-7) Args: [46035] 2023-03-27 10:00:04,442 INFO [ ome.services.util.ServiceHandler] (l.Server-7) Executor.doWork -- ome.services.RenderingBean.retrieveRndDef[] 2023-03-27 10:00:04,442 INFO [ ome.services.util.ServiceHandler] (l.Server-7) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,443 INFO [ ome.security.basic.BasicEventContext] (l.Server-7) cctx: group=3 2023-03-27 10:00:04,444 INFO [ ome.security.basic.EventHandler] (l.Server-7) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,458 INFO [ org.perf4j.TimingLogger] (l.Server-7) start[1679911204442] time[15] tag[omero.call.success.ome.services.RenderingBean$5.doWork] 2023-03-27 10:00:04,458 INFO [ ome.services.util.ServiceHandler] (l.Server-7) Rslt: ome.model.display.RenderingDef:Id_42502 2023-03-27 10:00:04,458 INFO [ org.perf4j.TimingLogger] (l.Server-7) start[1679911204442] time[15] tag[omero.call.success.ome.services.RenderingBean.lookupRenderingDef] 2023-03-27 10:00:04,458 INFO [ ome.services.util.ServiceHandler] (l.Server-7) Rslt: true 2023-03-27 10:00:04,459 INFO [ ome.services.util.ServiceHandler] (.Server-16) Meth: interface omeis.providers.re.RenderingEngine.getRenderingDefId 2023-03-27 10:00:04,459 INFO [ ome.services.util.ServiceHandler] (.Server-16) Args: () 2023-03-27 10:00:04,459 INFO [ org.perf4j.TimingLogger] (.Server-16) start[1679911204459] time[0] tag[omero.call.success.ome.services.RenderingBean.getRenderingDefId] 2023-03-27 10:00:04,459 INFO [ ome.services.util.ServiceHandler] (.Server-16) Rslt: 42502 2023-03-27 10:00:04,460 INFO [ ome.services.util.ServiceHandler] (.Server-16) Meth: interface omeis.providers.re.RenderingEngine.load 2023-03-27 10:00:04,460 INFO [ ome.services.util.ServiceHandler] (.Server-16) Args: () 2023-03-27 10:00:04,460 INFO [ ome.services.util.ServiceHandler] (.Server-16) Executor.doWork -- ome.services.RenderingBean.getAllEnumerations[] 2023-03-27 10:00:04,460 INFO [ ome.services.util.ServiceHandler] (.Server-16) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,461 INFO [ ome.security.basic.BasicEventContext] (.Server-16) cctx: group=3 2023-03-27 10:00:04,462 INFO [ ome.security.basic.EventHandler] (.Server-16) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,463 INFO [ org.perf4j.TimingLogger] (.Server-16) start[1679911204460] time[2] tag[omero.call.success.ome.services.RenderingBean$7.doWork] 2023-03-27 10:00:04,463 INFO [ ome.services.util.ServiceHandler] (.Server-16) Rslt: (ome.model.enums.Family:linear:Id_1, ome.model.enums.Family:polynomial:Id_2, ome.model.enums.Family:exponential:Id_3, ... 1 more) 2023-03-27 10:00:04,463 INFO [ ome.services.util.ServiceHandler] (.Server-16) Executor.doWork -- ome.services.RenderingBean.getAllEnumerations[] 2023-03-27 10:00:04,463 INFO [ ome.services.util.ServiceHandler] (.Server-16) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,464 INFO [ ome.security.basic.BasicEventContext] (.Server-16) cctx: group=3 2023-03-27 10:00:04,465 INFO [ ome.security.basic.EventHandler] (.Server-16) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,465 INFO [ org.perf4j.TimingLogger] (.Server-16) start[1679911204463] time[2] tag[omero.call.success.ome.services.RenderingBean$7.doWork] 2023-03-27 10:00:04,465 INFO [ ome.services.util.ServiceHandler] (.Server-16) Rslt: (ome.model.enums.RenderingModel:rgb:Id_1, ome.model.enums.RenderingModel:greyscale:Id_2) 2023-03-27 10:00:04,466 INFO [ ome.services.util.ServiceHandler] (.Server-16) Executor.doWork -- ome.services.RenderingBean.getPixelBuffer[] 2023-03-27 10:00:04,466 INFO [ ome.services.util.ServiceHandler] (.Server-16) Args: [null, InternalSF@38784987] 2023-03-27 10:00:04,466 INFO [ ome.security.basic.BasicEventContext] (.Server-16) cctx: group=3 2023-03-27 10:00:04,467 INFO [ ome.security.basic.EventHandler] (.Server-16) Auth: user=2,group=3,event=null(User),sess=54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:04,468 INFO [ ome.services.OmeroFilePathResolver] (.Server-16) Metadata only file, resulting path: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs 2023-03-27 10:00:04,474 INFO [ loci.formats.ImageReader] (.Server-16) ZarrReader initializing /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs 2023-03-27 10:00:04,484 DEBUG [ loci.formats.Memoizer] (.Server-16) start[1679911204471] time[12] tag[loci.formats.Memoizer.setId] 2023-03-27 10:00:04,485 ERROR [ ome.io.bioformats.BfPixelBuffer] (.Server-16) Failed to instantiate BfPixelsWrapper with /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs 2023-03-27 10:00:04,485 ERROR [ ome.io.nio.PixelsService] (.Server-16) Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs java.lang.RuntimeException: java.lang.IllegalArgumentException: Invalid index: -1 at ome.io.bioformats.BfPixelBuffer.reader(BfPixelBuffer.java:79) at ome.io.bioformats.BfPixelBuffer.setSeries(BfPixelBuffer.java:124) at ome.io.nio.PixelsService.createBfPixelBuffer(PixelsService.java:898) at ome.io.nio.PixelsService._getPixelBuffer(PixelsService.java:653) at ome.io.nio.PixelsService.getPixelBuffer(PixelsService.java:571) at ome.services.RenderingBean$12.doWork(RenderingBean.java:2205) at jdk.internal.reflect.GeneratedMethodAccessor302.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.security.basic.EventHandler.invoke(EventHandler.java:154) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy100.doWork(Unknown Source) at ome.services.util.Executor$Impl.execute(Executor.java:447) at ome.services.util.Executor$Impl.execute(Executor.java:392) at ome.services.RenderingBean.getPixelBuffer(RenderingBean.java:2202) at ome.services.RenderingBean.load(RenderingBean.java:417) at jdk.internal.reflect.GeneratedMethodAccessor1950.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy122.load(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor1950.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy122.load(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor1978.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) 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.RenderingEngineI.load_async(RenderingEngineI.java:316) at jdk.internal.reflect.GeneratedMethodAccessor1977.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at omero.cmd.CallContext.invoke(CallContext.java:85) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy124.load_async(Unknown Source) at omero.api._RenderingEngineTie.load_async(_RenderingEngineTie.java:248) at omero.api._RenderingEngineDisp.___load(_RenderingEngineDisp.java:1223) at omero.api._RenderingEngineDisp.__dispatch(_RenderingEngineDisp.java:2405) at IceInternal.Incoming.invoke(Incoming.java:221) at Ice.ConnectionI.invokeAll(ConnectionI.java:2536) at Ice.ConnectionI.dispatch(ConnectionI.java:1145) at Ice.ConnectionI.message(ConnectionI.java:1056) at IceInternal.ThreadPool.run(ThreadPool.java:395) at IceInternal.ThreadPool.access$300(ThreadPool.java:12) at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.IllegalArgumentException: Invalid index: -1 at loci.formats.FormatReader.coreIndexToSeries(FormatReader.java:1328) at loci.formats.FormatReader.getSeriesCount(FormatReader.java:963) at loci.formats.MetadataTools.populatePixels(MetadataTools.java:137) at loci.formats.MetadataTools.populatePixels(MetadataTools.java:116) at loci.formats.in.ZarrReader.initFile(ZarrReader.java:282) at loci.formats.FormatReader.setId(FormatReader.java:1443) at loci.formats.ImageReader.setId(ImageReader.java:849) at ome.io.nio.PixelsService$3.setId(PixelsService.java:869) at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650) at loci.formats.ChannelFiller.setId(ChannelFiller.java:234) at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650) at loci.formats.ChannelSeparator.setId(ChannelSeparator.java:293) at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650) at loci.formats.Memoizer.setId(Memoizer.java:690) at ome.io.bioformats.BfPixelsWrapper.(BfPixelsWrapper.java:52) at ome.io.bioformats.BfPixelBuffer.reader(BfPixelBuffer.java:73) ... 82 common frames omitted 2023-03-27 10:00:04,486 INFO [ org.perf4j.TimingLogger] (.Server-16) start[1679911204466] time[20] tag[omero.call.exception] 2023-03-27 10:00:04,487 INFO [ ome.services.util.ServiceHandler] (.Server-16) Excp: ome.conditions.ResourceError: Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs 2023-03-27 10:00:04,487 INFO [ org.perf4j.TimingLogger] (.Server-16) start[1679911204460] time[26] tag[omero.call.exception] 2023-03-27 10:00:04,487 INFO [ ome.services.util.ServiceHandler] (.Server-16) Excp: ome.conditions.ResourceError: Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs 2023-03-27 10:00:04,491 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Meth: interface ome.api.StatefulServiceInterface.close 2023-03-27 10:00:04,491 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Args: () 2023-03-27 10:00:04,491 INFO [ org.perf4j.TimingLogger] (l.Server-3) start[1679911204491] time[0] tag[omero.call.success.ome.services.RenderingBean.close] 2023-03-27 10:00:04,491 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Rslt: null 2023-03-27 10:00:04,491 INFO [ omero.cmd.SessionI] (l.Server-3) Unregistered servant:54f159c4-dfe3-4f43-8de4-60b0a9a9fb84/acdfc40d-858d-4254-96ac-9e5c8dca2f5bomero.api.RenderingEngine(omero.api._RenderingEngineTie@2917797f) 2023-03-27 10:00:04,492 INFO [o.services.sessions.SessionContext$Count] (.Server-11) -Reference count: 54f159c4-dfe3-4f43-8de4-60b0a9a9fb84=0 2023-03-27 10:00:04,492 INFO [ omero.cmd.SessionI] (.Server-11) cleanupSelf(ServiceFactoryI(session-0bdc9399-a412-4b0f-bdb6-59c54d84602b/54f159c4-dfe3-4f43-8de4-60b0a9a9fb84)). 2023-03-27 10:00:04,492 INFO [ omero.cmd.SessionI] (.Server-11) Unregistered servant:54f159c4-dfe3-4f43-8de4-60b0a9a9fb84/0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IRoi(omero.api._IRoiTie@2e1aa143) 2023-03-27 10:00:04,492 INFO [ omero.cmd.SessionI] (.Server-11) Removed servant from adapter: 0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IRoi 2023-03-27 10:00:04,492 INFO [ omero.cmd.SessionI] (.Server-11) Unregistered servant:54f159c4-dfe3-4f43-8de4-60b0a9a9fb84/0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IContainer(omero.api._IContainerTie@55c38123) 2023-03-27 10:00:04,492 INFO [ omero.cmd.SessionI] (.Server-11) Removed servant from adapter: 0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IContainer 2023-03-27 10:00:04,492 INFO [ omero.cmd.SessionI] (.Server-11) Unregistered servant:54f159c4-dfe3-4f43-8de4-60b0a9a9fb84/0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IQuery(omero.api._IQueryTie@5b3bd1c5) 2023-03-27 10:00:04,492 INFO [ omero.cmd.SessionI] (.Server-11) Removed servant from adapter: 0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IQuery 2023-03-27 10:00:04,492 INFO [ omero.cmd.SessionI] (.Server-11) Unregistered servant:54f159c4-dfe3-4f43-8de4-60b0a9a9fb84/0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IPixels(omero.api._IPixelsTie@4e092dcb) 2023-03-27 10:00:04,493 INFO [ omero.cmd.SessionI] (.Server-11) Removed servant from adapter: 0bdc9399-a412-4b0f-bdb6-59c54d84602bomero.api.IPixels 2023-03-27 10:00:04,721 INFO [ org.perf4j.TimingLogger] (l.Server-8) start[1679911200273] time[4448] tag[omero.repo.create_original_file.save] 2023-03-27 10:00:04,721 INFO [ org.perf4j.TimingLogger] (l.Server-8) start[1679911204721] time[0] tag[omero.repo.create_original_file.internal_mkdir] 2023-03-27 10:00:04,721 INFO [ org.perf4j.TimingLogger] (l.Server-8) start[1679911204721] time[0] tag[omero.repo.internal_register.load] 2023-03-27 10:00:04,722 INFO [ org.perf4j.TimingLogger] (l.Server-8) start[1679911204721] time[0] tag[omero.repo.internal_register.find_repo_files] 2023-03-27 10:00:05,173 INFO [ org.perf4j.TimingLogger] (.Server-12) start[1679911198425] time[6748] tag[omero.repo.create_original_file.save] 2023-03-27 10:00:05,173 INFO [ org.perf4j.TimingLogger] (.Server-12) start[1679911205173] time[0] tag[omero.repo.create_original_file.internal_mkdir] 2023-03-27 10:00:05,173 INFO [ org.perf4j.TimingLogger] (.Server-12) start[1679911205173] time[0] tag[omero.repo.internal_register.load] 2023-03-27 10:00:05,174 INFO [ org.perf4j.TimingLogger] (.Server-12) start[1679911205174] time[0] tag[omero.repo.internal_register.find_repo_files] 2023-03-27 10:00:07,290 INFO [ ome.security.basic.CurrentDetails] (l.Server-9) Adding log:INSERT,class ome.model.core.OriginalFile,2943662 2023-03-27 10:00:07,979 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911204121] time[3857] tag[omero.repo.create_original_file.save] 2023-03-27 10:00:07,979 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207979] time[0] tag[omero.repo.create_original_file.internal_mkdir] 2023-03-27 10:00:07,979 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207979] time[0] tag[omero.repo.internal_register.load] 2023-03-27 10:00:07,979 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207979] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,979 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207979] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,980 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207979] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,980 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207980] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,980 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207980] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,980 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207980] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,980 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207980] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,980 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207980] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,981 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207980] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,981 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207981] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,981 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207981] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,981 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207981] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,981 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207981] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,981 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207981] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,982 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207982] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,982 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207982] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,982 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207982] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,982 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207982] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,983 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207982] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,983 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207983] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,983 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207983] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,983 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207983] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,983 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207983] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,983 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207983] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:07,984 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207983] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:07,984 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207984] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:08,111 INFO [ ome.services.util.ServiceHandler] (read-11649) Executor.doWork -- ome.services.sessions.SessionManagerImpl.reload[9da4d1e1-1d05-4e19-9ea7-0cf90e0a1c0f] 2023-03-27 10:00:08,111 INFO [ ome.services.util.ServiceHandler] (read-11649) Args: [null, InternalSF@38784987] 2023-03-27 10:00:08,116 INFO [ ome.security.basic.EventHandler] (read-11649) Auth: user=0,group=0,event=null(Sessions),sess=3cd415eb-d1f7-4d4e-970f-2c59b8ff4b9d 2023-03-27 10:00:08,120 INFO [ ome.services.util.ServiceHandler] (read-11650) Executor.doWork -- ome.services.sessions.SessionManagerImpl.reload[8eb39a2f-b26d-446c-9d2e-13feb6c68ebf] 2023-03-27 10:00:08,120 INFO [ ome.services.util.ServiceHandler] (read-11650) Args: [null, InternalSF@38784987] 2023-03-27 10:00:08,124 INFO [ org.perf4j.TimingLogger] (read-11649) start[1679911208112] time[12] tag[omero.call.success.ome.services.sessions.SessionManagerImpl$6.doWork] 2023-03-27 10:00:08,125 INFO [ ome.services.util.ServiceHandler] (read-11649) Rslt: (ome.model.meta.Experimenter:Id_52, ome.model.meta.ExperimenterGroup:Id_3, (), ... 5 more) 2023-03-27 10:00:08,132 INFO [ ome.security.basic.EventHandler] (read-11650) Auth: user=0,group=0,event=null(Sessions),sess=3cd415eb-d1f7-4d4e-970f-2c59b8ff4b9d 2023-03-27 10:00:08,139 INFO [ org.perf4j.TimingLogger] (read-11650) start[1679911208120] time[18] tag[omero.call.success.ome.services.sessions.SessionManagerImpl$6.doWork] 2023-03-27 10:00:08,139 INFO [ ome.services.util.ServiceHandler] (read-11650) Rslt: (ome.model.meta.Experimenter:Id_52, ome.model.meta.ExperimenterGroup:Id_3, (), ... 5 more) 2023-03-27 10:00:10,839 INFO [ ome.services.blitz.fire.SessionManagerI] (l.Server-4) Found session locally: 54f159c4-dfe3-4f43-8de4-60b0a9a9fb84 2023-03-27 10:00:10,840 INFO [ ome.services.blitz.fire.SessionManagerI] (l.Server-4) Rejoining session ServiceFactoryI(session-36ba35e0-3a0f-4d9d-8708-0ad3991b6e7b/54f159c4-dfe3-4f43-8de4-60b0a9a9fb84) (agent=OMERO.web) 2023-03-27 10:00:10,846 INFO [o.services.sessions.SessionContext$Count] (.Server-13) -Reference count: 54f159c4-dfe3-4f43-8de4-60b0a9a9fb84=0 2023-03-27 10:00:10,846 INFO [ omero.cmd.SessionI] (.Server-13) cleanupSelf(ServiceFactoryI(session-36ba35e0-3a0f-4d9d-8708-0ad3991b6e7b/54f159c4-dfe3-4f43-8de4-60b0a9a9fb84)). 2023-03-27 10:00:11,057 INFO [ ome.security.basic.CurrentDetails] (l.Server-9) Adding log:UPDATE,class ome.model.core.OriginalFile,2943658 2023-03-27 10:00:11,399 INFO [ ome.security.basic.CurrentDetails] (l.Server-8) Adding log:INSERT,class ome.model.core.OriginalFile,2943663 2023-03-27 10:00:11,858 INFO [ ome.logic.AdminImpl] (l.Server-9) Moved object to common space: ome.model.core.OriginalFile:Id_2943658 2023-03-27 10:00:11,858 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207984] time[3874] tag[omero.repo.file.move_to_common] 2023-03-27 10:00:11,859 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911211858] time[0] tag[omero.repo.file.find] 2023-03-27 10:00:11,859 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911211859] time[0] tag[omero.repo.file.check_group] 2023-03-27 10:00:12,387 INFO [ org.perf4j.TimingLogger] (l.Server-8) start[1679911208125] time[4262] tag[omero.repo.create_original_file.save] 2023-03-27 10:00:12,388 INFO [ org.perf4j.TimingLogger] (l.Server-8) start[1679911212388] time[0] tag[omero.repo.create_original_file.internal_mkdir] 2023-03-27 10:00:12,388 INFO [ org.perf4j.TimingLogger] (l.Server-8) start[1679911212388] time[0] tag[omero.repo.internal_register.load] 2023-03-27 10:00:12,388 INFO [ org.perf4j.TimingLogger] (l.Server-8) start[1679911212388] time[0] tag[omero.repo.internal_register.find_repo_files] 2023-03-27 10:00:13,001 INFO [ ome.services.blitz.fire.Ring] (2-thread-2) Checking cluster 2023-03-27 10:00:13,003 INFO [ ome.services.blitz.fire.Registry] (2-thread-2) Found 1 cluster node(s) : [ClusterNode/3cd415eb-d1f7-4d4e-970f-2c59b8ff4b9d -t -e 1.1:tcp -h 127.0.0.1 -p 40023 -t 60000] 2023-03-27 10:00:13,003 INFO [ ome.services.blitz.fire.Ring] (2-thread-2) Got 1 cluster uuids : [3cd415eb-d1f7-4d4e-970f-2c59b8ff4b9d] 2023-03-27 10:00:13,003 INFO [ ome.services.util.ServiceHandler] (2-thread-2) Executor.doWork -- ome.security.basic.NodeProviderInDb.getManagerList[] 2023-03-27 10:00:13,004 INFO [ ome.services.util.ServiceHandler] (2-thread-2) Args: [null, InternalSF@38784987] 2023-03-27 10:00:13,013 INFO [ ome.security.basic.EventHandler] (2-thread-2) Auth: user=0,group=0,event=null(Internal),sess=3cd415eb-d1f7-4d4e-970f-2c59b8ff4b9d 2023-03-27 10:00:13,016 INFO [ org.perf4j.TimingLogger] (2-thread-2) start[1679911213004] time[12] tag[omero.call.success.ome.security.basic.NodeProviderInDb$1.doWork] 2023-03-27 10:00:13,016 INFO [ ome.services.util.ServiceHandler] (2-thread-2) Rslt: (3cd415eb-d1f7-4d4e-970f-2c59b8ff4b9d) 2023-03-27 10:00:14,032 INFO [ ome.security.basic.CurrentDetails] (.Server-12) Adding log:INSERT,class ome.model.core.OriginalFile,2943664 2023-03-27 10:00:14,825 INFO [ org.perf4j.TimingLogger] (.Server-12) start[1679911208140] time[6684] tag[omero.repo.create_original_file.save] 2023-03-27 10:00:14,825 INFO [ org.perf4j.TimingLogger] (.Server-12) start[1679911214825] time[0] tag[omero.repo.create_original_file.internal_mkdir] 2023-03-27 10:00:14,825 INFO [ org.perf4j.TimingLogger] (.Server-12) start[1679911214825] time[0] tag[omero.repo.internal_register.load] 2023-03-27 10:00:14,826 INFO [ org.perf4j.TimingLogger] (.Server-12) start[1679911214825] time[0] tag[omero.repo.internal_register.find_repo_files] 2023-03-27 10:00:14,998 INFO [ ome.security.basic.CurrentDetails] (l.Server-9) Adding log:UPDATE,class ome.model.core.OriginalFile,2943662 2023-03-27 10:00:15,777 INFO [ ome.logic.AdminImpl] (l.Server-9) Moved object to common space: ome.model.core.OriginalFile:Id_2943662 2023-03-27 10:00:15,777 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911211859] time[3918] tag[omero.repo.file.move_to_common] 2023-03-27 10:00:15,777 INFO [ org.perf4j.TimingLogger] (l.Server-9) start[1679911207979] time[7798] tag[omero.repo.user_dir] 2023-03-27 10:00:15,778 INFO [ ome.services.util.ServiceHandler] (read-11650) Executor.doWork -- ome.services.sessions.SessionManagerImpl.reload[9da4d1e1-1d05-4e19-9ea7-0cf90e0a1c0f] ```

cc @jburel @joshmoore @sbesson

jburel commented 1 year ago

Relevant part

Caused by: java.lang.IllegalArgumentException: Invalid index: -1
  at loci.formats.FormatReader.coreIndexToSeries(FormatReader.java:1328)
       at loci.formats.FormatReader.getSeriesCount(FormatReader.java:963)
        at loci.formats.MetadataTools.populatePixels(MetadataTools.java:137)
       at loci.formats.MetadataTools.populatePixels(MetadataTools.java:116)
      at loci.formats.in.ZarrReader.initFile(ZarrReader.java:282)

cc @dgault

will-moore commented 1 year ago

@dgault Any ideas what's failing here? Am I missing a File in the Fileset, or pointing to the wrong one from the Pixels?

dgault commented 1 year ago

The exception here looks as though the reader has failed to create any series metadata at all.

The reader logic for that part of the code is as below:

So it seems to have failed quite early on just locating the .zgroup and .zarray files

Looking at the pathset you listed, the top level folder had 2 sets of zgroup and zattrs, do you know where the first 2 OME.zgroup and OME.zattrs come from?

OME.zgroup
OME.zattrs
.zattrs
.zgroup
will-moore commented 1 year ago

@dgault I "fixed" those paths above, so now in the web UI I see:

EDIT (31.3.2021 13:53 - after call with David): I see that a bunch of these are identical and WRONG! /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray

Paths on server:

/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/OME/METADATA.ome.xml
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/OME/.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/OME/.zattrs
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs

If I check they exist and look at the contents...

$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite -L 1080:localhost:80

$ cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/

[wmoore@pilot-idrtesting-omeroreadwrite Tonsil2.ome.zarr]$ ls -al OME/
total 12
drwxrwxr-x. 2 dlindner dlindner   60 Feb 17 13:27 .
drwxrwxr-x. 4 dlindner dlindner   56 Feb 17 13:27 ..
-rw-rw-r--. 1 dlindner dlindner 2391 Feb 17 13:27 METADATA.ome.xml
-rw-rw-r--. 1 dlindner dlindner   24 Feb 17 13:27 .zattrs
-rw-rw-r--. 1 dlindner dlindner   23 Feb 17 13:27 .zgroup

$ cat OME/.zattrs 
{
  "series" : [ "0" ]
}
$ cat OME/.zgroup 
{
  "zarr_format" : 2
}
dgault commented 1 year ago

So far I have been able to reproduce the same error using showinf when reading the dataset from pilot-idrtesting. If I copy the dataset locally using the exact same file structure then it reads just fine without the same issue. I will try to dig a bit further, seems something odd is going on.

dgault commented 1 year ago

The issue seems to be coming from within jzarr, it is able to find the attributes for the top level group but can't find any additional .group or .array files. The problem seems to be that the below code is not returning any matches, the internalRoot should be the top level folder and the suffix will be zgroup and zarray:

https://github.com/bcdev/jzarr/blob/master/src/main/java/com/bc/zarr/storage/FileSystemStore.java#L120-L123

I'm having a hard time reproducing the same issue, but having the OME/.zgroup file does cause some issues on occasion (though that failure looks different from the original stack trace).

will-moore commented 1 year ago

OK, I'm going to start from scratch....

ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite -L 1080:localhost:80

$ cd /ngff/idr0054

# in order to avoid path escaping issues, created a copy under `Tonsil_2.ome.zarr`

$ sudo cp -r Tonsil\ 2.ome.zarr/ Tonsil_2.ome.zarr/
$ ls -alh Tonsil_2.ome.zarr/OME/
total 12K
drwxr-xr-x. 2 root root   60 Mar 30 14:53 .
drwxr-xr-x. 4 root root   56 Mar 30 14:53 ..
-rw-r--r--. 1 root root 2.4K Mar 30 14:53 METADATA.ome.xml
-rw-r--r--. 1 root root   24 Mar 30 14:53 .zattrs
-rw-r--r--. 1 root root   23 Mar 30 14:53 .zgroup

$ source /opt/omero/server/venv3/bin/activate
$ export OMERODIR=/opt/omero/server/OMERO.server
$ omero login demo@localhost
$ omero import --transfer=ln_s --depth=10 -d 151 Tonsil_2.ome.zarr/OME/METADATA.ome.xml
...
2023-03-30 15:03:36,679 186064     [l.Client-0] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /data/ngff/idr0054/Tonsil_2.ome.zarr/OME/METADATA.ome.xml
Image:49072
Other imported objects:
Fileset:9403

==> Summary
444 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:03:03.448

I ran the import twice to give 2 images to compare...

Image:49073
Other imported objects:
Fileset:9404

==> Summary
444 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:02:02.928
will-moore commented 1 year ago

Test import without chunks...

$ cd Tonsil_2.ome.zarr
$ sudo find -type f -name '0' -delete
$ sudo find -type f -name '1' -delete
$ sudo find -type f -name '2' -delete
$ cd ../
$ omero import --transfer=ln_s --depth=10 -d 151 Tonsil_2.ome.zarr/OME/METADATA.ome.xml
...
2023-03-30 15:34:38,151 13100      [l.Client-0] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /data/ngff/idr0054/Tonsil_2.ome.zarr/OME/METADATA.ome.xml
Image:49074
Other imported objects:
Fileset:9405

==> Summary
12 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:00:10.810

Then replace the chunks by copying over as above...

sudo rm -rf Tonsil_2.ome.zarr/
sudo cp -r Tonsil\ 2.ome.zarr/ Tonsil_2.ome.zarr/

The previously-imported images (49072 and 49073) are showing OK - can render in viewer etc. But 49074, imported without chunks is NOT showing any pixel data, even though the chunks were added back later: http://localhost:1080/webclient/?show=image-49074

will-moore commented 1 year ago

Ooops - I was going to reproduce, but accidentally ran the delete chunk commands above from the parent /ngff/idr0054 directory instead of in Tonsil_2.ome.zarr, so this deleted original chunks!

dgault commented 1 year ago

I took a local copy I can transfer over if that helps

will-moore commented 1 year ago

I tried regenerating on pilot-zarr1-dev but had issues getting bioformats2raw setup. So Dom re-generated for me:

data/idr0054/Tonsil_2.zarr

Then I copied it to my home dir on pilot idrtesting, then copied to Dom's /data/idr0054...

$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite -L 1080:localhost:80
$ rsync -av  -e "ssh -A idr-pilot.openmicroscopy.org ssh" pilot-zarr1-dev:/data/idr0054/Tonsil_2.zarr . -P

$ cd /data/idr0054/
$ sudo cp -r /home/wmoore/Tonsil_2.zarr/ ./

$ ls
Tonsil 2.ome.zarr  Tonsil_2.ome.zarr  Tonsil_2.zarr

NB: re-generated data is Tonsil_2.zarr (no ome.).

Try to re-import... (x2)

source /opt/omero/server/venv3/bin/activate
export OMERODIR=/opt/omero/server/OMERO.server

omero import --transfer=ln_s --depth=10 -d 151 Tonsil_2.zarr/OME/METADATA.ome.xml

Image:49075
Other imported objects:
Fileset:9406
will-moore commented 1 year ago

Make a copy to try importing without chunks (again)...

sudo cp -r Tonsil_2.zarr/ Tonsil2.zarr/
cd Tonsil2.zarr
# only delete *some* chunks
sudo find -type f -name '0' -delete
$ omero import --transfer=ln_s --depth=10 -d 151 Tonsil2.zarr/OME/METADATA.ome.xml

2023-03-31 10:50:42,172 81924      [l.Client-0] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /data/ngff/idr0054/Tonsil2.zarr/OME/METADATA.ome.xml
Image:49077
Other imported objects:
Fileset:9408

==> Summary
228 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:01:19.628

The Image imports OK with missing chunks. Try to symlink the missing chunks (whole image) into managed repo...

Needed to use sudo to delete...

[wmoore@pilot-idrtesting-omeroreadwrite idr0054]$ cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116
[wmoore@pilot-idrtesting-omeroreadwrite 10-49-23.116]$ sudo rm -rf Tonsil2.zarr/

Then create symlink as omero-server:

$ sudo -u omero-server -s
$ cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116
$ ln -s /ngff/idr0054/Tonsil_2.zarr Tonsil2.zarr

This restores missing chunks to Image:49077 !

will-moore commented 1 year ago

New script: https://gist.github.com/will-moore/c1c13a79cad2a7e2ffe65eec18fe576c

Ran as above: https://github.com/IDR/idr-metadata/issues/652#issuecomment-1458544000

Ran several times, each time updating the FileSet on the image http://localhost:1080/webclient/?show=image-46035

$ python inplace_fileset.py 9410

followed by:

idr=> UPDATE pixels SET  name = '.zattrs',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr' where id = 46035;
UPDATE 1

webclient UI:

Paths on server:

demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/METADATA.ome.xml
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/.zgroup
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/.zattrs
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/4/.zarray
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/3/.zarray
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/2/.zarray
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/1/.zarray
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/0/.zarray
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/.zgroup
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/.zattrs
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/.zgroup
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/.zattrs

Error:

Traceback (most recent call last):

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 538, in wrapped
    retval = f(request, *args, **kwargs)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 597, in wrapper
    context = f(request, *args, **kwargs)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/webclient/views.py", line 1754, in load_metadata_preview
    rdefId = manager.image.getRenderingDefId()

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 7881, in wrapped
    if not self._prepareRenderingEngine() \

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 8157, in _prepareRenderingEngine
    self._re = self._prepareRE(rdid=rdid)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 8136, in _prepareRE
    re.load(ctx)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4796, in __call__
    return self.handle_exception(e, *args, **kwargs)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/webclient/webclient_gateway.py", line 2222, in handle_exception
    super(OmeroWebSafeCallWrapper, self).handle_exception(e, *args, **kwargs)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4793, in __call__
    return self.f(*args, **kwargs)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero_api_RenderingEngine_ice.py", line 1192, in load
    return _M_omero.api.RenderingEngine._op_load.invoke(self, ((), _ctx))

omero.ResourceError: exception ::omero::ResourceError
{
    serverStackTrace = ome.conditions.ResourceError: Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/.zattrs
    at ome.io.nio.PixelsService.createBfPixelBuffer(PixelsService.java:907)
    at ome.io.nio.PixelsService._getPixelBuffer(PixelsService.java:653)
    at ome.io.nio.PixelsService.getPixelBuffer(PixelsService.java:571)
    at ome.services.RenderingBean$12.doWork(RenderingBean.java:2205)
    at jdk.internal.reflect.GeneratedMethodAccessor327.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at ome.security.basic.EventHandler.invoke(EventHandler.java:154)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy100.doWork(Unknown Source)
    at ome.services.util.Executor$Impl.execute(Executor.java:447)
    at ome.services.util.Executor$Impl.execute(Executor.java:392)
    at ome.services.RenderingBean.getPixelBuffer(RenderingBean.java:2202)
    at ome.services.RenderingBean.load(RenderingBean.java:417)
    at jdk.internal.reflect.GeneratedMethodAccessor1647.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy136.load(Unknown Source)
    at jdk.internal.reflect.GeneratedMethodAccessor1647.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy136.load(Unknown Source)
    at jdk.internal.reflect.GeneratedMethodAccessor1715.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    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.RenderingEngineI.load_async(RenderingEngineI.java:316)
    at jdk.internal.reflect.GeneratedMethodAccessor1714.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at omero.cmd.CallContext.invoke(CallContext.java:85)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy138.load_async(Unknown Source)
    at omero.api._RenderingEngineTie.load_async(_RenderingEngineTie.java:248)
    at omero.api._RenderingEngineDisp.___load(_RenderingEngineDisp.java:1223)
    at omero.api._RenderingEngineDisp.__dispatch(_RenderingEngineDisp.java:2405)
    at IceInternal.Incoming.invoke(Incoming.java:221)
    at Ice.ConnectionI.invokeAll(ConnectionI.java:2536)
    at Ice.ConnectionI.dispatch(ConnectionI.java:1145)
    at Ice.ConnectionI.message(ConnectionI.java:1056)
    at IceInternal.ThreadPool.run(ThreadPool.java:395)
    at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
    at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832)
    at java.base/java.lang.Thread.run(Thread.java:829)

    serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/.zattrs
}

<WSGIRequest: GET '/webclient/metadata_preview/image/46035/?_=1680269059670'>
will-moore commented 1 year ago

Going to summarise the logic in latest script https://gist.github.com/will-moore/c1c13a79cad2a7e2ffe65eec18fe576c

will-moore commented 1 year ago

Thanks to @sbesson - We need to point the Pixels at the METADATA.ome.xml instead of the .zattrs. After this:

UPDATE pixels SET  name = 'METADATA.ome.xml',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME' where id = 46035;

Image at http://localhost:1080/webclient/?show=image-46035 is viewable!

Screenshot 2023-04-03 at 15 29 02

will-moore commented 1 year ago

So, I guess the next question is where to create the symlink from inside ManagedRepo to the in-place data...? E.g. if we're replacing a Fileset with paths like demo_2/2017-03/06/14-24-32.180/uod/idr/filesets/idr0033-rohban-pathways/20170214-original/images/41744/taoe005-u2os... what is the path we want to create? Do we create a new directory based on the date we're updating the Fileset?

will-moore commented 1 year ago

Trying now with a Plate: http://localhost:1080/webclient/?show=plate-251

Fileset: 9401

9597 Image files:
Imported from:
data/ngff/idr0011/Plate2-TS-Blue-B.ome.zarr/.zgroup
data/ngff/idr0011/Plate2-TS-Blue-B.ome.zarr/.zattrs
data/ngff/idr0011/Plate2-TS-Blue-B.ome.zarr/OME/METADATA.ome.xml
...

Paths on server:
demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr/B/2/0/2/0/0/3/0/0
demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr/A/7/0/1/0/1/7/0/0
...

Create symlink...

sudo -u omero-server -s
cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905
ln -s /data/ngff/idr0011/Plate2-TS-Blue-B.ome.zarr/ Plate2.zarr

$ ls -alh /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/
total 8.0K
drwxrwxr-x.  9 dlindner dlindner  101 Feb 16 11:20 .
drwxrwxr-x.  3 dlindner dlindner   70 Feb 16 11:20 ..
drwxrwxr-x.  8 dlindner dlindner   75 Feb 16 11:20 A
drwxrwxr-x.  8 dlindner dlindner   75 Feb 16 11:20 B
drwxrwxr-x.  8 dlindner dlindner   75 Feb 16 11:20 C
drwxrwxr-x.  9 dlindner dlindner   84 Feb 16 11:20 D
drwxrwxr-x. 10 dlindner dlindner   93 Feb 16 11:20 E
drwxrwxr-x.  9 dlindner dlindner   84 Feb 16 11:20 F
drwxrwxr-x.  2 dlindner dlindner   60 Feb 16 11:17 OME
-rw-rw-r--.  1 dlindner dlindner 3.7K Feb 16 11:20 .zattrs
-rw-rw-r--.  1 dlindner dlindner   23 Feb 16 11:17 .zgroup
sbesson commented 1 year ago

So, I guess the next question is where to create the symlink from inside ManagedRepo to the in-place data...? E.g. if we're replacing a Fileset with paths like demo_2/2017-03/06/14-24-32.180/uod/idr/filesets/idr0033-rohban-pathways/20170214-original/images/41744/taoe005-u2os... what is the path we want to create? Do we create a new directory based on the date we're updating the Fileset?

As we progress towards this workflow, I suggest a review of the implementation and the design choices of the duplicate server command would be valuable- see https://github.com/ome/omero-blitz/blob/v5.6.2/src/main/java/omero/cmd/graphs/DuplicateI.java. Obviously, there are differences as the duplicate command re-uses existing files and duplicates all the image graph while this command replaces the existing files of images. However, there are several similarities in the way the command modifies the managed repository and creates new filesets without going through the whole ImportLibrary.

will-moore commented 1 year ago

Created inplace_fileset3.py from https://gist.github.com/will-moore/80db375fcbee419de69d7152b00732bd

$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite
$ sudo -u omero-server -s
$ cd /opt/omero/server
$ source /opt/omero/server/venv3/bin/activate
$ python inplace_fileset3.py 9401 /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr

Created new_fileset 9412

Cleaned-up the printed output, to make it suitable to paste into a psql terminal:

psql output commands ``` UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48394; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48392; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48398; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48390; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48383; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48367; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48374; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48381; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48371; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48355; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48360; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48356; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48370; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48378; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48368; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48369; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48385; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48389; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48386; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48382; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48387; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48362; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48376; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48388; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48373; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48363; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48354; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48372; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48399; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48395; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48365; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48379; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48396; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48357; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48384; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48364; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48361; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48353; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48391; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48377; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48352; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48359; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48393; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48358; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48351; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48366; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48375; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48397; UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48380; ```

But trying to view an Image from the Plate gives:

    serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME/METADATA.ome.xml
will-moore commented 1 year ago

Checking a different Plate, I see that the Pixels path and name don't refer to the parent OME/METADATA.ome.xml but to the first chunk of an individual NGFF Image:

idr=> select path, name from Pixels where Image = 48865;
                                              path                                              | name 
------------------------------------------------------------------------------------------------+------
 demo_52/Blitz-0-Ice.ThreadPool.Server-7/2023-03/28/10-41-08.641/HT09.ome.zarr/A/10/0/0/0/0/0/0 | 0
(1 row)

So, let's try the same with image A1, from the plate above, which is Image:48351.

Get pixel ID...

idr=> select id, path, name from Pixels where Image = 48351;
  id   |                                      path                                       |       name       
-------+---------------------------------------------------------------------------------+------------------
 48351 | demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME | METADATA.ome.xml
UPDATE pixels SET  name = '0',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/A/1/0/0/0/0/0/0' where id = 48351;

Still failed with:

    serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/A/1/0/0/0/0/0/0/0
}
will-moore commented 1 year ago

I wondered whether setting the Pixels path and name to a file that is not an OriginalFile in the Fileset would cause a problem. So tried updating the inplace_fileset3.py to also include any file named "0".

Ran again as above:

$ python inplace_fileset3.py 9412 /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr
Created new_fileset 9413

Weclient UI says "9597 Image files:" in Fileset!

Didn't need to update Pixels with sql as it already points to the correct file. But still get this error:

    serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/A/1/0/0/0/0/0/0/0
}
<WSGIRequest: GET '/webclient/metadata_preview/image/48351/?_=1680533166904'>
will-moore commented 1 year ago

I just noticed that ALL Images for Plate:12 (idr0012-After) have the same path & name in Pixels. E.g. for Image at Field-2 of Well A4:

idr=> select path, name from Pixels where Image = 48866;
                                              path                                              | name 
------------------------------------------------------------------------------------------------+------
 demo_52/Blitz-0-Ice.ThreadPool.Server-7/2023-03/28/10-41-08.641/HT09.ome.zarr/A/10/0/0/0/0/0/0 | 0

This is the first OriginalFile in the Fileset:

   id    |                      clientpath                      | permissions | version | creation_id | external_id | group_id | owner_id | update_id | fileset | originalfile | fileset_index 
---------+------------------------------------------------------+-------------+---------+-------------+-------------+----------+----------+-----------+---------+--------------+---------------
 1136498 | data/ngff/idr0012/HT09.ome.zarr/A/10/0/0/0/0/0/0/0   |         -56 |         |     3980009 |             |        3 |       52 |   3980009 |    9402 |      3006254 |             0

So, we are probably wrong to try and guess the path from the Image (I was using path/to/first/chunk for image a A1 above). So, we want the first file in the Fileset...

idr=> select * from FilesetEntry where fileset = 9413 order by fileset_index;
   id    |                                                                          clientpath                                                                           | permissions | version | creation_id | external_id | group_id | owner_id | update_id | fileset | originalfile | fileset_index 
---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+---------+-------------+-------------+----------+----------+-----------+---------+--------------+---------------
 1153691 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/', '.zattrs', 3736, 'c75332d01920fcea5867c86fcf18234e854ff323']                 |         -56 |         |     4051303 |             |        3 |       52 |   4051303 |    9413 |      3025724 |             0

Update pixels:

UPDATE pixels SET  name = '.zattrs',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr' where id = 48351;

Still fails:

    serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/.zattrs
}
<WSGIRequest: GET '/webclient/metadata_preview/image/48351/?_=1680533167005'>
will-moore commented 1 year ago

Comparing with the successful Fileset replacement for Image above, where we set the Pixels path and name to the METADATA.ome.xml file. In that Fileset, the first OriginalFile is actually the Tonsil2.zarr/.zattrs.

So the Pixels doesn't always need to point to the first file in the Fileset:

idr=> select * from FilesetEntry where fileset = 9411 order by fileset_index;
   id    |                                                                          clientpath                                                                          | permissions | version | creation_id | external_id | group_id | owner_id | update_id | fileset | originalfile | fileset_index 
---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+---------+-------------+-------------+----------+----------+-----------+---------+--------------+---------------
 1153343 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/', '.zattrs', 33, '1a45bdb742869f84fd71ae0fd67f79f1b26923fe']                |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025376 |             0
 1153344 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/', '.zgroup', 23, '63de336a45370c236af207996ffd1bca2d7ae2f4']                |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025377 |             1
 1153345 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/', '.zattrs', 9024, 'd1081971a9fa36eab85dfc677c8d41fdbcd71ef8']            |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025378 |             2
 1153346 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/', '.zgroup', 23, '63de336a45370c236af207996ffd1bca2d7ae2f4']              |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025379 |             3
 1153347 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/0/', '.zarray', 328, 'a902050bf764318cdb65511209294d576723e7d2']           |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025380 |             4
 1153348 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/1/', '.zarray', 328, '5acab8b416b346283b6fe770c205aa40f92d784e']           |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025381 |             5
 1153349 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/2/', '.zarray', 324, '0be6b77260346499af5633a763571753660ee9ab']           |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025382 |             6
 1153350 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/3/', '.zarray', 324, 'daad3d12d69b2c5e1daa6499a2ac9d15027444fc']           |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025383 |             7
 1153351 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/4/', '.zarray', 324, '5d9f748f84e3e21f8e77d8b47e8742cacde376db']           |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025384 |             8
 1153352 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/', '.zattrs', 24, '156e48269827cb4611d5a3899d862c60c8f483f4']            |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025385 |             9
 1153353 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/', '.zgroup', 23, '63de336a45370c236af207996ffd1bca2d7ae2f4']            |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025386 |            10
 1153354 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/', 'METADATA.ome.xml', 2391, '8f01227852e065e2bd8ac6d82be8644654089898'] |         -56 |         |     4036097 |             |        3 |       52 |   4036097 |    9411 |      3025387 |            11
(12 rows)
UPDATE pixels SET  name = 'METADATA.ome.xml',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48351;

But that still fails:

 serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME/METADATA.ome.xml
}
<WSGIRequest: GET '/webclient/metadata_preview/image/48351/?_=1680533167026'>

cc @sbesson @dgault Any other ideas on what to try for Plates?

pwalczysko commented 1 year ago

@will-moore Not sure this is terribly helpful, but http://localhost:1080/webclient/?show=plate-201 (=idr0010) is another zarr plate which is a bit different than idr0012 which you are tackling at the moment. The "difference" is that it imported okay also with previous ZarrReader version (https://github.com/ome/ZarrReader/releases/tag/v0.3.0), whereas the idr0010 you are having now needs https://github.com/ome/ZarrReader/releases/tag/v0.3.1.

will-moore commented 1 year ago

Thanks @pwalczysko - I would have hoped that the Plate I was working with above would still be viewable on that server, since it has whatever update was needed to view it before I created a new Fileset. But, it might still be worth repeating my workflow on a new Plate, just to see if anything is different...

With Plate:201, (Fileset: 9351) webclient UI for a selected Image shows:

5009 Image files:

Imported from:
data/ngff/idr0010/108-24.ome.zarr/.zgroup
...
Paths on server:
demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/

Instead of creating a single symlink to the Plate, this time we'll just use the already existing symlinks under ManagedRepo:

Using script: https://gist.github.com/will-moore/63af9d29f740d17c88554d0c51ad45c5

$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite
$ sudo -u omero-server -s
$ cd
$ vi inplace_fileset4.py.   # entered script and saved 

$ source /opt/omero/server/venv3/bin/activate
$ python inplace_fileset4.py 9351 /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr
templatePrefix demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/
demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/ .zattrs 31596 9298ed04011c98372ed04f09a8626129456cc64a
...
Created new_fileset 9414

Since we haven't changed the path in ManagedRepo, we don't need to update Pixels.

Viewing an Image works!

Webclient UI now shows Fileset has 2705 Image files: since we don't have any chunks in new Fileset.

Just to check Pixels... - for Image at A1:

idr=> select * from Pixels where image = 45651;
  id   | permissions | methodology | physicalsizexunit | physicalsizex | physicalsizeyunit | physicalsizey | physicalsizezunit | physicalsizez |    sha1    | significantbits | sizec | sizet | sizex | sizey | sizez | timeincrementunit | timeincrement | version | waveincrement | wavestart | creation_id | external_id | group_id | owner_id | update_id | dimensio
norder | image | pixelstype | relatedto | image_index |                                               path                                               | name |                 repo                 
-------+-------------+-------------+-------------------+---------------+-------------------+---------------+-------------------+---------------+------------+-----------------+-------+-------+-------+-------+-------+-------------------+---------------+---------+---------------+-----------+-------------+-------------+----------+----------+-----------+---------
-------+-------+------------+-----------+-------------+--------------------------------------------------------------------------------------------------+------+--------------------------------------
 45651 |         -56 |             | µm                |             1 | µm                |             1 |                   |               | Pending... |              16 |     2 |     1 |   696 |   520 |     1 |                   |               |         |               |           |     3486499 |             |        3 |       52 |   3486499 |         
     1 | 45651 |          6 |           |           0 | demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/A/1/0/0/0/0/0/0 | 0    | 0bec1452-6c35-417c-8ec7-88f8305b2b08

This path/name is to the first chunk of that Image and is the same for ALL Images in the Plate! But that is different from the first OriginalFile in the Fileset:

idr=> select * from FilesetEntry where fileset = 9414 order by fileset_index;
   id    |                                              clientpath                                               | permissions | version | creation_id | external_id | group_id | owner_id | update_id | fileset | originalfile | fileset_index 
---------+-------------------------------------------------------------------------------------------------------+-------------+---------+-------------+-------------+----------+----------+-----------+---------+--------------+---------------
 1163288 | demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/.zattrs              |         -56 |         |     4054338 |             |        3 |       52 |   4054338 |    9414 |      3035321 |             0
 1163289 | demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/.zgroup              |         -56 |         |     4054338 |             |        3 |       52 |   4054338 |    9414 |      3035322 |             1

Screenshot 2023-04-04 at 11 25 40

will-moore commented 1 year ago

The Pixels for images in that Plate DO point to the first OriginalFile in the Fileset that got replaced (first chunk of first Image):

idr=> select * from FilesetEntry where fileset = 9351 order by fileset_index;
   id   |                       clientpath                       | permissions | version | creation_id | external_id | group_id | owner_id | update_id | fileset | originalfile | fileset_index 
--------+--------------------------------------------------------+-------------+---------+-------------+-------------+----------+----------+-----------+---------+--------------+---------------
 965551 | data/ngff/idr0010/108-24.ome.zarr/A/1/0/0/0/0/0/0/0    |         -56 |         |     3471440 |             |        3 |       52 |   3471440 |    9351 |      1046953 |             0
 965552 | data/ngff/idr0010/108-24.ome.zarr/A/1/0/0/0/1/0/0/0    |         -56 |         |     3471440 |             |        3 |       52 |   3471440 |    9351 |      1046954 |             1

So, we can replace Fileset:9351 (first File is first chunk of Image at A1) with a new Fileset: 9414 that contains NO chunks, and the Pixels for all Images still refer to path & name of the first chunk of Image at A1, and this works OK.

Let's try to update Pixels to point at first file of the Fileset or the METADATA.ome.xml'

UPDATE pixels SET  name = '.zattrs',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr' where id = 45651;
UPDATE 1
idr=> UPDATE pixels SET  name = 'METADATA.ome.xml',  path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/OME' where id = 45651;
UPDATE 1

This Image is still working & viewable for BOTH of these (doesn't work if I add a typo etc).

So, OMERO/Bio-Formats doesn't seem too picky about which file in Fileset is named in Pixels. You can even name a File that isn't in the Fileset (e.g. first chunk).

This appears to differ for a Plate from the behaviour for an Image above, where updating the Pixels seemed necessary to be able to view the Image...?

will-moore commented 1 year ago

Returning to Plate: http://localhost:1080/webclient/?show=plate-251 Let's try to use the original symlinks created for the original in-place import...

Fileset: 9413 created above

demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr
$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite
$ sudo -u omero-server -s
$ cd
$ source /opt/omero/server/venv3/bin/activate
$ python inplace_fileset4.py 9413 /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr
templatePrefix demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/
demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr/ .zattrs 3736 c75332d01920fcea5867c86fcf18234e854ff323
...
Created new_fileset 9416
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48364;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48360;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48382;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48377;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48379;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48390;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48373;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48386;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48368;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48376;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48359;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48355;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48397;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48371;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48378;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48380;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48396;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48370;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48384;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48367;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48358;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48387;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48388;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48398;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48374;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48372;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48354;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48393;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48399;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48375;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48365;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48361;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48351;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48385;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48381;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48383;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48394;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48395;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48357;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48363;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48362;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48366;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48391;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48356;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48352;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48389;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48392;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48353;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48369;

Ran the sql commands and now ALL images are viewable!

will-moore commented 1 year ago

Want to try replace older fileset on a different server.... (idr0125-pilot):

First copy plate to wmoore home dir, then move to /ngff/idr0010 and chown to omero-server

$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idr0125-omeroreadwrite
$ rsync -av  -e "ssh -A idr-pilot.openmicroscopy.org ssh" idrtesting-omeroreadwrite:/data/ngff/idr0010/108-24.ome.zarr . -P
...
108-24.ome.zarr/OME/METADATA.ome.xml
      1,662,776 100%   17.05MB/s    0:00:00 (xfr#5009, to-chk=0/15007)

sent 145,579 bytes  received 700,071,909 bytes  5,129,798.45 bytes/sec
total size is 699,350,326  speedup is 1.00

$ sudo mkdir -p /ngff/idr0010
$ sudo mv 108-24.ome.zarr /ngff/idr0010/
$ sudo chown -R omero-server /ngff/

Create symlinks:

Existing data is at demo_2/2016-10/06/15-48-26.590/metadata/idr0010-doil-dnadamage/screenA/plates/108-24.pattern

$ sudo -u omero-server -s
$ cd /data/OMERO/ManagedRepository/demo_2/2016-10/06/15-48-26.590/
$ ln -s /ngff/idr0010/108-24.ome.zarr 108-24.ome.zarr

$ ls -alh /data/OMERO/ManagedRepository/demo_2/2016-10/06/15-48-26.590/108-24.ome.zarr/
total 84K
drwxrwxr-x. 15 omero-server wmoore  155 Feb 16 11:08 .
drwxr-xr-x.  3 omero-server root     29 Apr  4 14:48 ..
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 A
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 B
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 C
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 D
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 E
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 F
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 G
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 H
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 I
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 J
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 K
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 L
drwxrwxr-x.  2 omero-server wmoore   60 Feb 16 10:47 OME
-rw-rw-r--.  1 omero-server wmoore  31K Feb 16 11:08 .zattrs
-rw-rw-r--.  1 omero-server wmoore   23 Feb 16 10:47 .zgroup

Setup psql...

$ source /opt/omero/server/venv3/bin/activate
$ export OMERODIR=/opt/omero/server/OMERO.server
$ omero config get --show-password
$ PGPASSWORD=****** psql -U omero -d idr -h 192.168.10.102

idr=> select * from Image where id = 3053484;
   id    |   acquisitiondate   | archived | description | permissions |       name        | partial | series | version | creation_id | external_id | group_id | owner_id | update_id | experiment | fileset | format | imagingenvironment | instrument | objectivesettings | stagelabel 
---------+---------------------+----------+-------------+-------------+-------------------+---------+--------+---------+-------------+-------------+----------+----------+-----------+------------+---------+--------+--------------------+------------+-------------------+------------
 3053484 | 2007-05-20 13:24:22 |          |             |         -56 | 108-24 [Scan A01] |         |      0 |         |    55956349 |             |        3 |        2 |  55956349 |            |   22281 |    118 |            1335887 |      12113 |             11663 |           
(1 row)

idr=> select * from Fileset where id = 22281;
  id   | permissions |         templateprefix          | version | creation_id | external_id | group_id | owner_id | update_id 
-------+-------------+---------------------------------+---------+-------------+-------------+----------+----------+-----------
 22281 |         -56 | demo_2/2016-10/06/15-48-26.590/ |         |    55956337 |             |        3 |        2 |  55956337

Fileset: 22281

Create new Fileset.... using inplace_fileset4.py

$ sudo -u omero-server -s
$ cd
$ vi inplace_fileset4.py
$ source /opt/omero/server/venv3/bin/activate
$ python inplace_fileset4.py 22281 /data/OMERO/ManagedRepository/demo_2/2016-10/06/15-48-26.590/108-24.ome.zarr

Just want to update Pixels for 1 image to start...

idr=> select * from Pixels where image = 3053484;
   id    | permissions | methodology | physicalsizexunit | physicalsizex | physicalsizeyunit | physicalsizey | physicalsizezunit | physicalsizez |                   sha1                   | significantbits | sizec | sizet | sizex | sizey | sizez | timeincrementunit | timeincrement | version | waveincrement | wavestart | creation_id | external_id | group_id |
 owner_id | update_id | dimensionorder |  image  | pixelstype | relatedto | image_index |                                     path                                      |      name      |                 repo                 
---------+-------------+-------------+-------------------+---------------+-------------------+---------------+-------------------+---------------+------------------------------------------+-----------------+-------+-------+-------+-------+-------+-------------------+---------------+---------+---------------+-----------+-------------+-------------+----------+
----------+-----------+----------------+---------+------------+-----------+-------------+-------------------------------------------------------------------------------+----------------+--------------------------------------
 3053484 |         -56 |             | µm                |             1 | µm                |             1 |                   |               | 76eef7bf7e02c951f4293197be7047d38aa5955c |              16 |     2 |     1 |   696 |   520 |     1 |                   |               |         |               |           |    55956349 |             |        3 |
        2 |  55956895 |              1 | 3053484 |          6 |           |           0 | demo_2/2016-10/06/15-48-26.590/metadata/idr0010-doil-dnadamage/screenA/plates | 108-24.pattern | cdf35825-def1-4580-8d0b-9c349b8f78d6
(1 row)

UPDATE pixels SET name = '.zattrs', path = 'demo_2/2016-10/06/15-48-26.590/108-24.ome.zarr' where id = 3053484;

But no joy:

    serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/2016-10/06/15-48-26.590/108-24.ome.zarr/.zattrs
}
<WSGIRequest: GET '/webclient/metadata_preview/image/3053484/?_=1680618681730'>

Also tried pointing to METADATA.ome.xml but no:

    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/2016-10/06/15-48-26.590/108-24.ome.zarr/OME/METADATA.ome.xml
will-moore commented 1 year ago

Let's try the NGFF Image above (Tonsil 2) to replace Fileset on idr0125...

Copy data...

$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idr0125-omeroreadwrite -L 1080:localhost:80
$ rsync -av  -e "ssh -A idr-pilot.openmicroscopy.org ssh" idrtesting-omeroreadwrite:/ngff/idr0054/Tonsil_2.zarr . -P
...
sent 11,288 bytes  received 132,163,326 bytes  6,778,185.33 bytes/sec
total size is 132,095,381  speedup is 1.00

$ sudo mkdir -p /ngff/idr0054
$ sudo mv Tonsil_2.zarr /ngff/idr0054/
$ sudo chown -R omero-server /ngff/idr0054

Create symlink:

Existing data is at demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil 2.pattern

$ sudo -u omero-server -s
$ cd /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081
$ ln -s /ngff/idr0054/Tonsil_2.zarr Tonsil_2.zarr

$ ls -alh /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/
total 8.0K
drwxr-xr-x. 4 omero-server wmoore 56 Mar 31 10:24 .
drwxr-xr-x. 3 omero-server root   27 Apr  5 05:50 ..
drwxr-xr-x. 7 omero-server wmoore 81 Mar 31 10:24 0
drwxr-xr-x. 2 omero-server wmoore 60 Mar 31 10:24 OME
-rw-r--r--. 1 omero-server wmoore 33 Mar 31 10:24 .zattrs
-rw-r--r--. 1 omero-server wmoore 23 Mar 31 10:24 .zgroup

Fileset: 1591302

idr=> select * from Image where id = 5025552;
   id    | acquisitiondate | archived | description | permissions |   name   | partial | series | version | creation_id | external_id | group_id | owner_id | update_id | experiment | fileset | format | imagingenv
ironment | instrument | objectivesettings | stagelabel 
---------+-----------------+----------+-------------+-------------+----------+---------+--------+---------+-------------+-------------+----------+----------+-----------+------------+---------+--------+-----------
---------+------------+-------------------+------------
 5025552 |                 |          |             |         -56 | Tonsil 2 |         |      0 |         |   131911941 |             |        3 |        2 | 131911941 |            | 1591302 |    118 |           
         |            |                   |           

idr=> select * from Fileset where id = 1591302;
   id    | permissions |                          templateprefix                          | version | creation_id | external_id | group_id | owner_id | update_id 
---------+-------------+------------------------------------------------------------------+---------+-------------+-------------+----------+----------+-----------
 1591302 |         -56 | demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/ |         |   131911854 |             |        3 |        2 | 131911854
(1 row)

Create new Fileset.... using inplace_fileset4.py

sudo -u omero-server -s
$ cd
$ source /opt/omero/server/venv3/bin/activate
$ python inplace_fileset4.py 1591302 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr

templatePrefix demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/ .zattrs 33 1a45bdb742869f84fd71ae0fd67f79f1b26923fe
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/ .zattrs 9024 d1081971a9fa36eab85dfc677c8d41fdbcd71ef8
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/0/ .zarray 328 a902050bf764318cdb65511209294d576723e7d2
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/1/ .zarray 328 5acab8b416b346283b6fe770c205aa40f92d784e
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/2/ .zarray 324 0be6b77260346499af5633a763571753660ee9ab
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/3/ .zarray 324 daad3d12d69b2c5e1daa6499a2ac9d15027444fc
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/4/ .zarray 324 5d9f748f84e3e21f8e77d8b47e8742cacde376db
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/OME/ .zattrs 24 156e48269827cb4611d5a3899d862c60c8f483f4
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/OME/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/OME/ METADATA.ome.xml 2391 8f01227852e065e2bd8ac6d82be8644654089898
Created new_fileset 5286811
UPDATE pixels SET name = '.zattrs', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr' where id = 5025552;
idr=> select * from Pixels where image = 5025552;
   id    | permissions | methodology | physicalsizexunit | physicalsizex | physicalsizeyunit | physicalsizey | physicalsizezunit | physicalsizez |    sha1    | significantbits | sizec | sizet | sizex | sizey | si
zez | timeincrementunit | timeincrement | version | waveincrement | wavestart | creation_id | external_id | group_id | owner_id | update_id | dimensionorder |  image  | pixelstype | relatedto | image_index |     
                         path                               |       name       |                 repo                 
---------+-------------+-------------+-------------------+---------------+-------------------+---------------+-------------------+---------------+------------+-----------------+-------+-------+-------+-------+---
----+-------------------+---------------+---------+---------------+-----------+-------------+-------------+----------+----------+-----------+----------------+---------+------------+-----------+-------------+-----
------------------------------------------------------------+------------------+--------------------------------------
 5025552 |         -56 |             |                   |               |                   |               |                   |               | Pending... |               8 |    27 |     1 |  2701 |  2701 |   
  1 |                   |               |         |               |           |   131911941 |             |        3 |        2 | 131911941 |              1 | 5025552 |          5 |           |           0 | demo
_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081 | Tonsil 2.pattern | cdf35825-def1-4580-8d0b-9c349b8f78d6
(1 row)

idr=> UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/OME' where id = 5025552;
UPDATE 1

But this fails:

    serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/OME/METADATA.ome.xml
}
<WSGIRequest: GET '/webclient/metadata_preview/image/5025552/?_=1680673769376'>
will-moore commented 1 year ago

To check if idr0125-pilot has ZarrReader that can read Tonsil_2.zarr,

$ omero import -d 5601 --depth=100 --transfer=ln_s --skip=all Tonsil_2.zarr/OME/METADATA.ome.xml

Image:14706104
Other imported objects:
Fileset:5286812

==> Summary
444 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:04:05.114

This is viewable OK. So, lets use the symlinks created during that import to create a NEW Fileset for the original image...

Replace the NGFF Fileset we created above: Fileset: 5286811 with a new one, using symlinks created at demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/ by the import we've just run...

Still as omero-server user:

$ cd
$ python inplace_fileset4.py 5286811 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr
templatePrefix demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/ .zattrs 33 1a45bdb742869f84fd71ae0fd67f79f1b26923fe
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/OME/ METADATA.ome.xml 2391 8f01227852e065e2bd8ac6d82be8644654089898
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/OME/ .zattrs 24 156e48269827cb4611d5a3899d862c60c8f483f4
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/OME/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/ .zattrs 9024 d1081971a9fa36eab85dfc677c8d41fdbcd71ef8
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/0/ .zarray 328 a902050bf764318cdb65511209294d576723e7d2
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/1/ .zarray 328 5acab8b416b346283b6fe770c205aa40f92d784e
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/2/ .zarray 324 0be6b77260346499af5633a763571753660ee9ab
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/3/ .zarray 324 daad3d12d69b2c5e1daa6499a2ac9d15027444fc
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/4/ .zarray 324 5d9f748f84e3e21f8e77d8b47e8742cacde376db
Created new_fileset 5286813
UPDATE pixels SET name = '.zattrs', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr' where id = 5025552;

Update Pixels to point to METADATA.ome.xml

idr=> UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/OME' where id = 5025552;
UPDATE 1

This works!

Screenshot 2023-04-05 at 10 35 04

However, the image looks a bit different from previous thumbnail - more grainy?!

Template-prefix in this Fileset is the same as the Original Fileset. Seems not to matter that it is now different from the paths of the OriginalFiles in the Fileset.