linagora / linshare

LinShare
https://www.linshare.org/
GNU Affero General Public License v3.0
476 stars 86 forks source link

Incomplete upload/download #252

Closed PhidarkMM closed 11 months ago

PhidarkMM commented 1 year ago

Hello,

We are using 5.1.2 version of Linshare, and sometimes some users uploads / downloads never finish. The only solution found so far is to delete the user's profile and recreate it.

for example: image

Best regards,

lacrimal commented 1 year ago

Do you have antivirus working with linshare, it maybe his fault. Anyway you will be asked to send debug log when failure occurs.

PhidarkMM commented 1 year ago

Hello,

I finally found why uploads never finished in shared spaces (but not really why)

It occurs only when we have members, and we disabled antivirus.

We have created a Mail layout with our company logo, and assigned it to a mail configuration. This mail configuration is assigned to all our domains.

When we tried to upload files in shared spaces, it failed with the following message: [INFO]:http-nio-8080-exec-3:20221206.085301:org.linagora.linshare.core.service.LogEntryService:insert:AuditLogEntry [AuthUser=AccountMto [firstName=Toto, lastName=Titi, name=Toto Titi, mail=tototiti@toto.com, uuid=f68c319d-c147-46dd-b5fa-09ed8baa30e2, role=SIMPLE, accountType=INTERNAL, domain=Domain [uuid=af935d87-e11d-4942-9abd-6f84e5b443c6, label=AA-BB-CC]], resourceUuid=4fc93ca9-5abc-406f-971d-d1b8e64c6b40, action=CREATE, type=WORKGROUP_MEMBER, creationDate=Tue Dec 06 08:53:01 CET 2022] [INFO]:http-nio-8080-exec-10:20221206.085317:org.linagora.linshare.webservice.userv2.FlowDocumentUploaderRestService:testChunk:GET: .../webservice/rest/user/v2/flow.json:89835be3-64bc-41f1-852c-7c773f083cdf: chunkNumber:1/1 [INFO]:http-nio-8080-exec-4:20221206.085317:org.linagora.linshare.webservice.userv2.FlowDocumentUploaderRestService:getTransfertDuration:statistics:upload time:5ms. [INFO]:taskExecutor-2:20221206.085317:org.linagora.linshare.webservice.userv1.task.WorkGroupEntryUploadAsyncTask:run:Begin processing async task : 7b3b91ef-30ef-409a-a71c-3ded4a824ff7 [ERROR]:taskExecutor-2:20221206.085318:org.thymeleaf.TemplateEngine:process:[THYMELEAF][taskExecutor-2] Exception processing template "WORKGROUP_WARN_NEW_WORKGROUP_DOCUMENT:subject @TEXT ({lang=ENGLISH, mailConfig=MailConfig [domain=Domain [uuid=LinShareRootDomain, label=LinShareRootDomain], name=EMM, visible=true, readonly=false, uuid=0301b995-0312-4b4d-bfe8-93a0091e82cb]})": No MailContent matching the [Language,MailContentType] pair: [ENGLISH,WORKGROUP_WARN_NEW_WORKGROUP_DOCUMENT] org.linagora.linshare.core.exception.TechnicalException: No MailContent matching the [Language,MailContentType] pair: [ENGLISH,WORKGROUP_WARN_NEW_WORKGROUP_DOCUMENT] at org.linagora.linshare.core.domain.entities.MailConfig.findContent(MailConfig.java:233) ~[classes/:5.1.2] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor.intercept(ByteBuddyInterceptor.java:56) ~[hibernate-core-5.4.30.Final.jar:5.4.30.Final] at org.hibernate.proxy.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:95) ~[hibernate-core-5.4.30.Final.jar:5.4.30.Final] at org.linagora.linshare.core.domain.entities.MailConfig$HibernateProxy$Z6rq9Nbe.findContent(Unknown Source) ~[classes/:5.1.2] at org.linagora.linshare.core.notifications.config.LinShareStringTemplateResolver.computeTemplateResource(LinShareStringTemplateResolver.java:89) ~[classes/:5.1.2] at org.thymeleaf.templateresolver.AbstractTemplateResolver.resolveTemplate(AbstractTemplateResolver.java:356) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:845) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1059) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.linagora.linshare.core.notifications.emails.impl.EmailBuilder.buildMailContainerThymeleaf(EmailBuilder.java:444) ~[classes/:5.1.2] at org.linagora.linshare.core.notifications.emails.impl.WorkGroupWarnNewWorkgroupDocumentEmailBuilder.buildMailContainer(WorkGroupWarnNewWorkgroupDocumentEmailBuilder.java:126) ~[classes/:5.1.2] at org.linagora.linshare.core.notifications.emails.impl.WorkGroupWarnNewWorkgroupDocumentEmailBuilder.buildMailContainer(WorkGroupWarnNewWorkgroupDocumentEmailBuilder.java:72) ~[classes/:5.1.2] at org.linagora.linshare.core.notifications.emails.impl.EmailBuilder.build(EmailBuilder.java:328) ~[classes/:5.1.2] at org.linagora.linshare.core.notifications.service.impl.MailBuildingServiceImpl.build(MailBuildingServiceImpl.java:277) ~[classes/:5.1.2] at org.linagora.linshare.core.service.impl.WorkGroupDocumentServiceImpl.createWithoutLogStorage(WorkGroupDocumentServiceImpl.java:183) ~[classes/:5.1.2] at org.linagora.linshare.core.service.impl.WorkGroupNodeServiceImpl.create(WorkGroupNodeServiceImpl.java:340) ~[classes/:5.1.2] at org.linagora.linshare.core.facade.webservice.user.impl.WorkGroupEntryAsyncFacadeImpl.upload(WorkGroupEntryAsyncFacadeImpl.java:88) ~[classes/:5.1.2] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.2.20.RELEASE.jar:5.2.20.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.2.20.RELEASE.jar:5.2.20.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.2.20.RELEASE.jar:5.2.20.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367) ~[spring-tx-5.2.20.RELEASE.jar:5.2.20.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118) ~[spring-tx-5.2.20.RELEASE.jar:5.2.20.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.20.RELEASE.jar:5.2.20.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) ~[spring-aop-5.2.20.RELEASE.jar:5.2.20.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.20.RELEASE.jar:5.2.20.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.2.20.RELEASE.jar:5.2.20.RELEASE] at com.sun.proxy.$Proxy221.upload(Unknown Source) ~[?:?] at org.linagora.linshare.webservice.userv1.task.WorkGroupEntryUploadAsyncTask.runMyTask(WorkGroupEntryUploadAsyncTask.java:57) ~[classes/:5.1.2] at org.linagora.linshare.webservice.userv1.task.WorkGroupEntryUploadAsyncTask.runMyTask(WorkGroupEntryUploadAsyncTask.java:44) ~[classes/:5.1.2] at org.linagora.linshare.webservice.userv1.task.AsyncTask.run(AsyncTask.java:80) ~[classes/:5.1.2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?] at java.lang.Thread.run(Thread.java:829) ~[?:?] [ERROR]:taskExecutor-2:20221206.085318:org.linagora.linshare.webservice.userv1.task.WorkGroupEntryUploadAsyncTask:run:Exception processing template (template: "WORKGROUP_WARN_NEW_WORKGROUP_DOCUMENT:subject @TEXT ({lang=ENGLISH, mailConfig=MailConfig [domain=Domain [uuid=LinShareRootDomain, label=LinShareRootDomain], name=EMM, visible=true, readonly=false, uuid=0301b995-0312-4b4d-bfe8-93a0091e82cb]})") [ERROR]:taskExecutor-2:20221206.085318:org.linagora.linshare.webservice.userv1.task.WorkGroupEntryUploadAsyncTask:run:Async task '7b3b91ef-30ef-409a-a71c-3ded4a824ff7' processed with final status : FAILED

In the mail configuration, WORKGROUP_WARN_NEW_WORKGROUP_DOCUMENT mail content type was missing.

We had to unconfigure, delete and recreate mail configuration, now the mail content type is present.

I don't know if it is a bug or not, we didn't have this problem in our test environment.

lacrimal commented 1 year ago

Do you use cli to add content or just modify content 'inline' ?

Our attachemets are added this way:

https://github.com/linagora/linshare/blob/master/documentation/EN/administration/how-to-use-mail-attachment.md

PhidarkMM commented 1 year ago

We have duplicated the default mail configuration and made a new mail layout, the method described in your link didn't worked for us in our Redhat 8 environment (https://github.com/fred49/linshare-cli/issues/10)

lacrimal commented 1 year ago

We have duplicated the default mail configuration and made a new mail layout, the method described in your link didn't worked for us in our Redhat 8 environment (fred49/linshare-cli#10)

We have Oracle Linux 8, only problem with cli was with configuration. Did you check your python version in /usr/local/bin/linshareadmcli and checked file encoding (it should be UTF-8 a;so watch line endings) ? mine is:

#!/usr/bin/python3.6

You can try to create vi /root/.linshare-admin-cli.cfg

minimal is:

[server]
host=https://fdqn.com
api_version=2.2
user=root@localhost.localdomain
password=***

then you can do:

>linshareadmcli mail_configs list
+---------------------+--------------------------------------+--------------------+----------+---------+---------------------+---------------------+
| name                | uuid                                 | domain             | readonly | visible | creationDate        | modificationDate    |
+---------------------+--------------------------------------+--------------------+----------+---------+---------------------+---------------------+
| Default mail config | 946b190d-4c95-485f-bfe6-d288a2de1eda | LinShareRootDomain | True     | True    | 2022-03-16 10:43:48 | 2022-03-16 10:43:48 |
+---------------------+--------------------------------------+--------------------+----------+---------+---------------------+---------------------+