Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace existing Fileset with NGFF Fileset #652

Open
will-moore opened this issue Feb 23, 2023 · 68 comments
Open

Replace existing Fileset with NGFF Fileset #652

will-moore opened this issue Feb 23, 2023 · 68 comments

Comments

@will-moore
Copy link
Member

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
Copy link
Member

jburel commented Feb 23, 2023

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
Copy link
Member Author

will-moore commented Feb 23, 2023

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
Copy link
Member

jburel commented Feb 23, 2023

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
Copy link
Member Author

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
Copy link
Member Author

will-moore commented Mar 6, 2023

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
Copy link
Member Author

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
Copy link
Member Author

will-moore commented Mar 6, 2023

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
Copy link
Member Author

will-moore commented Mar 6, 2023

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

will-moore commented Mar 7, 2023

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
Copy link
Member Author

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
}

<WSGIRequest: GET '/webclient/metadata_preview/image/46035/?_=1678226804231'>

@will-moore
Copy link
Member Author

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
Copy link
Member

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

@joshmoore
Copy link
Member

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
Copy link
Member Author

"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
Copy link
Member Author

will-moore commented Mar 13, 2023

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.<init>(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
Copy link
Member Author

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
}

<WSGIRequest: GET '/webclient/metadata_preview/image/46035/?_=1679392109084'>

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
Copy link
Member Author

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
Copy link
Member Author

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.<init>(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
Copy link
Member

jburel commented Mar 27, 2023

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
Copy link
Member Author

@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
Copy link

dgault commented Mar 30, 2023

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:

  • find the root .zarr folder from the initial supplied id
  • from the top level group file find the array keys (locating the .zarray files)
  • for each key the reader will create metadata

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
Copy link
Member Author

will-moore commented Mar 30, 2023

@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
Copy link

dgault commented Mar 30, 2023

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
Copy link

dgault commented Mar 30, 2023

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link

dgault commented Mar 30, 2023

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

@will-moore
Copy link
Member Author

will-moore commented Apr 4, 2023

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
Copy link
Member Author

will-moore commented Apr 4, 2023

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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.

@will-moore
Copy link
Member Author

Summary

For Image: 5025552 (idr0054/Tonsil 2) on idr0125-pilot I have managed to replace the Fileset based on Tonsil 2.pattern with an NGFF Fileset. The major outstanding issue is that this uses symlinks created in the ManagedRepo by a regular in-place import of the NGFF Image.

Steps taken (see details in previous comment #652 (comment)):

  • Perform regular in-place import of the NGFF Image
  • Use the /data/OMERO/ManagedRepository/...path/to.../Tonsil_2.zarr symlink created by that import to...
  • run a python script that
    • creates OriginalFiles and a new Fileset with all the non-chunk files in that directory
    • For each Image in the Fileset - replace old Fileset with new Fileset
  • Run psql command to update the Pixels: path = ...path/to.../Tonsil_2.zarr/OME, name = "METADATA.ome.xml"

This allows the previously broken image to be viewable with the new NGFF Fileset.
However, when I manually create a symlink myself (as omero-server user) from within the ManagedRepo to the parent /ngff/idr0054/Tonsil_2.zarr directory, and then perform all the other steps in the same way, this always fails.

A similar status was achieved on pilot-idrtesting with a Plate from idr0010, but again, this used symlinks created when the plate was imported (and it also replaced the existing NGFF Fileset, rather than .pattern Fileset which doesn't exist on that server.

@will-moore
Copy link
Member Author

Discussion today @jburel @sbesson @dgault @pwalczysko @dominikl

In fullness of time, we might want a single command to do everything:

$ omero import path/to/image.zarr  —In-s transfer —fileset_replace 123

But in the meantime, let's focus on using omero import to create the Fileset, then simply replace old Fileset with new (so the python script becomes much simpler).

Also, let's perform the original import without chunks.
See #652 (comment)

@will-moore
Copy link
Member Author

will-moore commented Apr 6, 2023

Going to try omero import followed by Fileset replacement on idr0125-pilot with Plate from idr0010.
http://localhost:1080/webclient/?show=plate-5731

Fileset: 5286810

Plate was copied over already in #652 (comment) to
/ngff/idr0010/108-24.ome.zarr

Let's create a copy, then delete chunks from the original (that we are going to import)...

$ sudo -u omero-server -s
$ cd /ngff/idr0010/
$ cp -r 108-24.ome.zarr/ 108-24_chunks.ome.zarr/

# NB: count and delete chunks from ONLY the original copy!
$ cd 108-24.ome.zarr
$ find -type f -name '0' | wc
   2304    2304   47736
$ find -type f -name '1' | wc
      0       0       0
$ find -type f -name '0' -delete

# import...
$ cd ../
$ source /opt/omero/server/venv3/bin/activate
$ export OMERODIR=/opt/omero/server/OMERO.server
$ omero import --transfer=ln_s --depth=10 --skip=all 108-24.ome.zarr
...
2023-04-06 11:57:32,291 1448192    [l.Client-0] INFO   ormats.importer.cli.LoggingImportMonitor - OBJECTS_RETURNED Step: 5 of 5  Logfile: 48785699
2023-04-06 11:57:32,662 1448563    [l.Client-2] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /ngff/idr0010/108-24.ome.zarr/OME/METADATA.ome.xml
Plate:10201
Other imported objects:
Fileset:5286814

==> Summary
2705 files uploaded, 1 fileset, 1 plate created, 384 images imported, 0 errors in 0:23:59.708

Now replace the Fileset for every image...

$ cd
$ vi swap_fileset.py.   # paste in script below
$ python swap_fileset.py 5286810 5286814
swap_fileset.py
import argparse
import sys

import omero.clients
from omero.cli import cli_login
from omero.gateway import BlitzGateway


def main(argv):
    parser = argparse.ArgumentParser()

    parser.add_argument('old_fileset', type=int, help='Fileset to replace')
    parser.add_argument('new_fileset', type=int, help='New Fileset')
    args = parser.parse_args(argv)

    with cli_login() as cli:
        conn = BlitzGateway(client_obj=cli._client)

        old_fileset = conn.getObject("Fileset", args.old_fileset)
        new_fileset = conn.getObject("Fileset", args.new_fileset)

        first_file = new_fileset.listFiles()[0]
        file_path = first_file.getPath()
        file_name = first_file.getName()

        if new_fileset is None:
            print ('new Fileset id not found: %s' % args.new_fileset)
            sys.exit(1)

        pixel_ids = []
        for image in old_fileset.copyImages():
            img = image._obj
            img.fileset = omero.model.FilesetI(new_fileset.val, False)
            conn.getUpdateService().saveObject(img, conn.SERVICE_OPTS)

            # Print the HQL updates we need to update each Pixels to new Fileset file
            pixel_ids.append(str(image.getPixelsId()))

        pids = ", ".join(pixel_ids)
        print(f"UPDATE pixels SET name = '{file_name}', path = '{file_path}' where id in ({pids});")

if __name__ == '__main__':
    main(sys.argv[1:])

Script above needs a tiny tweak to get the exact correct sql we need below - path should be only to /108-24.ome.zarr (not to nested file)

UPDATE pixels SET name = '.zattrs', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-28/2023-04/06/11-33-33.351/108-24.ome.zarr' where id in (3053749, 3053685, 3053574, 3053555, 3053527, 3053796, 3053856, 3053807, 3053635, 3053730, 3053752, 3053604, 3053678, 3053564, 3053842, 3053799, 3053729, 3053637, 3053742, 3053512, 3053864, 3053526, 3053489, 3053746, 3053845, 3053761, 3053684, 3053608, 3053610, 3053560, 3053812, 3053756, 3053565, 3053720, 3053668, 3053552, 3053525, 3053634, 3053577, 3053488, 3053640, 3053536, 3053791, 3053690, 3053846, 3053769, 3053535, 3053823, 3053786, 3053695, 3053800, 3053763, 3053834, 3053580, 3053710, 3053850, 3053738, 3053826, 3053589, 3053683, 3053621, 3053546, 3053705, 3053556, 3053677, 3053658, 3053659, 3053727, 3053784, 3053646, 3053487, 3053739, 3053759, 3053495, 3053724, 3053600, 3053494, 3053767, 3053664, 3053774, 3053613, 3053811, 3053701, 3053866, 3053776, 3053702, 3053671, 3053562, 3053681, 3053502, 3053619, 3053760, 3053704, 3053599, 3053519, 3053491, 3053496, 3053614, 3053718, 3053766, 3053582, 3053665, 3053558, 3053529, 3053820, 3053747, 3053748, 3053618, 3053586, 3053632, 3053499, 3053757, 3053743, 3053514, 3053607, 3053789, 3053592, 3053517, 3053732, 3053498, 3053639, 3053802, 3053643, 3053772, 3053611, 3053804, 3053656, 3053572, 3053819, 3053852, 3053782, 3053764, 3053849, 3053785, 3053583, 3053680, 3053534, 3053696, 3053508, 3053550, 3053500, 3053505, 3053575, 3053660, 3053795, 3053573, 3053595, 3053591, 3053814, 3053485, 3053533, 3053805, 3053636, 3053553, 3053571, 3053841, 3053594, 3053692, 3053765, 3053673, 3053817, 3053779, 3053576, 3053630, 3053847, 3053815, 3053497, 3053578, 3053588, 3053532, 3053691, 3053670, 3053597, 3053837, 3053567, 3053547, 3053554, 3053860, 3053679, 3053858, 3053745, 3053652, 3053829, 3053778, 3053721, 3053598, 3053617, 3053862, 3053794, 3053627, 3053675, 3053513, 3053657, 3053688, 3053616, 3053768, 3053735, 3053822, 3053840, 3053827, 3053566, 3053503, 3053780, 3053863, 3053603, 3053518, 3053484, 3053813, 3053645, 3053716, 3053542, 3053522, 3053543, 3053663, 3053638, 3053703, 3053669, 3053838, 3053615, 3053854, 3053651, 3053662, 3053510, 3053563, 3053528, 3053803, 3053689, 3053700, 3053539, 3053515, 3053631, 3053699, 3053855, 3053698, 3053561, 3053666, 3053865, 3053758, 3053694, 3053712, 3053601, 3053706, 3053744, 3053835, 3053626, 3053793, 3053531, 3053770, 3053540, 3053731, 3053853, 3053559, 3053548, 3053833, 3053655, 3053723, 3053741, 3053501, 3053806, 3053551, 3053787, 3053590, 3053492, 3053521, 3053545, 3053707, 3053737, 3053788, 3053708, 3053714, 3053661, 3053844, 3053825, 3053810, 3053593, 3053649, 3053753, 3053541, 3053839, 3053568, 3053605, 3053581, 3053538, 3053777, 3053751, 3053490, 3053530, 3053641, 3053644, 3053750, 3053507, 3053843, 3053728, 3053674, 3053719, 3053516, 3053486, 3053848, 3053648, 3053520, 3053506, 3053792, 3053557, 3053711, 3053579, 3053722, 3053851, 3053623, 3053628, 3053672, 3053606, 3053549, 3053790, 3053798, 3053693, 3053762, 3053612, 3053682, 3053609, 3053824, 3053754, 3053717, 3053734, 3053584, 3053544, 3053797, 3053867, 3053524, 3053504, 3053713, 3053629, 3053828, 3053830, 3053697, 3053821, 3053831, 3053633, 3053686, 3053642, 3053587, 3053836, 3053537, 3053775, 3053736, 3053740, 3053687, 3053733, 3053620, 3053816, 3053624, 3053857, 3053771, 3053809, 3053861, 3053755, 3053650, 3053773, 3053622, 3053569, 3053783, 3053596, 3053832, 3053808, 3053570, 3053523, 3053585, 3053625, 3053493, 3053509, 3053859, 3053726, 3053653, 3053801, 3053781, 3053709, 3053667, 3053818, 3053647, 3053602, 3053511, 3053654, 3053676, 3053715, 3053725);
UPDATE 384

All images are viewable and BLACK (no chunks)
Replace no-chunks copy with chunks...

cd /ngff/idr0010/
rm -rf 108-24.ome.zarr
mv 108-24_chunks.ome.zarr 108-24.ome.zarr

Ah - but this doesn't rescue the chunks, because we are using symlinks to individual files (.zattrs etc) NOT to a directory that contains chunks.

So, create symlink in ManageRepo as before...

cd /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-28/2023-04/06/11-33-33.351/
rm -rf 108-24.ome.zarr/
ln -s /ngff/idr0010/108-24.ome.zarr 108-24.ome.zarr

This works - Images in Plate are viewable!

Cleanup... Delete old Fileset (no-longer linked to any Images)

$ omero delete --report Fileset:5286810
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
omero.cmd.Delete2 Fileset:5286810 ok
Steps: 6
Elapsed time: 7.102 secs.
Flags: []
Deleted objects
  OriginalFile:48780086-48782790
  Fileset:5286810
  FilesetEntry:34999854-35002558

Checking delete of newly-created Plate and Images, which we don't want:

$ omero delete --report --dry-run Plate:10201
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
omero.cmd.Delete2 Plate:10201 Dry run performed
ok
Steps: 4
Elapsed time: 4.781 secs.
Flags: []
Deleted objects
  Plate:10201
  Well:2253301-2253684
  WellSample:9106501-9106884

This won't delete the Images...
Tried a couple of Images (obtained via the webclient):
Dry-run delete fails for different reasons:

(venv3) bash-4.2$ omero delete --report --dry-run Image:14706105
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
omero.cmd.Delete2 Image:14706105 failed: 'graph-fail'
failed: may not delete Image[14706105] while WellSample[9106884] remains
Steps: 4
Elapsed time: 5.905 secs.
Flags: [FAILURE, CANCELLED]
(venv3) bash-4.2$ omero delete --report --dry-run Image:14706336
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
omero.cmd.Delete2 Image:14706336 failed: 'graph-fail'
failed: within Fileset[5286814] may not delete Image[14706336] while Image[14706339] remains
Steps: 4
Elapsed time: 1.551 secs.
Flags: [FAILURE, CANCELLED]

@will-moore
Copy link
Member Author

To fix cleanup, I created a dummy Fileset and linked all Images from the newly created Plate to it...

plate_link_to_fileset.py
import argparse
import sys

import omero.clients
from omero.cli import cli_login
from omero.gateway import BlitzGateway

def main(argv):
    parser = argparse.ArgumentParser()

    parser.add_argument('plate_id', type=int, help='Plate containing Images to link to new Fileset')
    args = parser.parse_args(argv)

    with cli_login() as cli:
        conn = BlitzGateway(client_obj=cli._client)

        new_fileset = omero.model.FilesetI()
        new_fileset.templatePrefix = omero.rtypes.rstring("temp")

        update = conn.getUpdateService()
        new_fileset = update.saveAndReturnObject(new_fileset)
        print("Created new_fileset", new_fileset.id.val)

        plate = conn.getObject("Plate", args.plate_id)
        for well in plate.listChildren():
            for ws in well.listChildren():
                img = ws.getImage()._obj
                img.fileset = omero.model.FilesetI(new_fileset.id.val, False)
                conn.getUpdateService().saveObject(img, conn.SERVICE_OPTS)
                print("image updated", img.id.val)

if __name__ == '__main__':
    main(sys.argv[1:])
$ python plate_link_to_fileset.py 10201
Created new_fileset 5286815
image updated 14706105
...

This allows us to delete the Plate etc.

$ omero delete --report Plate:10201
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
omero.cmd.Delete2 Plate:10201 Dry run performed
ok
Steps: 4
Elapsed time: 5.821 secs.
Flags: []
Deleted objects
  Detector:155351
  DetectorSettings:51301
  ImagingEnvironment:1572051-1572434
  Instrument:145951
  Laser:21901-22284
  Channel:43775390-43776157
  Image:14706105-14706488
  LogicalChannel:16074340,16074341
  Pixels:14706105-14706488
  PlaneInfo:45062501-45062884
  Fileset:5286815
  Plate:10201
  Well:2253301-2253684
  WellSample:9106501-9106884

To avoid the need for plate_link_to_fileset.py in future, we could link newly created Images to the old_fileset in swap_fileset.py above, then delete the whole new_plate and old_fileset in one.

@will-moore
Copy link
Member Author

will-moore commented Apr 6, 2023

Created bucket:

$ aws --endpoint-url https://uk1s3.embassy.ebi.ac.uk s3 mb s3://idr0010
make_bucket: idr0010

And updated Policy as at https://github.com/IDR/deployment/blob/master/docs/object-store.md#policy (NB: replace idr0000 with idr0010 in that example)

NB: Seb has mounted s3 on idr0125-pilot for idr0010 and idr0012:

[sbesson@pilot-idr0125-omeroreadwrite ~]$ ls -alh /idr0010
total 8.0K
drwxr-xr-x.  2 root root 4.0K Apr  6 14:40 .
dr-xr-xr-x. 25 root root 4.0K Apr  6 14:39 ..

To check ZarrReader version:

[sbesson@pilot-idr0125-omeroreadwrite ~]$ unzip -qc /opt/omero/server/OMERO.server/lib/server/OMEZarrReader.jar META-INF/MANIFEST.MF | grep Version
Manifest-Version: 1.0
Implementation-Version: 0.3.0
Archiver-Version: Plexus Arc

"I can re-execute the playbook there tomorrow morning if you want"

@will-moore
Copy link
Member Author

Now we have ALL 68 idr0012 Plates converted to NGFF, copied to s3 and mounted on pilot-idr0125 at /idr0012/.
See #643

Let's start by copying a Plate to delete chunks and import...

$ sudo -u omero-server -s
$ cd /ngff/
$ mkdir idr0012
$ cd idr0012
# copy takes a while...
$ cp -r /idr0012/ngff/HT01.ome.zarr/ HT01.ome.zarr/
$ cd HT01.ome.zarr
$ find -type f -name '0' -delete
$ find -type f -name '1' -delete

$ cd ../
$ screen -S idr0012_HT01
$ omero import --transfer=ln_s --depth=100 --skip=all HT01.ome.zarr/

Import failed with same error as at:
#643 (comment)
Needs new ZarrReader fixes...

@will-moore
Copy link
Member Author

will-moore commented Apr 7, 2023

Try to copy only .zattrs, .zgroup
Tried copy with filter, but couldn't get this to work

cd /ngff/idr0010
find ./108-24.ome.zarr -type f \( -name "*.zattrs" -o -name "*.zgroup" \) -exec 'cp' '{}' './108-24_nochunks.ome.zarr/'
find ./108-24.ome.zarr -type f \( -name "*.zattrs" -o -name "*.zgroup" \) | xargs -n1 -i cp -R {} ./108-24_nochunks.ome.zarr/

Since we know how to do this with aws (don't see how to do it with mc) let's try to install aws on idr0125-pilot...
...seems like it's already installed

Previously this has worked...

aws s3 sync --no-sign-request  \
    --exclude '*' --include "*.z*" --include "*.xml"  \
    s3://cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00015098__2016-06-08T18_43_42-Measurement1.ome.zarr \
    .

IDR/ome-ngff-samples#16

As wmoore user:

$ screen -S aws_sync_idr0012
$ cd
$ mkdir idr0012
$ cd idr0012
$ aws s3 sync --no-sign-request --exclude '*' --include "*.z*" --include "*.xml" --endpoint-url https://uk1s3.embassy.ebi.ac.uk s3://idr0012/ngff .
...
# shouldn't be downloading chunks!!
download: s3://idr0012/ngff/HT03.ome.zarr/G/16/1/2/0/2/0/0/0 to HT03.ome.zarr/G/16/1/2/0/2/0/0/0
download: s3://idr0012/ngff/HT03.ome.zarr/G/16/1/2/0/0/0/0/0 to HT03.ome.zarr/G/16/1/2/0/0/0/0/0
download: s3://idr0012/ngff/HT03.ome.zarr/G/16/1/3/.zarray to HT03.ome.zarr/G/16/1/3/.zarray
download: s3://idr0012/ngff/HT03.ome.zarr/G/16/1/3/0/0/0/0/0 to HT03.ome.zarr/G/16/1/3/0/0/0/0/0
# cancelled!

Chunks were being downloaded there (because "*.z*" matches all paths with ..ome.zarr in.
EDIT: Need to use:

$ aws s3 sync --no-sign-request --exclude '*' --include "*/.z*" --include "*.xml" --endpoint-url https://uk1s3.embassy.ebi.ac.uk s3://idr0012/ngff .

I actually used a loop to download each Plate at a time!

$ for i in $(seq -f "%02g" 1 68);
do
aws s3 sync --no-sign-request --exclude '*' --include "*.z*" --include "*.xml" --endpoint-url https://uk1s3.embassy.ebi.ac.uk s3://idr0012/ngff/HT$i.ome.zarr ./HT$i.ome.zarr;
done

...
download: s3://idr0012/ngff/HT68.ome.zarr/P/9/1/3/.zarray to HT68.ome.zarr/P/9/1/3/.zarray
download: s3://idr0012/ngff/HT68.ome.zarr/P/9/0/0/.zarray to HT68.ome.zarr/P/9/0/0/.zarray
download: s3://idr0012/ngff/HT68.ome.zarr/P/8/1/1/.zarray to HT68.ome.zarr/P/8/1/1/.zarray

Check a few plates for counts, e.g:

$ find ./HT01.ome.zarr -type f -name ".zattrs" | wc
   1010    1010   30340
$ find ./HT60.ome.zarr -type f -name ".zattrs" | wc
   1010    1010   30340
$ find ./HT60.ome.zarr -type f -name "0" | wc
      0       0       0

Copy to root dir..

$ cd
$ sudo mv idr0012/ /ngff/
$ cd /ngff
$ sudo chown omero-server -R idr0012/

@will-moore
Copy link
Member Author

will-moore commented Apr 7, 2023

In a Screen, as omero-server user, import all metadata-only plates...

$ cd /ngff/idr0012
$ source /opt/omero/server/venv3/bin/activate
$ export OMERODIR=/opt/omero/server/OMERO.server
$ omero import --transfer=ln_s --depth=100 --skip=all HT01.ome.zarr/ --file /tmp/idr0012_01.log  --errs /tmp/idr0012_01.err
...
2023-04-07 10:16:34,442 2462759    [3-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_STARTED: /ngff/idr0012/HT01.ome.zarr/P/.zgroup
2023-04-07 10:16:34,836 2463153    [3-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_COMPLETE: /ngff/idr0012/HT01.ome.zarr/P/.zgroup
2023-04-07 10:18:29,466 2577783    [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_END
2023-04-07 10:18:29,821 2578138    [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_STARTED Logfile: 48807432
2023-04-07 10:19:23,783 2632100    [l.Client-3] INFO   ormats.importer.cli.LoggingImportMonitor - METADATA_IMPORTED Step: 1 of 5  Logfile: 48807432
2023-04-07 10:20:32,416 2700733    [l.Client-2] INFO   ormats.importer.cli.LoggingImportMonitor - PIXELDATA_PROCESSED Step: 2 of 5  Logfile: 48807432
2023-04-07 10:20:32,514 2700831    [l.Client-4] INFO   ormats.importer.cli.LoggingImportMonitor - THUMBNAILS_GENERATED Step: 3 of 5  Logfile: 48807432
2023-04-07 10:20:32,563 2700880    [l.Client-2] INFO   ormats.importer.cli.LoggingImportMonitor - METADATA_PROCESSED Step: 4 of 5  Logfile: 48807432
2023-04-07 10:20:32,586 2700903    [l.Client-4] INFO   ormats.importer.cli.LoggingImportMonitor - OBJECTS_RETURNED Step: 5 of 5  Logfile: 48807432
2023-04-07 10:20:32,995 2701312    [l.Client-2] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /ngff/idr0012/HT01.ome.zarr/OME/METADATA.ome.xml
Other imported objects:
Fileset:5286851

==> Summary
4725 files uploaded, 1 fileset, 1 plate created, 672 images imported, 0 errors in 0:44:55.699

@will-moore
Copy link
Member Author

will-moore commented Apr 7, 2023

Instead of using --bulk import, just going to use a loop to import all the other plates (and name them)

$ for i in $(seq -f "%02g" 2 68); do omero import --transfer=ln_s --depth=100 --skip=all --name=HT$i HT$i.ome.zarr/ --file /tmp/idr0012_$i.log  --errs /tmp/idr0012_$i.err; done

Then use webclient to put all Plates into a single Screen:3151

@will-moore
Copy link
Member Author

We can update ALL pixels for a given Fileset via psql with:

idr=> UPDATE pixels SET name = '.zattrs' where image in (select id from Image where fileset = 5286851);

@will-moore
Copy link
Member Author

will-moore commented Apr 7, 2023

To update symlinks, use scripts developed for idr0125:

First, need to view an Image from every Plate (see idr0125 for reason).

Edited the script render_set_image_cmd with Plate ID, then ran this - NB: we don't have renderdef.yml for idr0012, so instead of running the outputted command, I simply visited http://localhost:1080/webclient/img_detail/14752020/ for each Image (1 per Plate):

$ python /Users/wmoore/Desktop/IDR/idr0125/idr0125-way-cellpainting/scripts/render_set_image_cmd.py 

for a in 14707260 14708252 14708758 14709496 14710226 14710958 14711866 14711958 14712754 14713623 14713977 14715059 14715445 14716467 14717273 14717365 14718057 14718821 14719547 14720279 14721037 14721557 14722115 14722929 14723395 14724011 14724869 14725415 14726077 14726765 14727395 14728405 14728887 14729497 14730507 14730881 14731809 14732589 14733163 14733845 14734591 14734945 14735675 14736557 14737329 14737865 14738326 14739090 14739670 14740598 14741064 14741768 14742568 14742878 14743596 14744608 14745274 14746082 14746730 14746870 14747590 14748304 14749258 14749982 14750540 14751498 14752020 14752562; do omero --debug=2 render set Image:$a screenA/idr0125-screenA-renderdef.yml > /tmp/renderImage.log 2>/tmp/renderImage.err; done

Then update Symlinks...

With webclient available locally on http://localhost:1080, run... (screen ID is hard-coded in the script):

$ python /Users/wmoore/Desktop/IDR/idr0125/idr0125-way-cellpainting/scripts/get_import_paths.py 
demo_2/Blitz-0-Ice.ThreadPool.Server-4/2023-04/07/09-35-37.744/HT01.ome.zarr
demo_2/Blitz-0-Ice.ThreadPool.Server-7/2023-04/07/10-39-06.930/HT02.ome.zarr
demo_2/Blitz-0-Ice.ThreadPool.Server-5/2023-04/07/11-23-16.500/HT03.ome.zarr
demo_2/Blitz-0-Ice.ThreadPool.Server-8/2023-04/07/12-04-40.555/HT04.ome.zarr
  demo_2/Blitz-0-Ice.ThreadPool.Server-2/2023-04/07/12-45-27.313/HT05.ome.zarr
demo_2/Blitz-0-Ice.ThreadPool.Server-8/2023-04/07/13-29-24.048/HT06.ome.zarr
...

Generates import_paths.txt

Then run symlink_cmd.py to output bash commands for creating symlinks - editing script paths = paths[0:10] each time to generate output in batches

symlink_cmd.py
# Run python symlink_cmd.py to output command for symlinking imported plates
# from managed repo to s3-mount.

# sudo -u omero-server -s

# cd /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-28/2022-10/15/05-53-40.405
# rm -rf SQ00015233__2016-05-12T05_47_03-Measurement1.ome.zarr
# ln -s /cellpainting-gallery/cpg0004-lincs/broad/images_zarr/2016_04_01_a549_48hr_batch1/images/SQ00015233__2016-05-12T05_47_03-Measurement1.ome.zarr SQ00015233__2016-05-12T05_47_03-Measurement1.ome.zarr

file_path = "imported_paths.txt"
s3_plates_dir = "/idr0012/ngff/"

paths = []
with open(file_path) as f:
    paths = [path.strip() for path in f.readlines()]

paths = paths[50:]

# Run this before running: $ bash ./symlinks.bash
print("sudo -u omero-server -s")

# Put everything after this into symlinks.bash
print("\n#!/bin/bash")

for line in paths:
    import_dir = line.split("/HT")[0]
    plate_name = "HT" + line.split("/HT")[1]

    print(f"cd /data/OMERO/ManagedRepository/{import_dir}")
    print(f"rm -rf {plate_name}")
    print(f"ln -s {s3_plates_dir}{plate_name} {plate_name}")
$ python symlink_cmd.py 
sudo -u omero-server -s

#!/bin/bash
cd /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-0/2023-04/08/19-48-01.901
rm -rf HT51.ome.zarr
ln -s /idr0012/ngff/HT51.ome.zarr HT51.ome.zarr
cd /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-9/2023-04/08/20-29-49.058
rm -rf HT52.ome.zarr

This allows thumbnails to be generated for Plates (takes a long time!). We don't need to generate thumbnails, but can check that Images are viewable by opening iviewer as above, for a selection of the Image IDs listed above.

@will-moore
Copy link
Member Author

will-moore commented Apr 10, 2023

Plate HT01:

$ python swap_filesets.py Plate:4287 Plate:10251

idr=> UPDATE pixels SET name = '.zattrs', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-4/2023-04/07/09-35-37.744/HT01.ome.zarr' where image in (select id from Image where fileset = 5286851);
UPDATE 672

Plate HT02

$ python swap_filesets.py Plate:4288 Plate:10252
UPDATE pixels SET name = '.zattrs', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-7/2023-04/07/10-39-06.930/HT02.ome.zarr' where image in (select id from Image where fileset = 5286852);
(venv3) bash-4.2$ PGPASSWORD=****** psql -U omero -d idr -h 192.168.10.102
psql (11.14)
Type "help" for help.

idr=> UPDATE pixels SET name = '.zattrs', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-7/2023-04/07/10-39-06.930/HT02.ome.zarr' where image in (select id from Image where fileset = 5286852);
UPDATE 672

Also did Plates HT03 and HT04 but...

I noticed a problem with the wrong Wells/Images getting mixed up in the Fileset-swapped Plates...

This is the HT04 plate BEFORE swapping the Fileset:

Screenshot 2023-04-10 at 15 19 45

The the NGFF HT04 Plate after Import (looks the same - correct).

Screenshot 2023-04-10 at 15 20 11

BUT, after swapping Fileset, this is the original Plate, now using NGFF Fileset:

Screenshot 2023-04-10 at 15 32 42

The column order is incorrect.
The columns are read from NGFF in the following order:

10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 24, 4, 5, 6, 7, 8, 9

so the Wells in the 10 column, e.g. A10, B10 etc, are now showing up in the first column A4, B4 etc.
E.g. the distinctive Well D13 in the first 2 screenshots above is now showing at D7 (4th column).

@will-moore
Copy link
Member Author

Need to check whether this column mix-up is happening with idr0010 plates...

Re-import 108-24.ome.zarr without chunks, view blank Plate, update symlink as above. View image and Save All:

$ omero import --transfer=ln_s --depth=10 --skip=all 108-24.ome.zarr
...
2023-04-10 15:21:45,581 1212006    [l.Client-2] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /ngff/idr0010/108-24.ome.zarr/OME/METADATA.ome.xml
Plate:10320
Other imported objects:
Fileset:5286920

==> Summary
2705 files uploaded, 1 fileset, 1 plate created, 384 images imported, 0 errors in 0:20:02.837

Viewed black Plate/Images with no errors...
After replacing /ngff/idr0010/108-24.ome.zarr (no chunks) with a copy that has chunks, I created sym-links...

su -u omero-server -s
cd /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-11/2023-04/10/15-01-43.028/
rm -rf 108-24.ome.zarr
ln -s /ngff/idr0010/108-24.ome.zarr 108-24.ome.zarr

But, viewing an Image of this plate gives...

	at java.base/java.lang.Thread.run(Thread.java:829)

    serverExceptionClass = ome.conditions.ResourceError
    message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-11/2023-04/10/15-01-43.028/108-24.ome.zarr/OME/METADATA.ome.xml
}

<WSGIRequest: GET '/webclient/metadata_preview/well/2280980/?_=1681140703320'>`

@will-moore
Copy link
Member Author

will-moore commented Apr 12, 2023

Going to try import a new Plate from idr0025. Dom has done the conversion:

# or use ssh pilot-zarr1-dev
ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' zarr1-dev
$ ls -alh /data/idr0025
total 84K
drwxrwxr-x.  3 dlindner dlindner  86 Feb 27 11:00 .
drwxrwxr-x. 16 root     idr-data 289 Apr  6 15:02 ..
drwxrwxr-x. 11 dlindner dlindner 167 Feb 27 11:01 10x images plate 2.ome.zarr
-rw-rw-r--.  1 dlindner dlindner 81K Feb 27 10:58 10x images plate 2.screen

Working on idr0125-pilot, copy data to wmoore home dir, then move

$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idr0125-omeroreadwrite
# rsync with spaces in dir-name is impossible! These fail...
$ rsync -av  -e "ssh -A idr-pilot.openmicroscopy.org ssh" "zarr1-dev:/data/idr0025/10x images plate 2.ome.zarr" . -P
$ rsync -av  -e "ssh -A idr-pilot.openmicroscopy.org ssh" zarr1-dev:/data/idr0025/10x\ images\ plate\ 2.ome.zarr . -P

So, I renamed the dir...

$ ssh pilot-zarr1-dev
$ cd /data/idr0025
$ sudo mv 10x\ images\ plate\ 2.ome.zarr 10x_images_plate_2.ome.zarr

...tried rsync again from idr0125-pilot... then copied to /ngff/idr0025/:

$ rsync -av  -e "ssh -A idr-pilot.openmicroscopy.org ssh" zarr1-dev:/data/idr0025/10x_images_plate_2.ome.zarr . -P
sent 298,511 bytes  received 1,007,076,348 bytes  5,344,163.71 bytes/sec
total size is 1,005,802,610  speedup is 1.00
$ sudo mkdir /ngff/idr0025
$ sudo mv 10x_images_plate_2.ome.zarr /ngff/idr0025/
$ sudo chown -R omero-server /ngff/idr0025

Then import (with chunks) in a screen: NB: Nearly 3 hours before FILESET_UPLOAD_START:

$ omero import --transfer=ln_s --depth=100 --skip=all 10x_images_plate_2.ome.zarr --file /tmp/idr0025.log  --errs /tmp/idr0025.err

2023-04-12 10:20:12,494 338        [      main] INFO          ome.formats.importer.ImportConfig - OMERO.blitz Version: 5.6.2
2023-04-12 10:20:12,518 362        [      main] INFO          ome.formats.importer.ImportConfig - Bioformats version: 6.12.0 revision: 9d2f3cc080ff771569ca08fb7b3fe3558b8396f2 date: 14 February 2023
...
2023-04-12 10:20:19,847 7691       [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_PREPARATION
2023-04-12 12:59:08,580 9536424    [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_START
2023-04-12 12:59:08,609 9536453    [3-thread-1] INFO   s.importer.transfers.SymlinkFileTransfer - Transferring /ngff/idr0025/10x_images_plate_2.ome.zarr/A/1/0/0/0/0/0/0/0...
2023-04-12 12:59:08,736 9536580    [3-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_STARTED: /ngff/idr0025/10x_images_plate_2.ome.zarr/A/1/0/0/0/0/0/0/0
...

2023-04-12 14:01:51,922 13299766   [l.Client-3] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /ngff/idr0025/10x_images_plate_2.ome.zarr/A/1/0/0/0/0/0/0/0
Other imported objects:
Fileset:5286921

==> Summary
10573 files uploaded, 1 fileset, 1 plate created, 384 images imported, 0 errors in 3:41:32.111

Swap fileset...

$ sudo -u omero-server -s
$ cd
$ source /opt/omero/server/venv3/bin/activate
$ python swap_filesets.py Fileset:23201 Fileset:5286921
UPDATE pixels SET name = '.zattrs', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-16/2023-04/12/10-20-20.483/10x_images_plate_2.ome.zarr' where image in (select id from Image where fileset = 5286921);
export OMERODIR=/opt/omero/server/OMERO.server
omero config get --show-password
$ PGPASSWORD=**** psql -U omero -d idr -h 192.168.10.102
idr=> UPDATE pixels SET name = '.zattrs', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-16/2023-04/12/10-20-20.483/10x_images_plate_2.ome.zarr' where image in (select id from Image where fileset = 5286921);
UPDATE 384

Now the old images are viewable with new NGFF Fileset.
Saving rendering settings "Save to All" shows the same re-ordering of Wells as above:

NGFF Plate (same as original data):

Screenshot 2023-04-12 at 15 07 51

After swapping Filesets:

Screenshot 2023-04-12 at 15 16 38

Order of Well columns is:

1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9

@will-moore
Copy link
Member Author

will-moore commented Apr 12, 2023

idr0090 - sparse plate...

$ 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" zarr1-dev:/data/idr0090/190211.ome.zarr . -P
...

But even with just 1 Well (A/6) - 32 fields! - downloaded, we've gone from 63GB to 49GB - will run out of space - stopping now...

$ df -h ./
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       100G   38G   63G  38% /

$ df -h ./
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       100G   52G   49G  52% /

@will-moore
Copy link
Member Author

will-moore commented Apr 17, 2023

Discussed Well ordering issue in IDR meeting...

If the order of series (WellSamples) isn't the same between .pattern Filesets and NGFF Filesets, that would explain the issue.
Could be same for non-HCS images.
bioformats2raw should maintain order and ZarrReader should trust the OME/METADATA.ome.xml when deciding on series order.

Try to check order of series with showinf, but the standard bftools don't support .pattern files:

$ ssh pilot-zarr1-dev
$ wget https://downloads.openmicroscopy.org/bio-formats/6.12.0/artifacts/bftools.zip
$ unzip bftools.zip

$ ./bftools/showinf /data/idr0025/10x\ images\ plate\ 2.screen 
Exception in thread "main" loci.formats.UnknownFormatException: Unknown file format: /data/idr0025/10x images plate 2.screen
	at loci.formats.ImageReader.getReader(ImageReader.java:202)

For NGFF Plate... get lots of Series # blocks, but no way to tell what Well/Image each one refers to:

$ ./bftools/showinf /data/idr0025/10x_images_plate_2.ome.zarr/OME/METADATA.ome.xml -nopix
...
Series #383 :
	Image count = 3
	RGB = false (1) 
	Interleaved = false
	Indexed = false (false color)
	Width = 2048
	Height = 2048
	SizeZ = 1
	SizeT = 1
	SizeC = 3
	Tile size = 2048 x 512
	Thumbnail size = 128 x 128
	Endianness = motorola (big)
	Dimension order = XYZCT (certain)
	Pixel type = uint8
	Valid bits per pixel = 8
	Metadata complete = false
	Thumbnail series = false
	-----
	Plane #0 <=> Z 0, C 0, T 0
	Plane #1 <=> Z 0, C 1, T 0
	Plane #2 <=> Z 0, C 2, T 0


Reading global metadata

Reading series #0 metadata

Tried limiting the series with range and giving more info on each series with debug, but neither worked:

$ ./bftools/showinf -range 0 1 -debug /data/idr0025/10x_images_plate_2.ome.zarr/OME/METADATA.ome.xml -nopix

@will-moore
Copy link
Member Author

With ome/ZarrReader#53 merged and the ZarrReader artifact downloaded to /opt/omero/server/OMERO.server/lib/client/OMEZarrReader.jar and /opt/omero/server/OMERO.server/lib/server/OMEZarrReader.jar as omero-server after$ sudo service omero-server restart...
Reset thumbs for the plate above at:
See #652 (comment) and this looks good (thumbnail ordering fixed):

Screenshot 2023-05-01 at 12 35 45

@will-moore
Copy link
Member Author

Discussed today at IDR meeting:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

6 participants