版本:nextcloud v15,onlyoffice-DocumentServer v5.2,connector 2.4 onlyoffice和服务器正在Centos 7上运行。
应用“ onlyoffice”消息“检查时出现GetConvertedUri错误:错误 文档服务中发生错误:下载文档时出错 文件进行转换。”和
应用“ onlyoffice”消息“没有jwt的情况下下载为空”
nextcloud和onlyoffice-documentServer由相同的通配符证书配置,浏览器正确接受
onlyoffice-DocumentServer日志:
[2019-07-29T13:26:40.160] [ERROR] nodeJS - error downloadFile:url=https://mydomain/index.php/apps/onlyoffic e/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.k09JPfgibOWBTZGmYfPU47O8HeUGh6Q_FHuUQYJRGY4 ;attempt=3;code:null;connect:null;(id=conv_check_908902956_docx)
Error: Error response: statusCode:403 ;body:
{"message":"Access denied"}
at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:250:18)
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中通过令牌进行身份验证,则文档服务器可以正常工作,但是如果我将配置更改为通过令牌工作,则文件服务器将无法工作。
我尝试了以下配置...
config.php Nexcloud添加行代码:
'onlyoffice' =>
array (
'jwt_secret' => 'mysecret',
'jwt_header' => 'test',
),
local.json OnlyOffice-DocumentServer添加行代码:
"token": {
"enable": {
"request": {
"inbox": true,
"outbox": true
},
"browser": true
},
"inbox": {
"header": "test"
},
"outbox": {
"header": "test"
}
},
"secret": {
"inbox": {
"string": "mysecret"
},
"outbox": {
"string": "mysecret"
},
"session": {
"string": "mysecret"
感谢您的帮助
答案 0 :(得分:0)
DocumentServer v5.2
我们建议使用最新版本的DocumentServer(5.3.4.3)
启用JWT时,请尝试使用DocumentServer的默认配置而不更改标题。 您只需要在NC管理面板中指定DocumentServer的地址和密码(设置->管理-> ONLYOFFICE)
请不要忘记在编辑local.json文件后重新启动DocumentServer服务:
supervisorctl restart all
答案 1 :(得分:0)
谢谢ibnpetr,的确如此,您所说的config.php不需要任何用于其他SSL的配置
现在工作吧!
问题是颁发证书的中间组织不会在操作系统中自动将其识别为chorme或mozilla并对其进行验证,在这种情况下,您需要将实体的证书输入到其列表中以对其进行验证如果没有给出,则使用wget命令https:// //检查是否存在错误,您必须像我之前所说的那样手动进行。
谢谢