Onlyoffice continuously disconnects

When i tried to open a document, i got this error message in the logs.

[onlyoffice] Error: Exception: Error occurred in the document service: Error while downloading the document file to be converted. at <<closure>>

0. /var/www/html/apps/onlyoffice/lib/DocumentService.php line 95
1. /var/www/html/apps/onlyoffice/lib/DocumentService.php line 446
2. /var/www/html/apps/onlyoffice/lib/Cron/EditorsCheck.php line 144
3. /var/www/html/lib/public/BackgroundJob/Job.php line 86
4. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 103
5. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 93
6. /var/www/html/cron.php line 152

at 2023-08-30T22:35:07+00:00

I can resolve it by going to Administration settings, onlyoffice, server settings and hitting save and everything works again without changing any settings.

Is there a way to permanently resolve this instead of the manual intervention?

Hello i am in the same situation, when i look into the log at the time i receive the notification about OnlyOffice is disconnected, i found this line :

"method":"","url":"--","message":"CLI cron call has selected job with ID 301174","userAgent":"--","version":"","data":{"app":"cron"}}
{"reqId":"ZJLPawdGPg4AwAvfUR0z","level":0,"time":"2023-09-11T01:30:03+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"CLI cron call has selected job with ID 301265","userAgent":"--","version":"","data":{"app":"cron"}}
{"reqId":"ZJLPawdGPg4AwAvfUR0z","level":0,"time":"2023-09-11T01:30:03+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Run OCA\\DocumentServer\\BackgroundJob\\Cleanup job with ID 301265","userAgent":"--","version":"","data":{"app":"cron"}}
{"reqId":"ZJLPawdGPg4AwAvfUR0z","level":0,"time":"2023-09-11T01:30:03+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Finished OCA\\DocumentServer\\BackgroundJob\\Cleanup job with ID 301265 in 0 seconds","userAgent":"--","version":"","data":{"app":"cron"}}

but cannot explain if it’s normal or not …

I am currently on Nextcloud Hub 5 (27.0.2) and Only Office Document Server EE

1 Like

It is obviously referring to some type of cron running in the background, but since it has different PID’s i would imagine you would have had to trace the PID back to onlyoffice to see if it matched, but i wouldnt know much else afterwards.

The strange thing about my issue is that i get these browser notifications that it has been disconnected and often it hasnt.

In any event, when i simply re-save the settings, onlyoffice works again but it is hardly convenient.

Sorry, i thought it said PID, it says ID…i have no idea what that means.

yes it’s exactly the same for me, every day i have this notification and have just to press save in the configuraton get onlyoffice up again

1 Like

The strange thing is that sometimes i get that browser notification and it is not the case; however, when i get it from nextcloud it is the case.
There must be a way of fixing this, and…
I just checked github and maybe there is…

To solve this, we added an asynchronous background task which runs on the server to check availability of the editors. It allows testing the connection between your Nextcloud instance and ONLYOFFICE Document Server, namely availability of server addresses and the validity of the JWT secret are being checked.

If any issue is detected, the ONLYOFFICE integration connector (consequently, the ability to create and open files) will be disabled. As a Nextcloud admin, you will get the corresponding notification.

This option allows you to avoid issues when the server settings become incorrect and require changes.

By default, this background task runs once a day. If necessary, you can change the frequency. To do so, open the Nextcloud config file (/nextcloud/config/config.php). Insert the following section and enter the required value in minutes:

‘onlyoffice’ => array ( ‘editors_check_interval’ => 3624 )

To disable this check running, enter 0 value.

Do you made a try to disable the check ? and see if you still have the disconnection ( or just the message without disconnection ) ?

To check the ?, do you mean disable certificate verification…it is checked now, but i don’t think that previously that it made a difference.

I have not made the changes in the config file as that makes me a bit nervous.

Hello, same problem here in my NC25. After upgrading OnlyOffice plugin 7.8.0 to 7.9.0, it was necessary to upgrade my OnlyOffice server from 7.1 to 7.2
Since then, every time my OnlyOffice container restarts every night, the cron signals that the server is down and the connection is permanently interrupted. You must return and save the settings in the plugin. I think the problem is with the plugin. I will do my best to solve this problem.

1 Like

Same issue, upgraded to NC 25.0.10 and OO plugin 7.9, OnlyOffice on dedicated VM.
OnlyOffice works just fine but at 11:45 every day it fails the check and then it’s not working until I press Save in OO plugin settings.
After that it works fine again.
It also fails the check with this: occ onlyoffice:documentserver --check
with the following error
Error connection: Error occurred in the document service: Error while downloading the document file to be converted.

I’ll try to update to NC 25.0.12 and OO 7.4 this weekend and post the result.

NC 25.0.12
OOP 7.9

the problem persists

NC 27.1.1
OO 8.2
doenst work

I had the same problem and managed to resolve by doing next:

  1. go to ‘Advanced server settings’ of connector plugin;
  2. ‘Authorization header’ - left blank
  3. ‘ONLYOFFICE Docs address for internal requests from the server’ - was blank and I supplied FQDN of my doc server;
  4. ‘Server address for internal requests from ONLYOFFICE Docs’ - was blank and I provided FQDN of my NC server
    With these configs the check passes:
root@nextcloud-2:/var/www/nextcloud# sudo -u www-data php occ onlyoffice:documentserver --check
Document server https://onlyoffice."my_fqdn"/ version is successfully connected

Short description of my setup:
VM1 - NC v. 27.1.1
VM2 - OO 7.4.1

I juts tried that, and unfortunately i got an error when trying to connect, so i had to leave the settings as default.

I had to keep https:/// for #3
i had to keep for #4

We are using the same address for the document server and it is

Any further advice on this would be highly appreciated.

I fixed it by filling the last parameter (Server address for internal requests Onlyoffice Docs) in Advanced server setting with FQDN of NC server. It was empty by default, showing the same address as example, so I decided that it uses it anyway.
After adding FQDN, occ onlyoffice:documentserver --check completed successfully:
Document server https://onlyoffice.mydomain/ version is successfully connected

i tried it again and used the following

For docs server—used docs server and port vs https://<docserver</ which was there
For server address for internal address , i actually typed in the cloud domain with https…
And it took it.

Interestingly enough, when i log in, i see https://<docserver</ again, and the same domain address as before.

It was successful updated, but i dont know if it will continue. I will update tomorrow if it does without manually saving the settings like i have done in the past.