Onlyoffice - Document could not be saved

Other (seems better) solution is described here: Force Saving OnlyOffice

I searched all forums quite extensively, but non of the solutions worked yet.

I have moved the document server to a new machine, spinned it up on docker as before. of course I had to change the dns and so the let encrypt certificates.

  • welcome page is accessible over https
  • certificates and dns are ok
  • reverse proxy also works
  • problem occurs with all versions of oods

Everything works fine, but when trying to save the document to the file storage an error occurs.

The exact error in the oods log:

[2020-07-30T13:14:47.391] [ERROR] nodeJS - sendServerRequest error: docId = a7dcc2a685e5bc08ce35;url = https://cloud.domain.de/onlyoffice/editor-callback/;data = {"key":"a7dcc2a685e5bc08ce35","status":2,"url":"https://oods.f-node.de/cache/files/a7dcc2a685e5bc08ce35_6200/output.xlsx/output.xlsx?md5=npoSQZOec7Ky9si85jpgLw&expires=1596115788&disposition=attachment&filename=output.xlsx","changesurl":"https://oods.f-node.de/cache/files/a7dcc2a685e5bc08ce35_6200/changes.zip/changes.zip?md5=5UFuDCXo2vddAK0bOCp2FQ&expires=1596115788&disposition=attachment&filename=changes.zip","history":{"serverVersion":"5.6.0","changes":[{"created":"2020-07-30 10:34:36","user":{"id":"uid-1596105268829","name":"xxx"}},{"created":"2020-07-30 12:25:49","user":{"id":"uid-1596111930593","name":"xxx"}},{"created":"2020-07-30 13:14:13","user":{"id":"uid-1596114847949","name":"xxx"}}]},"users":["uid-1596114847949"],"actions":[{"type":0,"userid":"uid-1596114847949"}],"lastsave":"2020-07-30T13:14:13.392Z","notmodified":false}
Error: Error response: statusCode:500 ;body:

<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 (/snapshot/server/build/server/Common/sources/utils.js:0:0)
    at Request.init.self.callback (/snapshot/server/build/server/Common/node_modules/request/request.js:185:22)
    at Request.emit (events.js:198:13)
    at Request.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:198:13)
    at IncomingMessage.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:286:20)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1143:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
[2020-07-30T13:14:47.391] [WARN] nodeJS - commandSfcCallback backoff limit exceeded: docId = a7dcc2a685e5bc08ce35
[2020-07-30T13:14:47.393] [WARN] nodeJS - storeForgotten: docId = a7dcc2a685e5bc08ce35```

Error in the seahub log:

```2020-07-30 13:14:47,329 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /onlyoffice/editor-callback/
Traceback (most recent call last):
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/seahub/onlyoffice/views.py", line 80, in onlyoffice_editor_callback
    resp = requests.get(url, verify=VERIFY_ONLYOFFICE_CERTIFICATE)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='oods.domain.de', port=443): Max retries exceeded with url: /cache/files/a7dcc2a685e5bc08ce35_6200/output.xlsx/output.xlsx?md5=npoSQZOec7Ky9si85jpgLw&expires=1596115788&disposition=attachment&filename=output.xlsx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa7e2912290>: Failed to establish a new connection: [Errno 111] Connection refused',))```

Weird thing is that both servers complain either about 500 or connection refused. 

Apache webserver log file storage:
```127.0.0.1 - - [30/Jul/2020:13:47:26 +0000] "POST /onlyoffice/editor-callback/ HTTP/1.1" 200 12 "-" "Node.js/6.13"
127.0.0.1 - - [30/Jul/2020:13:47:32 +0000] "POST /onlyoffice/editor-callback/ HTTP/1.1" 500 285 "-" "Node.js/6.13"```

Update: it starts to works most of time. The dns entry is 24h old. so maybe the certificate gets accepted or rejected depending on which dns is asked.