Question

IFS File Storage and Azure smb file share issue

  • 4 January 2024
  • 12 replies
  • 162 views

Userlevel 2
Badge +6
  • Sidekick (Partner)
  • 34 replies

Someone tested using azure smb fileshare on the IFS remote solution for files file storage of media item or documents in document management? We get a strange fault when configuring it and testing with media items. Is it a bug ?

The file is created on the file share but it fails on setting some extended attribute on the file? Is that really necessary or is it an bug?

 

Caused by: java.nio.file.FileSystemException: /fss-storage/mediaitem/1000: Error writing extended attribute 'filename': Invalid argument

 

Entire java stack on the error we get.

2024-01-04 12:47:55.613 ERROR b057f6ec-39ac-4e1a-b24f-0b0840f59abd com.ifsworld.storage.service.FileStorageService.upload() : Failed to upload the file to storage location: com.ifsworld.storage.service.exceptions.FileOperationException: Failed to upload the file to storage location
        at com.ifsworld.storage.service.providers.ContainerPathStorageProvider.uploadFileToStorage(ContainerPathStorageProvider.java:90)
        at com.ifsworld.storage.service.FileStorageService.upload(FileStorageService.java:217)
        at com.ifsworld.storage.service.FileStorageService_Subclass.upload$$superforward1(Unknown Source)
        at com.ifsworld.storage.service.FileStorageService_Subclass$$function$$5.apply(Unknown Source)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
        at io.smallrye.metrics.interceptors.CountedInterceptor.countedCallable(CountedInterceptor.java:85)
        at io.smallrye.metrics.interceptors.CountedInterceptor.countedMethod(CountedInterceptor.java:61)
        at io.smallrye.metrics.interceptors.CountedInterceptor_Bean.intercept(Unknown Source)
        at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:50)
        at io.quarkus.security.runtime.interceptor.SecurityHandler.handle(SecurityHandler.java:47)
        at io.quarkus.security.runtime.interceptor.AuthenticatedInterceptor.intercept(AuthenticatedInterceptor.java:29)
        at io.quarkus.security.runtime.interceptor.AuthenticatedInterceptor_Bean.intercept(Unknown Source)
        at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
        at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:33)
        at com.ifsworld.storage.service.FileStorageService_Subclass.upload(Unknown Source)
        at com.ifsworld.storage.service.FileStorageService_ClientProxy.upload(Unknown Source)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:130)
        at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:660)
        at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:524)
        at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474)
        at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
        at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:476)
        at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:434)
        at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:408)
        at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:69)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
        at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
        at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
        at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
        at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:249)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:60)
        at io.quarkus.resteasy.runtime.ResteasyServlet.service(ResteasyServlet.java:19)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
        at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:63)
        at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
        at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:67)
        at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:133)
        at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
        at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:65)
        at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
        at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
        at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
        at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:247)
        at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:56)
        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:111)
        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:108)
        at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
        at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
        at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$9$1.call(UndertowDeploymentRecorder.java:602)
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
        at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:152)
        at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$1.handleRequest(UndertowDeploymentRecorder.java:120)
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:284)
        at io.undertow.server.DefaultExchangeHandler.handle(DefaultExchangeHandler.java:18)
        at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$5$1.run(UndertowDeploymentRecorder.java:417)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
        at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
        at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
        at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.nio.file.FileSystemException: /fss-storage/mediaitem/1000: Error writing extended attribute 'filename': Invalid argument
        at java.base/sun.nio.fs.LinuxUserDefinedFileAttributeView.write(Unknown Source)
        at com.ifsworld.storage.service.providers.ContainerPathStorageProvider.uploadFileToStorage(ContainerPathStorageProvider.java:85)
        ... 80 more
 


12 replies

Userlevel 7
Badge +30

Which version of IFS Cloud is this? Support for File Storage in Remote Deployment came in 23R1.

@chanaka-shanil 

Userlevel 2
Badge +6

23r1 su06

Userlevel 7
Badge +30

23r1 su06

Then IFS Cloud File Storage should support SMB. As for what's wrong with the Azure Storage to SMB mapping, I cannot say since I don't have any experience with it. Perhaps you should start with a "normal" Windows network share and, once that works, try out the Azure - SMB?

Userlevel 2
Badge +6

@Mathias Dahl I have tested a ordinary windows fileshare and it works. It seems like IFS storage pod is trying to write som extended attributes that failes when using azure smb share… 

What do you actually update on the file with the extended attributes after it’s written? Is it necessary? The file is created on the smb azure filshare but can’t be used inside IFS docuementen management or Media Items…. 

Userlevel 7
Badge +30

Thanks!

I can't say why this doesn't work. It seems like the Azure - SMB "integration" doesn't support all features of a SMB share and the focus when adding the SMB support in IFS Cloud File Storage was probably to work with "normal" shares, to start with.

I'll get someone else to comment here on why those extended attributes are needed. I think it might be the original file name that we keep there, not sure (we have that in Docman as well, in our tables though).

@chanaka-shanil can you or someone from your team comment on this?

 

Userlevel 6
Badge +15

This is an issue we noticed probably due to how the underlying storage works in this Azure setup. We actually did a change so this should be fixed with 23R1 SU1. @kjro  Can you check the ifs-file-storage container version used in your setup

Userlevel 2
Badge +6

@chanaka-shanil thanks for the update.

 

Seems like we runs the 23R1 without any service update. version=23.1.0.20230427113437.0

 

I’ll try to do an upgrade and see if it works as expected :)

 

 

 

Kjell Åge

Userlevel 2
Badge +6

@chanaka-shanil and @Mathias Dahl  tested upgrading IFS cloud to 23r2 su01 and it works as expected. Thanks for the help :)

 

 

Kjell Åge

Userlevel 7
Badge +30

@chanaka-shanil @kjro 

This is great news, good to know about this option for those customers who want cloud file storage but not our cloud storage…

@kjro As a small token of your appreciation of the help you got here 😛, don't hesitate to share any details of the setup that might help others in the same situation. Only together can we build a great community! 🙂 💪🏻 

Userlevel 6
Badge +15

Just want to clarify something, the reason why this got fixed was that we found other issues with the storage of metadata, so that got removed. This also fixed the issue with this Storage setup.

The idea here is that the Azure SMB share would abstract underlying physical storage, so from the File Storage’s perspective this would be just another SMB share. So in a way, we are not directly supporting this setup, but since this works similar to a SMB share and is transparent to us, it works.  

Userlevel 2
Badge +6

@chanaka-shanil thanks for the update, but could you explain a bit more in detail what kind of metadata is stored on the storage level, or is this now totally removed?

 

Kjell Åge

Userlevel 6
Badge +15

@kjro It’s totally removed from the storage.

Reply