Docker-compose方式部署,nextcloud访问onlyoffice报错

使用docker-compose方式部署了nextcloud+onlyoffice,部署完成之后,在nextcloud中安装了onlyoffice插件,并且在插件中配置了onlyoffice,保存正常,但是在文件中,创建word文档是,提示:ONLYOFFICE 服务器无法连接,请联系管理员。
相关截图如下:


这个是什么原因造成的?

您好,
我们需要更多的详细信息来分析该问题:

  1. OnlyOffice Docs 的版本是多少?
  2. Nextcloud 以及连接器(OnlyOffice 插件)的版本是多少?
  3. 您部署 OnlyOffice Docs 所使用的操作系统是哪个?
  4. OnlyOffice Docs 和 Nextcloud 是部署在两个不同的服务器上吗?
  5. 请提供完整的日志文件(位于容器内的 /var/log/onlyoffice/documentserver 目录)

您好,

  1. 是拉取的最新版的docker镜像文件:onlyoffice/documentserver:latest
  2. 插件的版本是:9.8.0
  3. 使用的操作系统是centos7.9,使用的docker版本是:docker-ce 26.1.3
  4. OnlyOffice Docs 和 Nextcloud 是部署在一台服务器上的
  5. 通过tail -f命令查看日志,在web页面显示错误信息的时候,日志没有更多的打印,
    docservice/out.log:
tail -fn 200 docservice/out.log
[2025-04-15T09:39:17.577] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T09:39:17.583] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T09:39:17.583] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T09:39:17.758] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-15T09:39:50.672] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T09:39:50.678] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T09:39:50.678] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T09:39:50.821] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-15T10:07:24.173] [WARN] [localhost] [docId] [userId] nodeJS - start shutdown:true
[2025-04-15T10:07:24.174] [WARN] [localhost] [docId] [userId] nodeJS - active connections: 0
[2025-04-15T10:07:24.174] [WARN] [localhost] [docId] [userId] nodeJS - end shutdown
[2025-04-15T10:07:50.466] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T10:07:50.472] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:07:50.473] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:07:50.620] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-15T10:08:20.870] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T10:08:20.877] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:08:20.878] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:08:21.016] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-15T10:18:35.082] [WARN] [localhost] [docId] [userId] nodeJS - start shutdown:true
[2025-04-15T10:18:35.083] [WARN] [localhost] [docId] [userId] nodeJS - active connections: 0
[2025-04-15T10:18:35.083] [WARN] [localhost] [docId] [userId] nodeJS - end shutdown
[2025-04-15T10:18:59.914] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T10:18:59.920] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:18:59.920] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:19:00.064] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-15T10:19:29.215] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T10:19:29.221] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:19:29.221] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:19:29.361] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T06:54:40.665] [WARN] [localhost] [docId] [userId] nodeJS - start shutdown:true
[2025-04-16T06:54:40.667] [WARN] [localhost] [docId] [userId] nodeJS - active connections: 0
[2025-04-16T06:54:40.667] [WARN] [localhost] [docId] [userId] nodeJS - end shutdown
[2025-04-16T06:55:09.167] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T06:55:09.173] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T06:55:09.173] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T06:55:09.362] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T06:55:42.904] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T06:55:42.910] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T06:55:42.910] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T06:55:43.050] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T07:07:26.101] [WARN] [localhost] [docId] [userId] nodeJS - start shutdown:true
[2025-04-16T07:07:26.102] [WARN] [localhost] [docId] [userId] nodeJS - active connections: 0
[2025-04-16T07:07:26.102] [WARN] [localhost] [docId] [userId] nodeJS - end shutdown
[2025-04-16T07:07:49.552] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T07:07:49.558] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:07:49.559] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:07:49.695] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T07:08:18.354] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T07:08:18.360] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:08:18.361] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:08:18.499] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T07:50:43.342] [WARN] [localhost] [docId] [userId] nodeJS - start shutdown:true
[2025-04-16T07:50:43.342] [WARN] [localhost] [docId] [userId] nodeJS - active connections: 0
[2025-04-16T07:50:43.342] [WARN] [localhost] [docId] [userId] nodeJS - end shutdown
[2025-04-16T07:51:08.005] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T07:51:08.011] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:51:08.012] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:51:08.158] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T07:51:35.890] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T07:51:35.895] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:51:35.896] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:51:36.034] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
^C
root@71bc0bfb0285:/var/log/onlyoffice/documentserver# tail -fn 500 docservice/out.log
[2025-04-15T09:39:17.577] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T09:39:17.583] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T09:39:17.583] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T09:39:17.758] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-15T09:39:50.672] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T09:39:50.678] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T09:39:50.678] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T09:39:50.821] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-15T10:07:24.173] [WARN] [localhost] [docId] [userId] nodeJS - start shutdown:true
[2025-04-15T10:07:24.174] [WARN] [localhost] [docId] [userId] nodeJS - active connections: 0
[2025-04-15T10:07:24.174] [WARN] [localhost] [docId] [userId] nodeJS - end shutdown
[2025-04-15T10:07:50.466] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T10:07:50.472] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:07:50.473] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:07:50.620] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-15T10:08:20.870] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T10:08:20.877] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:08:20.878] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:08:21.016] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-15T10:18:35.082] [WARN] [localhost] [docId] [userId] nodeJS - start shutdown:true
[2025-04-15T10:18:35.083] [WARN] [localhost] [docId] [userId] nodeJS - active connections: 0
[2025-04-15T10:18:35.083] [WARN] [localhost] [docId] [userId] nodeJS - end shutdown
[2025-04-15T10:18:59.914] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T10:18:59.920] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:18:59.920] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:19:00.064] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-15T10:19:29.215] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-15T10:19:29.221] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:19:29.221] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-15T10:19:29.361] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T06:54:40.665] [WARN] [localhost] [docId] [userId] nodeJS - start shutdown:true
[2025-04-16T06:54:40.667] [WARN] [localhost] [docId] [userId] nodeJS - active connections: 0
[2025-04-16T06:54:40.667] [WARN] [localhost] [docId] [userId] nodeJS - end shutdown
[2025-04-16T06:55:09.167] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T06:55:09.173] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T06:55:09.173] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T06:55:09.362] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T06:55:42.904] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T06:55:42.910] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T06:55:42.910] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T06:55:43.050] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T07:07:26.101] [WARN] [localhost] [docId] [userId] nodeJS - start shutdown:true
[2025-04-16T07:07:26.102] [WARN] [localhost] [docId] [userId] nodeJS - active connections: 0
[2025-04-16T07:07:26.102] [WARN] [localhost] [docId] [userId] nodeJS - end shutdown
[2025-04-16T07:07:49.552] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T07:07:49.558] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:07:49.559] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:07:49.695] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T07:08:18.354] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T07:08:18.360] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:08:18.361] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:08:18.499] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T07:50:43.342] [WARN] [localhost] [docId] [userId] nodeJS - start shutdown:true
[2025-04-16T07:50:43.342] [WARN] [localhost] [docId] [userId] nodeJS - active connections: 0
[2025-04-16T07:50:43.342] [WARN] [localhost] [docId] [userId] nodeJS - end shutdown
[2025-04-16T07:51:08.005] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T07:51:08.011] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:51:08.012] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:51:08.158] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-16T07:51:35.890] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-16T07:51:35.895] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:51:35.896] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-16T07:51:36.034] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19

converter/out.log:

[2025-04-16T07:56:01.031] [ERROR] [localhost] [check_242251644] [userId] nodeJS - error downloadFile:url=https://192.168.200.126:9091/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.dtHllDIYKh2mso2zuNbMlYvWdecbEY-EAjXtD-GKXlo;attempt=3;code:null;connect:null Error: Error response: statusCode:403; headers:{"server":"nginx/1.26.3","date":"Wed, 16 Apr 2025 07:56:01 GMT","content-type":"application/json; charset=utf-8","content-length":"27","connection":"keep-alive","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-permitted-cross-domain-policies":"none","x-robots-tag":"noindex, nofollow","x-xss-protection":"1; mode=block","referrer-policy":"no-referrer","x-powered-by":"PHP/8.3.20","set-cookie":["occtrlci2ocd=cd64d201a449e700f21e2ad1302b3268; path=/; secure; HttpOnly; SameSite=Lax","oc_sessionPassphrase=HU1Sy8Ckd%2FQJV%2FKYx5TieqQA9UaJxay0CpjgAQjdVVkH9KSxx8uU%2BTmGbmLLMf2W%2F5W7NPGcOnFs3EMP5e4ZVyAgbKAW31QVQw4UKcthwCmiQnoJXeAYYdgPeQculXoR; path=/; secure; HttpOnly; SameSite=Lax","occtrlci2ocd=cd64d201a449e700f21e2ad1302b3268; path=/; secure; HttpOnly; SameSite=Lax","__Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax","__Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict","occtrlci2ocd=cd64d201a449e700f21e2ad1302b3268; path=/; secure; HttpOnly; SameSite=Lax"],"content-security-policy":"default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'","x-request-id":"VKX3rA3j5jPFc1qBBEsy","cache-control":"no-cache, no-store, must-revalidate","feature-policy":"autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'","strict-transport-security":"max-age=15768000; includeSubDomains; preload"};
    at Request.fResponse (/snapshot/server/Common/sources/utils.js)
    at Request.emit (node:events:527:28)
    at Request.onRequestResponse (/snapshot/server/Common/node_modules/request/request.js:1066:10)
    at ClientRequest.emit (node:events:527:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:631:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at TLSSocket.socketOnData (node:_http_client:494:22)
    at TLSSocket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)

我是使用nginx做https端口转发到nextcloud,并使用自签名证书的方式部署了nextcloud,
docker-compose部分内容如下:

  app:
    image: nextcloud:latest
    depends_on:
      - db
      - redis
    restart: always
    ports:
      - 9090:80
    networks:
      - nextcloud_netbridge
    links:
      - db
      - redis
      - onlyoffice
    volumes:
      - nextcloud_data:/var/www/html
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    environment:
      - TZ=Asia/Shanghai
      - MYSQL_PASSWORD=nextcloud@1234
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db
      - REDIS_HOST=redis
      - REDIS_HOST_PASSWORD=nextcloud@1234
      - TRUSTED_PROXIES=192.168.200.126
      - OVERWRITEHOST=192.168.200.126:9091
      - OVERWRITEPROTOCOL=https
      - OVERWRITECLIURL=https://192.168.200.126:9091

onlyoffice:
    image: onlyoffice/documentserver:latest
    restart: always
    depends_on:
      - db
      - redis
    volumes:
      - office_volume:/var/www/onlyoffice/Data
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    ports:
      - 9080:80
      - 9443:443 
    environment:
      JWT_ENABLED: 'true'
      JWT_SECRET: 'onlyoffice@1234'
    networks:
      - nextcloud_netbridge


使用插件链接onlyoffice是正常的


当我点击文件,新建文档的时候,会提示最开始截图中的错误

问题已解决:
需要在nc中config.php添加配置:

   'onlyoffice' =>
    array (
     'verify_peer_off' => true,
  ),

很高兴知道问题已经解决。感谢你的分享,我将关闭这个论坛话题