richdocuments icon indicating copy to clipboard operation
richdocuments copied to clipboard

Error log flooded with "OCP\Files\NotFoundException: No valid file found for wopi token"

Open Wikinaut opened this issue 2 years ago • 16 comments

  • NC 23.0.2
  • Collabora Online - Built-in CODE Server 21.11.204
  • Nextcloud Office 5.0.3

Wikinaut avatar Mar 07 '22 23:03 Wikinaut

Same problem here. Same versions.

himpierre avatar Mar 11 '22 09:03 himpierre

Can you paste the full json error from the log file?

juliushaertl avatar Mar 11 '22 11:03 juliushaertl

Here we go. {"reqId":"JW6vEdfz0WxgJq7QKNIf","level":3,"time":"2022-03-11T12:53:58+01:00","remoteAddr":"10.130.1.13","user":"juser","app":"richdocuments","method":"POST","url":"/index.php/apps/richdocuments/wopi/files/14030299_ocdvz2pbdg6j/contents?access_token=F1DwwAuiIEu6t4XFn1shiUPI3ZHjNPeR&access_token_ttl=0%2Fws%3FWOPISrc%3Dhttps%3A%2F%2Fdomain%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F14030299_ocdvz2pbdg6j&compat=","message":"getFile failed","userAgent":"COOLWSD HTTP Agent 21.11.2.4","version":"22.2.5.1","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"No valid file found for wopi token","Code":0,"Trace":[{"file":"/var/www/domain/htdocs/apps/richdocuments/lib/Controller/WopiController.php","line":493,"function":"getFileForWopiToken","class":"OCA\\Richdocuments\\Controller\\WopiController","type":"->","args":[{"id":2262,"__class__":"OCA\\Richdocuments\\Db\\Wopi"}]},{"file":"/var/www/domain/htdocs/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"putFile","class":"OCA\\Richdocuments\\Controller\\WopiController","type":"->","args":["14030299","F1DwwAuiIEu6t4XFn1shiUPI3ZHjNPeR"]},{"file":"/var/www/domain/htdocs/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\WopiController"},"putFile"]},{"file":"/var/www/domain/htdocs/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\WopiController"},"putFile"]},{"file":"/var/www/domain/htdocs/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Richdocuments\\Controller\\WopiController","putFile",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"fileId":"14030299_ocdvz2pbdg6j","_route":"richdocuments.wopi.putFile"}]},{"file":"/var/www/domain/htdocs/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/richdocuments/wopi/files/14030299_ocdvz2pbdg6j/contents"]},{"file":"/var/www/domain/htdocs/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/domain/htdocs/apps/richdocuments/lib/Controller/WopiController.php","Line":724,"CustomMessage":"getFile failed"}}

himpierre avatar Mar 11 '22 11:03 himpierre

Exact same problem, but I run different versions: Nextcloud: 22.2.5.1 Richdocuments: 4.2.5 NC build-in CODE: 21.11.204

I receive a new log entry like the one above every second and the virus scanner recognized a lot of DB accesses. I guess the tokens and stuff are queried from the DB.

For me always the same token is mentioned in the nextcloud.log, so I tried deleting this token from table oc_richdocuments_wopi, but that changed nothing.

delete from oc_richdocuments_wopi where token='8C6aviytXtWbYbrxPPMv5IMoeDPrV1Y8';

The log was still filling up with these messages mentioning that token. I had to disable the app as it put too much stress on my hardware :(

Schmuuu avatar Mar 15 '22 00:03 Schmuuu

Any news on that? we have the same problem: Nextcloud: 23.0.0 Richdocuments: 5.0.3 External CODE 21.11.2.4

sabufe avatar Mar 19 '22 10:03 sabufe

I also got this problem with the latest version 22.2.6 Collabora 4.2.5 Built-In Code 21.11.204

rogerpfaff avatar Mar 23 '22 07:03 rogerpfaff

Same problem

terralogia avatar Mar 27 '22 23:03 terralogia

Same...

ThierryBZH avatar Mar 31 '22 09:03 ThierryBZH

After install update NextCloud 23.0.3, it work fine.

terralogia avatar Mar 31 '22 09:03 terralogia

Same problem, disable "Collabora Online - Built-in CODE Server (ARM64)" and "Nextcloud Office". The error is gone and the ram usage goes down from 3.1 GB to 0.6 GB. After I re-enabled both, the error no longer occurred. I don't know if it is a permanent solution.

Eon600mark52 avatar Apr 12 '22 16:04 Eon600mark52

It's the blackbox coolforkit which goes mad, requesting wopi token at crazy rate and consuming high cpu (hey developers, you could throttle it a bit, no?) - NextCloud 23.0.3 used here. I usually do /etc/init.d/php7.3-fpm restart and it runs smoothly for the next day (nextcloud office is very long to start so editing is not working before 3-4 minutes). I'll probably cron it.

ThierryBZH avatar Apr 12 '22 19:04 ThierryBZH

some problem here on NC 24.0.0. With newest "nextcloud office" and ""Collabora Online - Built-in CODE Server" Regurarly restarting php-fpm "solves" the problem for a short while...

yennor avatar May 17 '22 21:05 yennor

Same problem on 23.0.5. Only the restart of php8.0-fpm stops it

Niclas-sol avatar Jun 20 '22 09:06 Niclas-sol

same here.. 23.0.6.

Any news ? currently crunching all my CPU..

julian70400 avatar Jul 05 '22 12:07 julian70400

Same issue here. NC 24.0.6 Built-in CODE server v22.5.502 Nextcloud office app v6.2.1 (happened using 6.2.0 too)

marcotrevisan avatar Oct 12 '22 10:10 marcotrevisan

I have experienced a similar issue but only when using richdocumentscode. To confirm this, can you try to disable richdocumentscode and then kill all remaining collabora processes and then reenable the app. Then check the logs again.

Something like:

occ app:disable richdocumentscode 
killall coolwsd
occ app:enable richdocumentscode

Raudius avatar Oct 12 '22 12:10 Raudius

We facing the same error and escalation after the referencing document was deleted and resulting in a lot of 500 errors.

meise avatar Oct 18 '22 11:10 meise

I know it's propably not a solution for everybody, but I've got rid of the build in code server and installed the code server as native packages. https://www.collaboraoffice.com/code/linux-packages/ in my case (debian stable), that solves (circumvents) the problem.

yennor avatar Oct 18 '22 12:10 yennor

We facing the same error and escalation after the referencing document was deleted and resulting in a lot of 500 errors.

Thanks, then we should probably check if Collabora heavily retries and if we rather need to return a proper http error code then.

juliushaertl avatar Oct 18 '22 15:10 juliushaertl

Upgraded Code Server to 22.5.702, the problem has'n showed up yet since the update.

New configuration:

  • NC 24.0.6
  • Built-in CODE server v22.5.702
  • Nextcloud office app v6.3.0

marcotrevisan avatar Oct 26 '22 16:10 marcotrevisan

Fix is in https://github.com/nextcloud/richdocuments/pull/2540 which will become available with the next release.

juliushaertl avatar Oct 27 '22 10:10 juliushaertl