Open eeuak opened 1 year ago
I have exact the same problem - integration is disabled every 24 hours.
Nextcloud 26.0.5, Integration app v 7.9.0, Onlyoffice 7.4.1.36
Everything runs in Docker.
Upgrade to Nextcloud 27.0.2 with app 8.2.0 does not solve the problem.
For the first time I added this value to the wrong section, like this and It didn't work:
sudo -u apache php /var/www/html/nextcloud/occ config:system:set onlyoffice editors_check_interval --value='0'
For my environment, I solved this problem by adding editors_check_interval --value='0' like this:
sudo -u apache php /var/www/html/nextcloud/occ config:app:set onlyoffice editors_check_interval --value='0'
in Docker
docker exec -u www-data nextcloud-app php occ config:app:set onlyoffice editors_check_interval --value='0'
Hi @pwddel, If your idea is right, I think that maybe you solved the problem with the first command.
Look here, is the place that this value is used in the code:
$interval = $this->GetSystemValue($this->_editors_check_interval);
This row call the method GetSystemValue
and this method do this:
In all places is a request to IConfig::getSystemValue
, this is to retrieve a value from config.php
file
When you use occ config:app:set
will save the setting in the database table appsettings
and not in the config.php
.
In the code, to retrieve the value defined by config:app:set, is necessary to use the method getAppValue
from a class that implement the interface IConfig
but the method used in the code is getSystemValue
.
To try your suggestion, you will need to use:
occ config:system:add onlyoffice editors_check_interval --value=0
A strange point at this method GetSystemValue
of this app is because I think that the appName can't be changed. The appName need to be the same as the folder of app (onlyoffice
) and also the same as the app_id (onlyoffice
).
Maybe the problem could be this and the value of property appName is defined with different values depending of the point that this class is instantiated generating a wrong call of value of this system setting.
Is necessary to debug this code and check the scenarios.
Maybe will be best to make the appName with a hardcoded string with value onlyoffice
. But, again, is necessary to debug this code and check the unit or integration tests of this app.
If somebody would like to dive deeper into this error maybe start at
/apps/onlyoffice/lib/cron/editorscheck.php line 146
the $error here is filled with something which is why the script thinks there is an error. I didn't yet have time to check out the contents of $error but it could be help with further debugging.
I fixed it by setting $error to en empty value by:
// Set the error to an empty value
$error = "";
The script now thinks there is no error.
Altough this isn't a clean solution so I will likely implement @pwddel 's. Thanks for that!
Case isn't closed because it's still a bug!
The solution with editors_check_interval
does not work at all.
I've executed:
docker exec -u www-data nextcloud-app php occ config:app:set onlyoffice editors_check_interval --value='0'
docker exec -u www-data nextcloud-app php occ config:system:set onlyoffice editors_check_interval --value='0'
Now I have a section in config.php
'onlyoffice' =>
array (
editors_check_interval => '0',
),
Anyway, the integration is still disabled every 24 hours.
don't work for me in NC 27.0.2 and OnlyOffice App 8.2.0
i have added in my config.php
'onlyoffice' => array ( editors_check_interval => '0', ),
with no result
Same problem here, NC 27.0.2.1, OnlyOfficeApp 8.2.0.
I don't think that the core of the problem is, in which interval the check is done, but that it resolves in an error, even if you start it manually, i.e. with
php occ onlyoffice:documentserver --check
In the log I see the error "GetConvertedUri on check error"
Well, the ConvertedUri is also displayed.
I got my nextcloud-installation in a subdirectory, so its url is in the format "https://myhost.someddns.tld/nextcloud"
I see in the error that the script tries to get some file from "https://myhost.someddns.tld/nextcloud/nextcloud/index.php/apps/onlyoffice/empty?doc=somethingweird"
So it doubles the name of the subdirectory in the path.
So I guess it is some error in building the uri.
In the frontend, everything works like a charm.
Thanks in advance
if setting editorscheck interval isn't solving it try my temp fix above.
The issue is with forming the URL for the background conversion task, we'll fix this on our side. In the meantime, please try specifying Nextcloud's address in the "Advanced server settings" section of the connector options (the last field there).
I have exact the same problem.
Everything is running in Docker containers.
The issue is with forming the URL for the background conversion task, we'll fix this on our side. In the meantime, please try specifying Nextcloud's address in the "Advanced server settings" section of the connector options (the last field there).
Perfect, i will give this a try!
The issue is with forming the URL for the background conversion task, we'll fix this on our side. In the meantime, please try specifying Nextcloud's address in the "Advanced server settings" section of the connector options (the last field there).
No, error still persists when trying
php occ onlyoffice:documentserver --check
The URL keeps being misformed.
on test, it seems that the @SergeyKorneyev solution work for me
The issue is with forming the URL for the background conversion task, we'll fix this on our side. In the meantime, please try specifying Nextcloud's address in the "Advanced server settings" section of the connector options (the last field there).
We had that setting specified too, didn't work. But thank you for looking into a fix.
The issue is with forming the URL for the background conversion task, we'll fix this on our side. In the meantime, please try specifying Nextcloud's address in the "Advanced server settings" section of the connector options (the last field there).
Two days without any ONLYOFFICE server is not available
error. Seems like this workaround works for me. Thanks @SergeyKorneyev
We have the same problem (NC 27.1.1; OnlyOffice App 8.2.0) tried the workaround from @SergeyKorneyev but alas, no luck.
We'll be releasing a hotfix soon that will include two main changes related to this new functionality:
127.0.0.1
will be considered a valid address during the check. This is what's causing most of the issues.
https://github.com/ONLYOFFICE/onlyoffice-nextcloud/pull/873The official general recommendation is still to specify Nextcloud's address in the "Advanced server settings" to avoid issues with the check.
For anyone who would like to try out the fixes before they make it into the next connector version, here are the builds that include the changes (for manual installation):
We applied this patch right now.
And php occ config:app:set onlyoffice editors_check_interval --value='0'
We'll report here if we have troubles.
But here we just disable the check, it is a nice workaround, I think, like in this issue that the check is buggy (having the admin notified that oo is down is a nice feature actually :) ).
Thanks for your help and have a nice day!
Somehow, it still was running.
I tried with this command ( I thouggh that maybe it was sensitive to string instead of int, but reading the code, it should'nt have been..):
php occ config:app:set onlyoffice editors_check_interval --value=0
But same result.
We decided to remove the background job from info.xml and remove the cron folder.
I think this time this will work.
The version that includes the fixes (7.9.2/8.2.2) has just been released. Please try updating the connector and check if that helps.
We still have this problem.
Clicking 'Save' in the connector admin settings always works, occ onlyoffice:documentserver --check
always fails (Error connection: Error occurred in the document service: Error while downloading the document file to be converted.
).
The URLs are all set in the advanced settings.
I did now set editors_check_interval
for app
and system
to 0, we'll know tomorrow if that helps, but that's certainly not the solution we'd want...
Update to my previous comment: Setting editors_check_interval
to 0 did not help, the ONLYOFFICE server was disconnected again.
In case it's relevant: The server address provided is not localhost but a https URI. Everything works fine when the connection is established in the ONLYOFFICE connector admin settings until the disconnect happens once a day.
Is there a regression in 8.2.4? Is something wrong with the Docker image? Is there any way I can see what the actual error during the connection check is?
For, us, this worked: remove the background job from info.xml and remove the cron folder.
For, us, this worked:
remove the background job from info.xml and remove the cron folder.
Thanks, I'll try that. [I had read it before but was worried that it would stop other background processing (syncing files has been an issue before), but I read the source file in the folder and it indeed only seems to do this failing check.]
Edit: This worked, thanks!
The version that includes the fixes (7.9.2/8.2.2) has just been released. Please try updating the connector and check if that helps.
Problem still occours, same behavior as my initial issue.
@eeuak What kind of errors do you get in the logs? Does disabling the cron job with "editors_check_interval = 0" help?
@eeuak What kind of errors do you get in the logs? Does disabling the cron job with "editors_check_interval = 0" help?
No errors in the log. Disabling the cron job didn't work initially, I don't know if that changed since the last version but I also don't really want to test in our productive environment.
I patched it with my first solution for now:
If somebody would like to dive deeper into this error maybe start at
/apps/onlyoffice/lib/cron/editorscheck.php line 146
the $error here is filled with something which is why the script thinks there is an error. I didn't yet have time to check out the contents of $error but it could be help with further debugging.
I fixed it by setting $error to en empty value by:
// Set the error to an empty value $error = "";
The script now thinks there is no error.
Altough this isn't a clean solution so I will likely implement @pwddel 's. Thanks for that!
Case isn't closed because it's still a bug!
Once the editors_check_interval
check is fixed I can confirm you that the right command for disabling this cron check is:
php occ config:system:set onlyoffice editors_check_interval --value=0
The config:app:set
is not used at all in the current code.
Feedback on this editors_check_interval
check fix: https://github.com/ONLYOFFICE/onlyoffice-nextcloud/pull/960/commits/222223f212e6f66b5feba645a0ab0bce2d4b2961 which I have not been able to test as much as I would have wanted is welcome.
Thank you.
Update: No need of feedback for this commit. Apparently this is going to be fixed thanks to: https://github.com/ONLYOFFICE/onlyoffice-nextcloud/pull/965 in a future release.
Even with the standard interval of 1 day https://github.com/ONLYOFFICE/onlyoffice-nextcloud/pull/965/commits/e0b00c26b393c3d2e06c781c58de717f79b68d63#diff-8a773f79d952cb7c96f53ced13f5513dc2556bd373a355739742ef8a95378f56R1337 we have observed a much lower timespan (less than 1 hour) that the OO app decides, that the server is not anymore available and thus de-activates it. If we do maintenance on the OO server, we have to go through all Nexctlouds and in the OO admin settings press again SAVE after copy/pasting the same server address to activate it again.
Observed on NC 28.0.6 with OO 9.3 and also on other instances using an external OO server 7.5.1 on k8s.
Hi! Suddenly I have started to experience the similar issue. Are any chances to fix it or to add occ command which I can add to cron in order the Save button is clicked via script? Or as a workaround to restart the OO container at a specific time?
Hi! Suddenly I have started to experience the similar issue. Are any chances to fix it or to add occ command which I can add to cron in order the Save button is clicked via script? Or as a workaround to restart the OO container at a specific time?
it's not a problem of saving, the problem is the check function. It can be deactivated as I wrote above. This is the only solution that helped me so far.
Hi, I have a very strange issue which occours now after updating to connector version 7.9.0 and NC version 26.0.5
When I save my Onlyoffice connector settings in the GUI in Nextcloud everything works fine, but every day at around 9:20 some kind of background job is running on NC which triggers an error message "Error occurred in the document service: Error while downloading the document file to be converted." which can be seen in nextcloud log. After that the connector looses the connection and I have to click "Save" (settings are still in the correspondig field) in the GUI to get onlyoffice running again.
I also found that the command "php8.1 occ onlyoffice:documentserver --check" triggers the exact same behavior. When I run this command the output is "Error connection: Error occurred in the document service: Error while downloading the document file to be converted." and the settings are reset in the gui. Then I again have to press save to get the connection back. This makes me assume that whatever cron job is running at 9:20 it triggers this command. This seems to me as wrong behavior because how can the gui successfully connect to the onlyoffice server but the backend connection check throws an error? (Please correct me if it's my configs fault that would make the whole thing easyer)
It was really hard to find the problem as there was absolutely no sign except of that onlyoffice in nextcloud wasnt available the past after 9 a.m....
I already looked around for the error message and tried different approaches for the connection configuration. Nothing helped for the error when triggering "php8.1 occ onlyoffice:documentserver --check".
I now stopped testing since it is a productive environment and we have a lot of people using this service. Currently I'm living with that every day I have to save the settings manually at around 9 a.m. but I hope you can help me to get rid of this as this is very unstable.
If you need any further info please let me know. Thanks a lot! Here you can see the logs that helped me find the problem:
Error message at 9:20 in nextcloud.log:
Why I think it is a background job:
Corresponding error message when triggering the occ command on Onlyoffice server: /var/log/onlyoffice/documentserver/converter/out.log:
One thing I noticed is that the URL is very wrongly formatted, could this be the cause of the problems? And what makes this url look like this?: downloadFile:url=https://cloud.my-domain.com/cloud/index.phphttps://cloud.my-domain.com/cloud/appshttps://cloud.my-domain.com/cloud/onlyofficehttps://cloud.my-domain.com/cloud/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.eW7wRtQ9W88J_6H0dEirstYRVQ_7O5LuXkgeJpwetP0