onlyoffice nextcloud "document could not be saved" nodeJS - postData 错误
onlyoffice nextcloud "document could not be saved" nodeJS - postData error
在同一台服务器上使用 nextcloud 17.0.2 和 documentserver:5.4.2.46 docker 图像。两种服务都在工作,但在浏览器中打开文件显示 "The document could not be saved" 错误消息。
错误消息指向此 url https://api.onlyoffice.com/editors/troubleshooting 解释回调处理程序不工作。 "The document editing service cannot connect to the document storage service at the editorConfig.callbackUrl address."
不确定如何设置 callbackUrl 任何帮助将不胜感激。
==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2020-01-08T01:32:36.164] [ERROR] nodeJS - postData error: docId = 173335947;url = http://nc.example.com/apps/onlyoffice/track?doc=eyJ0eXAiO
iJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJtaWtlIiwiZmlsZUlkIjoxMTIsImZpbGVQYXRoIjoiXC9hYmMuZG9jeCIsInNoYXJlVG9rZW4iOm51bGwsImFjdGlvbiI6InRyYW
NrIn0.EWo6KBqF6-ZtcvfrVlvJR5UFLDjmxTt8XKsNgylBv8s;data = {"key":"173335947","status":1,"users":["ocxhbukekiw0_mike"],"actions":[{"type":1,"use
rid":"ocxhbukekiw0_mike"}]}
Error: Error response: statusCode:301 ;body:
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:301:23)
at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1161:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
来自文档编辑的内部请求的服务器地址默认为 http://nc.example.com which is wrong, https://nc.example.com 是正确的。还必须使用 FQDN 而不是 docker 服务名称。
在同一台服务器上使用 nextcloud 17.0.2 和 documentserver:5.4.2.46 docker 图像。两种服务都在工作,但在浏览器中打开文件显示 "The document could not be saved" 错误消息。
错误消息指向此 url https://api.onlyoffice.com/editors/troubleshooting 解释回调处理程序不工作。 "The document editing service cannot connect to the document storage service at the editorConfig.callbackUrl address."
不确定如何设置 callbackUrl 任何帮助将不胜感激。
==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2020-01-08T01:32:36.164] [ERROR] nodeJS - postData error: docId = 173335947;url = http://nc.example.com/apps/onlyoffice/track?doc=eyJ0eXAiO
iJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJtaWtlIiwiZmlsZUlkIjoxMTIsImZpbGVQYXRoIjoiXC9hYmMuZG9jeCIsInNoYXJlVG9rZW4iOm51bGwsImFjdGlvbiI6InRyYW
NrIn0.EWo6KBqF6-ZtcvfrVlvJR5UFLDjmxTt8XKsNgylBv8s;data = {"key":"173335947","status":1,"users":["ocxhbukekiw0_mike"],"actions":[{"type":1,"use
rid":"ocxhbukekiw0_mike"}]}
Error: Error response: statusCode:301 ;body:
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:301:23)
at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1161:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
来自文档编辑的内部请求的服务器地址默认为 http://nc.example.com which is wrong, https://nc.example.com 是正确的。还必须使用 FQDN 而不是 docker 服务名称。