Onlyoffice dont save documents in seafile pro 6.2.12, but saved in CE 6.2.5 (UPD fixed in 6.2.13)

Hi!
I’m doing a clean install seafile CE 6.2.5 and onlyoffice, its worked fine
Then, i’m upgrade seafile CE to seafile pro 6.2.12 and onlyoffice stops saving documents
in seahub_access.log:

[07/May/2018:15:58:14 +0300] “POST /onlyoffice/editor-callback/ HTTP/1.1” 200 22 “-” “-”

then

[07/May/2018:16:00:31 +0300] “POST /onlyoffice/editor-callback/ HTTP/1.1” 499 0 “-” “-”

in documentserver i have:

[ERROR] nodeJS - sendServerRequest error: docId = 939c803f2a35535bfed0;url = https://files.zping.ru/onlyoffice/editor-callback/data = {"key":"939c803f2a35535bfed0","status":2,"url":"https://files.zping.ru/onlyofficeds/cache/files/939c803f2a35535bfed0_4327/output.docx/output.docx?md5=djZB2kvw8xG2WzQt6B_X4g==&expires=1528295832&disposition=attachment&ooname=output.docx","changesurl":"https://files.zping.ru/onlyofficeds/cache/files/939c803f2a35535bfed0_4327/changes.zip/changes.zip?md5=NeALs8PWNzp7nrb6THufOw==&expires=1528295832&disposition=attachment&ooname=output.zip","history":{"serverVersion":"5.0.6","changes":[{"created":"2018-05-07 14:37:03","user":{"id":"uid-1525703822797","name":"m.chernyavskiy"}}]},"users":["uid-1525703822797"],"actions":[{"type":0,"userid":"uid-1525703822797"}],"lastsave":"2018-05-07T14:37:03.638Z","notmodified":false}

Error: ESOCKETTIMEDOUT
at ClientRequest.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:813:19)
at ClientRequest.g (events.js:292:16)
at emitNone (events.js:86:13)
at ClientRequest.emit (events.js:185:7)
at TLSSocket.emitTimeout (_http_client.js:630:10)
at TLSSocket.g (events.js:292:16)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket.Socket._onTimeout (net.js:338:8)
at ontimeout (timers.js:386:11)

in seahub.log

2018-05-07 14:58:29,971 [INFO] seahub.onlyoffice.views:70 onlyoffice_editor_callback 6919a958-0c29-4ef1-b4f5-4bdfcb0c4d89/test.docx updated by

Solved the problem by replacing the folder

~/haiwen/seafile-pro-server-6.2.12/seahub/seahub/onlyoffice

to

~/haiwen/seafile-server-6.2.5/seahub/seahub/onlyoffice

You have to reconfigure it, because the .conf files changed.

After the upgrade to seafile-pro, the configuration files are not changed
Which file of settings do you mean

Cause of the WSGI mode. There should be something, but I’m not using Pro Version.

Are you saying that you just upgraded your server and it resolved the issue?

Are you seeing any evidence of the memcached file saving issue like that mentioned here?

I do not use memcached, I upgraded the server to 6.2.12 pro and took the folder /seahub/seahub/onlyoffice from 6. 2. 5 CE

This is caused since pro version 6.2.10 (Use inner fileserver url to save file when edit office via OOS). I’m already talking to the Seafile support to investigate the issue.

You should be able to get this running again by opening seafile-server-latest/seahub/seahub/onlyoffice/views.py, then change ‘gen_inner_file_upload_url’ back to ‘gen_file_upload_url’. See the + and - here:

diff --git a/seahub/onlyoffice/views.py b/seahub/onlyoffice/views.py
index 2ee36546f..1b1aae52a 100644
--- a/seahub/onlyoffice/views.py
+++ b/seahub/onlyoffice/views.py
@@ -11,7 +11,7 @@ from django.views.decorators.csrf import csrf_exempt
 from seaserv import seafile_api
 
 from .settings import VERIFY_ONLYOFFICE_CERTIFICATE
-from seahub.utils import gen_inner_file_upload_url
+from seahub.utils import gen_file_upload_url
 
 # Get an instance of a logger
 logger = logging.getLogger(__name__)
@@ -59,7 +59,7 @@ def onlyoffice_editor_callback(request):
             if not update_token:
                 return HttpResponse('{"error": 0}')
 
-            update_url = gen_inner_file_upload_url(update_token, 'update-api')
+            update_url = gen_file_upload_url(update_token, 'update-api')
 
             files = {
                 'file': file_content,

After this, restart seafile and seahub. I recommend to use the original pro code.

2 Likes

I’m pretty sure that I asked them about this on Github and was told it wouldn’t be an issue …

2 Likes

I hope we’ll find the problem soon.

Hello all.

I think I found what’s caused the problem, it’s my mistake.

As well as @marcusm’s temp solution, you can also manually change some code like this, and this solution will be merged into the next Seafile release:

open seafile-server-latest/seahub/seahub/onlyoffice/views.py, and then:

@@ -59,7 +59,7 @@ def onlyoffice_editor_callback(request):
             if not update_token:
                 return HttpResponse('{"error": 0}')
 
-            update_url = gen_inner_file_upload_url(update_token, 'update-api')
+            update_url = gen_inner_file_upload_url('update-api', update_token)
 
             files = {
                 'file': file_content,

Don’t forget to restart Seafile.

1 Like

No offence but did you ever hear about CI & CD?
Code quality testing before release?
Rather take more time before a release than to release a faulty version of code that renders your customers incapable to work.
We are talking about pro version here.

Yes, it is being used. But the tests do not cover everything …

I totally agree with this. Looking at the history, quite some versions have an immediate release following because some fault were found shortly after publishing it.

1 Like