nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
349 stars 115 forks source link

Collabora resets file changes at server restart #3799

Open Roman991 opened 3 months ago

Roman991 commented 3 months ago

Describe the bug

A Spreadsheet.ods loses all changes after a server restart

To Reproduce

Steps to reproduce the behavior:

  1. Create a new spreadsheet.ods
  2. Make some changes by 2 or more users'
  3. Leave users logged with the file opened
  4. Restart the instance (in my case the last AIO)
  5. Go back to the file and the changes are gome

Client details:

Server details

Operating system:

Web server:

Database:

PHP version:

Nextcloud version:

Version of the richdocuments app

Version of Collabora Online 24.04.4.1 Configuration of the richdocuments app

Insert the output of `./occ config:list richdocuments` (or equivalent adapted for your runtime environment)
Logs #### Nextcloud log (data/nextcloud.log) ``` ...some of this [richdocuments] Error: Failed to validate WOPI access during save POST /index.php/apps/richdocuments/wopi/files/384133_ocd1clqcq7ei/contents?access_token=HrR1B6y00lklfNNIGf1mkPcEzC6BVAJ9&access_token_ttl=0&permission=edit from 127.0.0.1 by -- at 24 giu 2024, 22:38:42 ```
juliushaertl commented 3 months ago

Can you tell how you restart the server? Generally Collabora should handle restarts gracefully and save back the files if i remember correctly.

FYI @pedropintosilva Maybe you can poke someone who can tell more about that?

Roman991 commented 3 months ago

The restart should be managed by this script https://github.com/nextcloud/all-in-one/blob/main/Containers/mastercontainer/daily-backup.sh

I meant the restart of docker containers, not of whole server, mb

juliushaertl commented 2 weeks ago

I tried to reproduce this but could not see any issue. Do you have a way to reliably reproduce this by manually restarting the docker container of Collabora? Any chance you could gather the docker logs during that time to see if there are any errors reported?

juliushaertl commented 2 weeks ago

One quick idea might be that while the containers are shutdown, collabora is still trying to save the file but the Nextcloud container is already unavailable.

@szaimen Could that happen? Any chance we could adapt the backup script so that collabora is shutdown first and only once finished the Nextcloud container is stopped?

szaimen commented 1 week ago

This is difficult I fear. Currently always the apache container gets shut down first which runs the reverse proxy. So you say to fix this, we would need to change the order to shut down collabora first?