OnlyOffice callback error

Seafile Server Pro 6.1
Ubuntu 14.04.2
Python 2.7.12
Deployed DocumentServer via subfolder

After editing document in onlyoffice his dont saved with error:

2017-06-17 04:57:31,845 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /onlyoffice/editor-callback/
Traceback (most recent call last):
  File "/home/xface/haiwen/seafile-pro-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/xface/haiwen/seafile-pro-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/xface/haiwen/seafile-pro-server-6.1.0/seahub/seahub/onlyoffice/views.py", line 51, in onlyoffice_editor_callback
    doc_info = json.loads(cache.get("ONLYOFFICE_%s" % doc_key))
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

You may also need to check these two onlyoffice logs:
/var/log/onlyoffice/documentserver/converter/out.log
/var/log/onlyoffice/documentserver/docservice/out.log

look for information related to “/onlyoffice/editor-callback/”

docservice/out.log:

[ERROR] nodeJS - sendServerRequest error: docId = 182eca521eb2002ed02d;url = https://files.xhomenet.ru/onlyoffice/editor-callback/;data = {"key":"182eca521eb2002ed02d","status":2,"url":"https://files.xhomenet.ru/onlyofficeds/cache/files/182eca521eb2002ed02d_7608/output.docx/output.docx?md5=0hyt3cLVO5sIOgx0677B9A==&expires=1500406637&disposition=attachment&ooname=output.docx","changesurl":"https://files.xhomenet.ru/onlyofficeds/cache/files/182eca521eb2002ed02d_7608/changes.zip/changes.zip?md5=zR6mOSh5caV4ZGZLIUp11A==&expires=1500406637&disposition=attachment&ooname=output.zip","history":{"serverVersion":"4.3.6","changes":[{"created":"2017-06-18 19:37:08","user":{"id":"uid-1497814620976","name":"xface"}}]},"users":["uid-1497814620976"],"actions":[{"type":0,"userid":"uid-1497814620976"}],"lastsave":"2017-06-18T19:37:08.514Z","notmodified":false}
Error: Error response: statusCode:500 ;body:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>Page unavailable</title>
</head>
<body>
<h1>Page unavailable</h1>

<p>Sorry, but the requested page is unavailable due to a
server hiccup.</p>

<p>Our engineers have been notified, so check back later.</p>
</body>
</html>

at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:260:18)
at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1091:12)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)

do you have this problem even when you test if onlyoffice is working

http{s}://subdomain.com/welcome

no, i have no problem, https://files.xhomenet.ru/onlyofficeds/welcome/ url it work(you can try it). Documents are open in onlyoffice editor correct, but not saved.

in you earlier post you said you deployed it as subdomain. looks like its subfolder. correct me if i’m wrong.

is this with apache or nginx?

this looks more like a permissions error to me.

how are you running the container?

I’m sorry, I was wrong. Configured as a subfolder and runnig as container. Nginx

i have the same setup & works just fine.

my bet is on permissions.

what user runs the container? does it have rights to write to the data folder?

Also please check your nginx conf … 500 error could also mean that there might be a config problem

sudo(xface) user runs the container

there is a thread on this on onlyoffice github too

& here too

this looks like more of onlyoffice error than nextcloud.

in seahub.access.log i have:
“POST /onlyoffice/editor-callback/ HTTP/1.1” 500 380 “-” “-”

Please post the part of your nginx config regarding onlyoffice and how you run the container.

What is the version of the Docker image you run?

nginx.conf

location /onlyofficeds/ {

    proxy_pass http://127.0.0.1:88/;
    proxy_http_version 1.1;
    client_max_body_size 100; # Limit Document size to 100MB
    proxy_read_timeout 3600s;
    proxy_connect_timeout 3600s;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $proxy_connection;
    proxy_set_header X-Forwarded-Host $the_host/onlyofficeds;
    proxy_set_header X-Forwarded-Proto $the_scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Docker version 17.03.1-ce

First start docker container:
sudo docker run -dit -p 88:80 --restart always --name oods onlyoffice/documentserver
Then used command for start-stop:
sudo docker start/stop oods

I meant the version of the image for the document server.

If I found it right, then
“DockerVersion”: “1.13.0”
"onlyoffice/documentserver:latest
Or tell me please how I can find out?

That’s it more or less.

Please post your nginx config.

I posted it in OnlyOffice callback error

So far I cannot see any error.
You do have write access to the document you edit I suppose?!

Do you have any config in place that might stop the callback subfolder /onlyoffice/ from working properly?