ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.76k stars 1.08k forks source link

High CPU usage bec of Error: Configuration property "services.CoAuthoring.server.assemblyFormatAsOrigin" is not defined #1472

Closed jcn50 closed 2 years ago

jcn50 commented 2 years ago

I am having a High CPU usage with many process like those: 15654 ds 20 0 559368 45932 24020 R 6.6 2.2 0:00.20 /var/www/onlyoffice/documentserver/server/FileConverter/converter /snapshot/server/build/server/FileConverter/sources/convertermaster.js 1132 ds 20 0 593420 46936 24256 S 0.3 2.3 0:09.79 /var/www/onlyoffice/documentserver/server/FileConverter/converter 1127 ds 20 0 579536 34196 24160 S 0.0 1.7 0:00.16 /var/www/onlyoffice/documentserver/server/Metrics/metrics ./config/config.js

And the first process comes back with another ID again & again forever.

After digging I have many errors like those:

cat /var/log/onlyoffice/documentserver/converter/err.log Error: Configuration property "services.CoAuthoring.server.assemblyFormatAsOrigin" is not defined at Config.get (/snapshot/server/build/server/DocService/node_modules/config/lib/config.js:203:11) at Object.<anonymous> (/snapshot/server/build/server/DocService/sources/canvasservice.js:0:0) at Module._compile (pkg/prelude/bootstrap.js:1320:22) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:651:32) at tryModuleLoad (internal/modules/cjs/loader.js:591:12) at Function.Module._load (internal/modules/cjs/loader.js:583:3) at Module.require (internal/modules/cjs/loader.js:690:17) at Module.require (pkg/prelude/bootstrap.js:1225:31) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/snapshot/server/build/server/DocService/sources/wopiClient.js:0:0) at Module._compile (pkg/prelude/bootstrap.js:1320:22)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:651:32)
at tryModuleLoad (internal/modules/cjs/loader.js:591:12) at Function.Module._load (internal/modules/cjs/loader.js:583:3) pkg/prelude/bootstrap.js:1244 throw error;
^

Finally: I have never edited any configuration file, and running the latest version.

ShockwaveNN commented 2 years ago

Moved this issue to DocumentServer repo, since seems this problem not directly related to nextcloud Integration

Those errors in /var/log/onlyoffice/documentserver/converter/err.log is definitely incorrect

Are you run upgrade of DocumentServer recently? Seems that upgrade didn't go well and /etc/onlyoffice/documentserver/default.json is missing this line (and probably some others)

I think restoring those lines and restarting all services via supervisorctl restart all will be enough

jcn50 commented 2 years ago

Are you run upgrade of DocumentServer recently?

I upgrade the server using YunoHost each time there is an update.

/etc/onlyoffice/documentserver/default.json is missing this line (and probably some others)

You are correct, it was also missing the entire wopi definitions, and also services.CoAuthoring.server.newFileTemplate.

Thanks for your help! 👍

On a side note: Is there a way to regenerate /etc/onlyoffice/documentserver/default.json with my current installation?

ShockwaveNN commented 2 years ago

I upgrade the server using YunoHost each time there is an update.

I never heard about that, so I don't think I can comment something about this hosting system

Is there a way to regenerate /etc/onlyoffice/documentserver/default.json with my current installation?

I think you should just replace file (making backup of your broken file just in case) from github - and that's good to go, since default.json is not meant to be changed - all changes and personal configuration placed in local.json file in same dir

jcn50 commented 2 years ago

Thanks for the tip! Issue is closed/

nahoj commented 1 year ago

Thank you for the error report and fix. I had a similar issue with a different property and fixed it in a similar way, see https://github.com/ONLYOFFICE/DocumentServer/issues/2082#issuecomment-1564622445.

jcn50 commented 1 year ago

Thanks @nahoj, the problem was the same again today so I had to run the following command to fix the issue

\cp /etc/onlyoffice/documentserver/default.json.dpkg-dist /etc/onlyoffice/documentserver/default.json && supervisorctl restart all

It's probably good to run this command after an upgrade OR make it a monthly cron~