linshare icon indicating copy to clipboard operation
linshare copied to clipboard

Problème d'enregistrement des fichiers en mode filesystem

Open xlyric opened this issue 4 years ago • 2 comments

L"appli refuse d'enregistrer les fichier télécharger sur le disque ( une erreur est survenue lors de l'envoie du fichier ) en mode filesystem ( le mode mongo ou swift fonctionne ) le répertoire /var/lib/linshare/filesystemstorage est existant et droit tomcat:tomcat , le filesystem ne se crée pas

CORE 5.1.2 Tomcat 9

openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Debian-1deb11u1, mixed mode)
           JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Xms512m
-Xmx2048m"
           JAVA_OPTS="${JAVA_OPTS}
-Dlinshare.config.path=file:/etc/linshare/"
           JAVA_OPTS="${JAVA_OPTS}
-Dlog4j2.configurationFile=file:/etc/linshare/log4j2.properties"
           JAVA_OPTS="${JAVA_OPTS}
-Dspring.profiles.active=default,jcloud,batches"
linshare.documents.storage.mode=filesystem
linshare.documents.storage.bucket=linshare-data
linshare.encipherment.tmp.dir=/var/lib/linshare/tmp
linshare.documents.storage.filesystem.directory=/var/lib/linshare/filesystemstorage

Logs :

[2022-12-02 14:02:05] [info] [INFO]:taskExecutor-4:20221202.140205:org.linagora.linshare.webservice.userv1.task.DocumentUploadAsyncTask:run:Begin processing async task : c2b3cc59-b87a-4e8c-9634-967786b1ffd4 [2022-12-02 14:02:05] [info] [INFO]:taskExecutor-4:20221202.140205:org.linagora.linshare.webservice.userv1.task.DocumentUploadAsyncTask:run:Begin processing async task : c2b3cc59-b87a-4e8c-9634-967786b1ffd4 [2022-12-02 14:02:05] [info] [INFO]:taskExecutor-4:20221202.140205:org.linagora.linshare.core.dao.impl.AbstractJcloudFileDataStoreImpl:add:sequence-8a392f89-4b8d-4954-8f3c-e19fb7cfbb19:uploading file using jcloud ... [2022-12-02 14:02:05] [info] [INFO]:taskExecutor-4:20221202.140205:org.linagora.linshare.core.dao.impl.AbstractJcloudFileDataStoreImpl:add:sequence-8a392f89-4b8d-4954-8f3c-e19fb7cfbb19:uploading file using jcloud ... [2022-12-02 14:02:05] [info] [INFO]:taskExecutor-4:20221202.140205:org.linagora.linshare.core.dao.impl.AbstractJcloudFileDataStoreImpl:createContainerIfNotExist:creation of a new bucket linshare-data without locale. [2022-12-02 14:02:05] [info] [INFO]:taskExecutor-4:20221202.140205:org.linagora.linshare.core.dao.impl.AbstractJcloudFileDataStoreImpl:createContainerIfNotExist:creation of a new bucket linshare-data without locale. [2022-12-02 14:02:05] [info] [ERROR]:taskExecutor-4:20221202.140205:org.linagora.linshare.webservice.userv1.task.DocumentUploadAsyncTask:run:linshare-data not found: container linshare-data not in [] [2022-12-02 14:02:05] [info] [ERROR]:taskExecutor-4:20221202.140205:org.linagora.linshare.webservice.userv1.task.DocumentUploadAsyncTask:run:linshare-data not found: container linshare-data not in [] [2022-12-02 14:02:05] [info] [ERROR]:taskExecutor-4:20221202.140205:org.linagora.linshare.webservice.userv1.task.DocumentUploadAsyncTask:run:Async task 'c2b3cc59-b87a-4e8c-9634-967786b1ffd4' processed with final status : FAILED [2022-12-02 14:02:05] [info] [ERROR]:taskExecutor-4:20221202.140205:org.linagora.linshare.webservice.userv1.task.DocumentUploadAsyncTask:run:Async task 'c2b3cc59-b87a-4e8c-9634-967786b1ffd4' processed with final status : FAILED

xlyric avatar Dec 02 '22 13:12 xlyric

Bonjour xlyric, as-tu paramétrer le service tomcat pour qu'il ait les droits? Cf doc :

Tomcat9 is sandboxed to write just in its own directories, if you try to use a local Filesystem storage you need to override the default configuration of Tomcat by creating in /etc/systemd/system/tomcat9.service.d/ a file named override.conf containing: [Service] ReadWritePaths=/var/lib/linshare

Then you need to: systemctl daemon-reload systemctl restart tomcat9

Max59C avatar Dec 02 '22 13:12 Max59C

effectivement ça fonctionne mieux, merci.

ça manque juste un peu de visibilité dans la doc.

xlyric avatar Dec 02 '22 14:12 xlyric