irods-contrib / metalnx-web

Metalnx Web Application
https://metalnx.github.io/
BSD 3-Clause "New" or "Revised" License
36 stars 36 forks source link

Cannot work with metadata operations in 4.3.0 #343

Closed mstfdkmn closed 1 year ago

mstfdkmn commented 1 year ago

I cannot succeed to add metadata through Metalnx, also neither can modify nor can delete any existing metadata attached by other clients.

Could you test metadata operations? I think/hope this is not a local issue that we have.

I have own access level:

image

Cannot delete:

image

logs:

irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"error","log_message":"[-]\t/irods_source/server/core/src/rsApiHandler.cpp:560:int readAndProcClientMsg(rsComm_t *, int) :  status [SYS_HEADER_READ_LEN_ERR]  errno [] -- message [failed to call 'read header']\n\t[-]\t/irods_source/lib/core/src/sockComm.cpp:198:irods::error readMsgHeader(irods::network_object_ptr, msgHeader_t *, struct timeval *) :  status [SYS_HEADER_READ_LEN_ERR]  errno [] -- message [failed to call 'read header']\n\t\t[-]\t/irods_source/plugins/network/src/tcp.cpp:190:irods::error tcp_read_msg_header(irods::plugin_context &, void *, struct timeval *) :  status [SYS_HEADER_READ_LEN_ERR]  errno [] -- message [only read [0] of [4]]\n\n","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":4299,"server_timestamp":"2023-01-03T12:57:26.619Z","server_type":"agent"}
irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"error","log_message":"Agent [4299] exiting with status = -4000","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":4299,"server_timestamp":"2023-01-03T12:57:26.627Z","server_type":"agent"}
irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"error","log_message":"Agent process [4299] exited with status [1]","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":131,"server_timestamp":"2023-01-03T12:57:26.657Z","server_type":"agent_factory"}
irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"info","log_message":"rsApiHandler: unpackStruct error for apiNumber 706, status = -15000","request_api_name":"MOD_AVU_METADATA_AN","request_api_number":706,"request_api_version":"d","request_client_user":"rods","request_host":"127.0.0.1","request_proxy_user":"rods","request_release_version":"rods3.2","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":4300,"server_timestamp":"2023-01-03T12:57:26.839Z","server_type":"agent"}

cannot modify:

image

logs:

irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"error","log_message":"[-]\t/irods_source/server/core/src/rsApiHandler.cpp:560:int readAndProcClientMsg(rsComm_t *, int) :  status [SYS_HEADER_READ_LEN_ERR]  errno [] -- message [failed to call 'read header']\n\t[-]\t/irods_source/lib/core/src/sockComm.cpp:198:irods::error readMsgHeader(irods::network_object_ptr, msgHeader_t *, struct timeval *) :  status [SYS_HEADER_READ_LEN_ERR]  errno [] -- message [failed to call 'read header']\n\t\t[-]\t/irods_source/plugins/network/src/tcp.cpp:190:irods::error tcp_read_msg_header(irods::plugin_context &, void *, struct timeval *) :  status [SYS_HEADER_READ_LEN_ERR]  errno [] -- message [only read [0] of [4]]\n\n","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":4328,"server_timestamp":"2023-01-03T12:59:22.920Z","server_type":"agent"}
irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"error","log_message":"Agent [4328] exiting with status = -4000","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":4328,"server_timestamp":"2023-01-03T12:59:22.928Z","server_type":"agent"}
irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"error","log_message":"Agent process [4328] exited with status [1]","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":131,"server_timestamp":"2023-01-03T12:59:22.958Z","server_type":"agent_factory"}
irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"info","log_message":"rsApiHandler: unpackStruct error for apiNumber 706, status = -15000","request_api_name":"MOD_AVU_METADATA_AN","request_api_number":706,"request_api_version":"d","request_client_user":"rods","request_host":"127.0.0.1","request_proxy_user":"rods","request_release_version":"rods3.2","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":4329,"server_timestamp":"2023-01-03T12:59:23.138Z","server_type":"agent"}

Cannot add:

image image

logs:

irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"error","log_message":"[-]\t/irods_source/server/core/src/rsApiHandler.cpp:560:int readAndProcClientMsg(rsComm_t *, int) :  status [SYS_HEADER_READ_LEN_ERR]  errno [] -- message [failed to call 'read header']\n\t[-]\t/irods_source/lib/core/src/sockComm.cpp:198:irods::error readMsgHeader(irods::network_object_ptr, msgHeader_t *, struct timeval *) :  status [SYS_HEADER_READ_LEN_ERR]  errno [] -- message [failed to call 'read header']\n\t\t[-]\t/irods_source/plugins/network/src/tcp.cpp:190:irods::error tcp_read_msg_header(irods::plugin_context &, void *, struct timeval *) :  status [SYS_HEADER_READ_LEN_ERR]  errno [] -- message [only read [0] of [4]]\n\n","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":4380,"server_timestamp":"2023-01-03T13:02:11.519Z","server_type":"agent"}
irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"error","log_message":"Agent [4380] exiting with status = -4000","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":4380,"server_timestamp":"2023-01-03T13:02:11.525Z","server_type":"agent"}
irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"error","log_message":"Agent process [4380] exited with status [1]","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":131,"server_timestamp":"2023-01-03T13:02:11.556Z","server_type":"agent_factory"}
irods stdout | {"log_category":"legacy","log_facility":"local0","log_level":"info","log_message":"rsApiHandler: unpackStruct error for apiNumber 706, status = -15000","request_api_name":"MOD_AVU_METADATA_AN","request_api_number":706,"request_api_version":"d","request_client_user":"rods","request_host":"127.0.0.1","request_proxy_user":"rods","request_release_version":"rods3.2","server_host":"dev-u0137480.irods.t.icts.kuleuven.be","server_pid":4381,"server_timestamp":"2023-01-03T13:02:11.733Z","server_type":"agent"}
korydraughn commented 1 year ago

We'll look into it.

trel commented 1 year ago

reproduced. adding a new AVU gives me this in the metalnx logs...

2023-01-06 00:21:53 INFO  DataObjectAOImpl:325 - returning: DataObject [id=10022, collectionId=10016, dataName=fox-sushi.png, collectionName=/tempZone/home/alice, dataReplicationNumber=0, dataVersion=0, dataTypeName=generic, dataSiz[525/1871]
resourceGroupName=, resourceName=demoResc, resourceId=10013, dataPath=/var/lib/irods/Vault/home/alice/fox-sushi.png, dataOwnerName=alice, dataOwnerZone=tempZone, replicationStatus=1, dataStatus=, checksum=sha2:LTFu6bxzTP/tRocOPFJLTlHTemmGom0y
2gad5I5yn4I=, expiry=00000000000, dataMapId=0, comments=, createdAt=Thu Jan 05 21:18:15 GMT 2023, updatedAt=Thu Jan 05 21:18:15 GMT 2023, specColType=NORMAL, objectPath=]
2023-01-06 00:21:53 INFO  DataObjectAOImpl:1883 - adding avu metadata to data object: avu data:
   attrib:ggg
   value:hhh
   units:
2023-01-06 00:21:53 INFO  DataObjectAOImpl:1884 - absolute path: /tempZone/home/alice/fox-sushi.png
2023-01-06 00:21:53 INFO  FileCatalogObjectAOImpl:201 - retrieveObjStat()
2023-01-06 00:21:53 INFO  FileCatalogObjectAOImpl:207 - irodsAbsolutePath:/tempZone/home/alice/fox-sushi.png
2023-01-06 00:21:53 INFO  CollectionListingUtils:1278 - ObjStat [absolutePath=/tempZone/home/alice/fox-sushi.png, objectPath=, objectType=DATA_OBJECT, dataId=10022, checksum=sha2:LTFu6bxzTP/tRocOPFJLTlHTemmGom0y2gad5I5yn4I=, ownerName=alice, 
ownerZone=tempZone, objSize=168771, createdAt=Thu Jan 05 21:18:15 GMT 2023, modifiedAt=Thu Jan 05 21:18:15 GMT 2023, specColType=NORMAL, collectionPath=, cacheDir=, cacheDirty=false, replNumber=0, standInGeneratedObjStat=false]
2023-01-06 00:21:53 ERROR DataObjectAOImpl:1922 - jargon exception adding AVU metadata
org.irods.jargon.core.exception.JargonException: error code received from iRODS:-15000
        at org.irods.jargon.core.connection.IRODSErrorScanner.checkSpecificCodesAndThrowIfExceptionLocated(IRODSErrorScanner.java:276)
        at org.irods.jargon.core.connection.IRODSErrorScanner.inspectAndThrowIfNeeded(IRODSErrorScanner.java:115)
        at org.irods.jargon.core.connection.IRODSMidLevelProtocol.processMessageInfoLessThanZero(IRODSMidLevelProtocol.java:1542)
        at org.irods.jargon.core.connection.IRODSMidLevelProtocol.readMessage(IRODSMidLevelProtocol.java:1046)
        at org.irods.jargon.core.connection.IRODSMidLevelProtocol.readMessage(IRODSMidLevelProtocol.java:1014)
        at org.irods.jargon.core.connection.IRODSMidLevelProtocol.irodsFunction(IRODSMidLevelProtocol.java:427)
        at org.irods.jargon.core.connection.IRODSMidLevelProtocol.irodsFunction(IRODSMidLevelProtocol.java:553)
        at org.irods.jargon.core.connection.IRODSMidLevelProtocol.irodsFunction(IRODSMidLevelProtocol.java:909)
        at org.irods.jargon.core.pub.DataObjectAOImpl.addAVUMetadata(DataObjectAOImpl.java:1912)
        at com.emc.metalnx.services.irods.MetadataServiceImpl.addMetadataToPath(MetadataServiceImpl.java:218)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        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 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 org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy54.addMetadataToPath(Unknown Source)
        at com.emc.metalnx.controller.MetadataController.setMetadata(MetadataController.java:284)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        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.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:667)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1726)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base/java.lang.Thread.run(Thread.java:829)
2023-01-06 00:21:53 ERROR MetadataServiceImpl:226 - Error trying to add metadata: org.irods.jargon.core.exception.JargonException: error code received from iRODS:-15000
$ ierror 15000
irods error: -15000 SYS_PACK_INSTRUCT_FORMAT_ERR 
JustinKyleJames commented 1 year ago

This is due to the packing instruction change in 4.3. The fix is in Jargon.

The issue is DICE-UNC/jargon#415.

The fix in in pull request DICE-UNC/jargon#417.

JustinKyleJames commented 1 year ago

This has the same root problem as issue as #337.