OnlyOffice fails to starts - fresh install

What app is this about, and its version: OnlyOffice 9.1.0~ynh1
What YunoHost version are you running: 12.1.29
What type of hardware are you using: Raspberry Pi 3, 4+

Describe your issue

Trying to install OnlyOffice to connect to my Nextcloud.
However I am unable to access it, with a 502 bad gateway error.
By looking at the services, I see that both onlyoffice-converter and onlyoffice-docservices are unable to start.
This is a fresh install.
I tried to look at the forum and other places in the web, but haven’t found any ideas to work around.
Thank you for your help.

Share relevant logs or error messages

The log for onlyoffice-converter
paste[dot]yunohost[dot]org/atobisorut

The log for onlyoffice-docservice
paste[dot]yunohost[dot]org/vefeyaxuri

As I am a new user, I cannot past links in messages… that’s why the [dot]. Thank you for your understanding.

I’m experiencing the same problem after I upgraded onlyoffice a few days back.

This is what I see in the log:

      throw error;
      ^

Error: Configuration property "aiSettings.pluginDir" is not defined
    at Config.get (/snapshot/src/DocService/node_modules/config/lib/config.js:181:11)
    at Object.<anonymous> (/snapshot/src/DocService/sources/ai/aiEngineWrapper.js)
    at Module._compile (pkg/prelude/bootstrap.js:1934:22)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at Module.require (pkg/prelude/bootstrap.js:1855:31)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/snapshot/src/DocService/sources/ai/aiProxyHandler.js)

Node.js v18.20.8
pkg/prelude/bootstrap.js:1876

Christian

There is a ticket for that issue: After upgrade from 9.0.4~ynh6 to 9.1.0~ynh1 onlyoffice-docservice doesn't start Ā· Issue #194 Ā· YunoHost-Apps/onlyoffice_ynh Ā· GitHub

I tried restoring a backup but now I have a 403 error on myofficeserver.tld/web-apps/apps/api/documents/api.js?shardKey=XXXXX when opening a document… Did anyone solve that?

Hi @roch @chriz @nicofrand
Same here, but only on the version with ā€œlimitations usageā€ removed.

First I had this error

/var/www/onlyoffice__2/config/local.json': SyntaxError: JSON5: invalid character 'T' at 66:19

=> fixed by setting true and not True in this file, line 66.

Then I compared 9.1, 9.0.4 ā€œfullā€ versions and 9.1 ā€œlimitedā€.

9.1 ā€œfullā€ version doesn’t run with some new settings (… when 9.1 limited does, of course).

I added the pluginDir k+v line in 9.1 from 9.0.4 in /var/www/onlyoffice/config/default.json:

   "aiSettings": {
    "actions": {},
    "models": [],
    "providers": {},
    "version": 3,
    "timeout": "5m",
    "allowedCorsOrigins": ["https://onlyoffice.github.io", "https://onlyoffice-plugins.github.io"],
    "proxy": "",
    "pluginDir" : "../branding/info/ai" # <== add this line

Didn’t solve issue and new error log appeared :

TypeError: layout is not a function
    at /snapshot/src/Common/node_modules/log4js/lib/appenders/console.js:6:16
    at /snapshot/src/Common/node_modules/log4js/lib/log4js.js:43:5
    at Array.forEach (<anonymous>)
    at sendLogEventToAppender (/snapshot/src/Common/node_modules/log4js/lib/log4js.js:42:21)
    at /snapshot/src/Common/node_modules/log4js/lib/clustering.js:25:28
    at Array.forEach (<anonymous>)
    at sendToListeners (/snapshot/src/Common/node_modules/log4js/lib/clustering.js:25:13)
    at Object.send (/snapshot/src/Common/node_modules/log4js/lib/clustering.js:91:7)
    at Logger._log (/snapshot/src/Common/node_modules/log4js/lib/logger.js:195:16)
    at Logger.log (/snapshot/src/Common/node_modules/log4js/lib/logger.js:155:12)

Node.js v18.20.8
/snapshot/src/Common/node_modules/log4js/lib/appenders/console.js:6
    consoleLog(layout(loggingEvent, timezoneOffset));
               ^

fixed by reverting /var/www/onlyoffice/config/log4js/production.json to 9.0.4 version :

{
        "appenders": {
                "default": {
                        "type": "console",
                        "layout": {
                                "type": "pattern",
                                "pattern": "[%d] [%p] [%X{TENANT}] [%X{DOCID}] [%X{USERID}] %c - %.10000m"
                        }
                }
        },
        "categories": {
                "default": { "appenders": [ "default" ], "level": "WARN" }
        }
}

That’s a workaround but OO runs…

La source pour la version recompilƩe pointe vers 9.0.4

mais plusieurs fichiers de configuration viennent de 9.1.0.

Mais pas de version 9.1 disponible (?)

Merci,
je vais attendre donc une nouvelle version qui corrige Ƨa.

Same here.
Do you think we need to file a bugreport elsewhere?

PR submitted and merged.
You can upgrade to latest version.

1 Like

After upgrading, in services everything looks okay. services are started.
But I still get:
Error when trying to connect (Server error: GET https://office.mydomainname.es/healthcheck resulted in a 502 Bad Gateway response:

502 Bad Gateway

body {
width: 35em;
margin: 0 a (truncated…)
)

Okay, this is how I got it working again.
Go to Nextcloud , onlyoffice server settings and disable certificate verification
SAVE
then enable again
SAVE
and now all is fine.
Something to do with a certificate trust mismatch

Christian

Unfortunately, I just installed onlyoffice 9.1.0~ynh2 but I’ve the same ā€œ502 bad gateway errorā€ (on amd64 arch).

on 9.1.0~ynh1 I succeed making it work by following @otm33 tricks (modifying local.json + default.json + production.json)
on 9.1.0~ynh2, it seems production.json is fine, but modifying other json files doesn’t allow onlyoffice to work

@chriz disabling/re-enabling certificate verification doesn’t work for me

Hello @banquise
Is the local.json correctly formatted: no uppercase letters, no suspicious ā€˜True’?
I keep having this recurring issue on one of my servers (but not on the others…).
And what does the onlyoffice-converter log show ?

have also a look at sudo rabbitmqctl list_vhosts

There are uppercase in local.json but only in strings such as ā€œCoAuthoringā€ or ā€œAuthorizationā€ (which seems normal). I successfully validated the json with a parser.

In my converter.log, I’ve an important number of [ERROR] [localhost] [docId] [userId] nodeJS - [AMQP] Error: connect ECONNREFUSED ::1:5672
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)

The ā€œrabbitmqctl list_vhostsā€ command shows :
Listing vhosts …
name
/
onlyoffice

The service onlyoffice-docservice is KO, doing a restart loop :

  • Nov 04 18:06:51 systemd[1]: onlyoffice-docservice.service: Scheduled restart job, restart counter is at 58.
  • Nov 04 18:06:51 systemd[1]: Stopped onlyoffice-docservice.service - Docs Docservice.
  • Nov 04 18:06:51 systemd[1]: onlyoffice-docservice.service: Consumed 8.149s CPU time.
  • Nov 04 18:06:51 systemd[1]: Started onlyoffice-docservice.service - Docs Docservice.
  • Nov 04 18:06:58 systemd[1]: onlyoffice-docservice.service: Main process exited, code=killed, status=4/ILL
  • Nov 04 18:06:58 systemd[1]: onlyoffice-docservice.service: Failed with result ā€˜signal’.
  • Nov 04 18:06:58 systemd[1]: onlyoffice-docservice.service: Consumed 9.120s CPU time.

Ok. Try this : sudo systemctl restart rabbitmq-server

After having restarted rabbitmq-server I restarted onlyoffice.

  • The error in converter.log is gone
[2025-11-05T05:12:28.508] [WARN] [localhost] [docId] [userId] nodeJS - num of CPUs: 2; availableParallelism: 2                 
[2025-11-05T05:12:28.539] [WARN] [localhost] [docId] [userId] nodeJS - update cluster with 1 workers                           
[2025-11-05T05:12:28.584] [WARN] [localhost] [docId] [userId] nodeJS - worker 62197 started.
  • Error in onlyoffice-docservice remains
  - Nov 05 05:19:12 systemd[1]: Started onlyoffice-docservice.service - Docs Docservice.                                       
  - Nov 05 05:19:20 systemd[1]: onlyoffice-docservice.service: Main process exited, code=killed, status=4/ILL                  
  - Nov 05 05:19:20 systemd[1]: onlyoffice-docservice.service: Failed with result 'signal'.                                    
  - Nov 05 05:19:20 systemd[1]: onlyoffice-docservice.service: Consumed 9.806s CPU time.                                       
  - Nov 05 05:19:50 systemd[1]: onlyoffice-docservice.service: Scheduled restart job, restart counter is at 1151.              
  - Nov 05 05:19:50 systemd[1]: Stopped onlyoffice-docservice.service - Docs Docservice.                                       
  - Nov 05 05:19:50 systemd[1]: onlyoffice-docservice.service: Consumed 9.806s CPU time.                                       
  - Nov 05 05:19:50 systemd[1]: Started onlyoffice-docservice.service - Docs Docservice.                                       
  - Nov 05 05:19:57 systemd[1]: onlyoffice-docservice.service: Main process exited, code=killed, status=4/ILL                  
  - Nov 05 05:19:57 systemd[1]: onlyoffice-docservice.service: Failed with result 'signal'.                                    
  - Nov 05 05:19:57 systemd[1]: onlyoffice-docservice.service: Consumed 7.856s CPU time.
  • I still have a 502 on healthcheck
502 Bad Gateway

body {
width: 35em;
margin: 0 a (truncated...)
)

I still haven’t found a solution to this issue
Am I the only one affected ?

Maybe related to the hardware…?
Sorry, I’m out of ideas. Did you try uninstalling and reinstalling ?

Yes reinstalling (nextcloud + onlyoffice) was the first thing I tried.
I’ll try again because there were updates in some other packages since then.
But each time I uninstall/reinstall, the file sharing is lost so it’s painful.

The arch is amd64.

Same error(s) in logs (onlyoffice, oo-docservice and oo-converter) ?