Onlyoffice Nextcloud连接器无法获取文件:HTTP 403访问被拒绝

时间:2018-11-14 12:13:06

标签: nextcloud onlyoffice

环境:

我们在Docker上运行Onlyoffice,我的docker-compose.yml文件是:

version: "2.0"
services:
  Onlyoffice5.2.3.64:
    image: 'onlyoffice/documentserver:5.2.3.64'
    restart: always
    volumes:
      - '/etc/selfmade/docker/onlyoffice/5.2.3.64_default.json:/etc/onlyoffice/documentserver/default.json'
    ports: 
      - '80:80'

任何请求均由我们的nginx代理转发,代理传递https。

Nextcloud在具有apache2 Web服务器的独立系统上运行,没有配置特殊的拒绝规则。仅包含.htaccess文件,它们不会被修改。

Nextcloud版本:14.0.3 应用版本:2.0.4(由Store在Nextcloud中安装)

操作:

按保存 enter image description here

问题:

Onlyoffice5.2.3.64_1  | ==> /var/log/onlyoffice/documentserver/converter/out.log <==
Onlyoffice5.2.3.64_1  | [2018-11-14 10:49:46.970] [ERROR] nodeJS - error downloadFile:url=https://onlyoffice.domain.tld/index.php/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.V1-30DUaR5kUHFN3zxuU-oHGmtO9DQE0BtTYAcxVVco;attempt=1;code:undefined;connect:undefined;(id=conv_check_1738130868_docx)
Onlyoffice5.2.3.64_1  | Error: Error response: statusCode:403 ;body:
Onlyoffice5.2.3.64_1  | {"message":"Access denied"}
Onlyoffice5.2.3.64_1  |     at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:250:18)
Onlyoffice5.2.3.64_1  |     at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:185:22)
Onlyoffice5.2.3.64_1  |     at emitTwo (events.js:126:13)
Onlyoffice5.2.3.64_1  |     at Request.emit (events.js:214:7)
Onlyoffice5.2.3.64_1  |     at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1161:10)
Onlyoffice5.2.3.64_1  |     at emitOne (events.js:116:13)
Onlyoffice5.2.3.64_1  |     at Request.emit (events.js:211:7)
Onlyoffice5.2.3.64_1  |     at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1083:12)
Onlyoffice5.2.3.64_1  |     at Object.onceWrapper (events.js:313:30)
Onlyoffice5.2.3.64_1  |     at emitNone (events.js:111:20)
Onlyoffice5.2.3.64_1  | [2018-11-14 10:49:48.021] [ERROR] nodeJS - error downloadFile:url=https://onlyoffice.domain.tld/index.php/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.V1-30DUaR5kUHFN3zxuU-oHGmtO9DQE0BtTYAcxVVco;attempt=2;code:undefined;connect:undefined;(id=conv_check_1738130868_docx)
Onlyoffice5.2.3.64_1  | Error: Error response: statusCode:403 ;body:
Onlyoffice5.2.3.64_1  | {"message":"Access denied"}
Onlyoffice5.2.3.64_1  |     at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:250:18)
Onlyoffice5.2.3.64_1  |     at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:185:22)
Onlyoffice5.2.3.64_1  |     at emitTwo (events.js:126:13)
Onlyoffice5.2.3.64_1  |     at Request.emit (events.js:214:7)
Onlyoffice5.2.3.64_1  |     at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1161:10)
Onlyoffice5.2.3.64_1  |     at emitOne (events.js:116:13)
Onlyoffice5.2.3.64_1  |     at Request.emit (events.js:211:7)
Onlyoffice5.2.3.64_1  |     at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1083:12)
Onlyoffice5.2.3.64_1  |     at Object.onceWrapper (events.js:313:30)
Onlyoffice5.2.3.64_1  |     at emitNone (events.js:111:20)
Onlyoffice5.2.3.64_1  | [2018-11-14 10:49:49.077] [ERROR] nodeJS - error downloadFile:url=https://onlyoffice.domain.tld/index.php/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.V1-30DUaR5kUHFN3zxuU-oHGmtO9DQE0BtTYAcxVVco;attempt=3;code:undefined;connect:undefined;(id=conv_check_1738130868_docx)
Onlyoffice5.2.3.64_1  | Error: Error response: statusCode:403 ;body:
Onlyoffice5.2.3.64_1  | {"message":"Access denied"}
Onlyoffice5.2.3.64_1  |     at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:250:18)
Onlyoffice5.2.3.64_1  |     at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:185:22)
Onlyoffice5.2.3.64_1  |     at emitTwo (events.js:126:13)
Onlyoffice5.2.3.64_1  |     at Request.emit (events.js:214:7)
Onlyoffice5.2.3.64_1  |     at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1161:10)
Onlyoffice5.2.3.64_1  |     at emitOne (events.js:116:13)
Onlyoffice5.2.3.64_1  |     at Request.emit (events.js:211:7)
Onlyoffice5.2.3.64_1  |     at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1083:12)
Onlyoffice5.2.3.64_1  |     at Object.onceWrapper (events.js:313:30)
Onlyoffice5.2.3.64_1  |     at emitNone (events.js:111:20)

一个ngrep告诉我:

T <ip onlyoffice>:80 -> <load balancer>:52070 [AP]
  HTTP/1.1 200 OK..Server: nginx..Date: Wed, 14 Nov 2018 10:49:50 GMT..Content-Type: text/xml; charset=UTF-8..Content-Length: 80..Connection: close..Vary: Accept-Encoding..X-Powered-By: Express..ETag: W/"50-z
  nhOfxspmYa/tCyRfpwopdInS1U"....<?xml version="1.0" encoding="utf-8"?><FileResult><Error>-4</Error></FileResult>

1 个答案:

答案 0 :(得分:0)

  

'/ etc / selfmade / docker / onlyoffice / 5.2.3.64_default.json:/etc/onlyoffice/documentserver/default.json'

还请映射/etc/onlyoffice/documentserver/local.json 它应该包含您的密钥,因为local.json中的值将覆盖default.json中的值