ONLYOFFICE / Docker-DocumentServer

ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
GNU Affero General Public License v3.0
1.38k stars 475 forks source link

Cannot edit. error: "The document could not be saved. ......" #689

Closed mr-xiangxu closed 9 months ago

mr-xiangxu commented 9 months ago
          got the same issue while not using localhost.
version: '3.8'
services:
  onlyoffice-document-server:
    container_name: onlyoffice-document-server
    image: onlyoffice/documentserver:latest
    restart: always
    environment:
      - JWT_SECRET=secret
    ports:
      - '13080:80'
      - '13443:443'
    volumes:
      - document_cache:/var/lib/onlyoffice
      - document_data:/var/www/onlyoffice/Data
      - document_log:/var/log/onlyoffice
      - ../cert.pem:/var/www/onlyoffice/Data/certs/tls.crt
      - ../key.pem:/var/www/onlyoffice/Data/certs/tls.key
      - ../dhparam.pem:/var/www/onlyoffice/Data/certs/dhparam.pem

volumes:
  document_cache:
    driver: local
  document_data:
    driver: local
  document_log:
    driver: local

issue-onlyoffice

BTW, uploading and downloading the file is working fine.

==> /var/log/onlyoffice/documentserver/metrics/out.log <==
28 Nov 09:45:41 - [634] reading config file: ./config/config.js
28 Nov 09:45:41 - server is up INFO
28 Nov 09:57:52 - [630] reading config file: ./config/config.js
28 Nov 09:57:52 - server is up INFO

==> /var/log/onlyoffice/documentserver/nginx.error.log <==
2023/11/28 09:49:54 [error] 7842#7842: *4 connect() failed (111: Unknown error) while connecting to upstream, client: 192.168.111.134, server: , request: "GET /example/ HTTP/2.0", upstream: "http://127.0.0.1:3000/", host: "192.168.118.220:13443", referrer: "https://192.168.118.220:13443/welcome/"
2023/11/28 09:49:54 [error] 7842#7842: *4 connect() failed (111: Unknown error) while connecting to upstream, client: 192.168.111.134, server: , request: "GET /example/ HTTP/2.0", upstream: "http://127.0.0.1:3000/", host: "192.168.118.220:13443", referrer: "https://192.168.118.220:13443/welcome/"
2023/11/28 10:00:31 [error] 7256#7256: *2 connect() failed (111: Unknown error) while connecting to upstream, client: 192.168.111.134, server: , request: "GET /example/ HTTP/2.0", upstream: "http://127.0.0.1:3000/", host: "192.168.118.220:13443", referrer: "https://192.168.118.220:13443/welcome/"
2023/11/28 10:00:31 [error] 7256#7256: *2 connect() failed (111: Unknown error) while connecting to upstream, client: 192.168.111.134, server: , request: "GET /example/ HTTP/2.0", upstream: "http://127.0.0.1:3000/", host: "192.168.118.220:13443", referrer: "https://192.168.118.220:13443/welcome/"

==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2023-11-28T10:02:17.226] [ERROR] [localhost] [192.168.111.134Nextcloud_Hub.docx1701165060029] [uid-1] nodeJS - postData error: url = https://192.168.118.220:13443/example/track?filename=Nextcloud%20Hub.docx&useraddress=192.168.111.134;data = {"key":"192.168.111.134Nextcloud_Hub.docx1701165060029","status":1,"users":["uid-1"],"actions":[{"type":1,"userid":"uid-1"}],"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiIxOTIuMTY4LjExMS4xMzROZXh0Y2xvdWRfSHViLmRvY3gxNzAxMTY1MDYwMDI5Iiwic3RhdHVzIjoxLCJ1c2VycyI6WyJ1aWQtMSJdLCJhY3Rpb25zIjpbeyJ0eXBlIjoxLCJ1c2VyaWQiOiJ1aWQtMSJ9XSwiaWF0IjoxNzAxMTY1NzM3LCJleHAiOjE3MDExNjYwMzd9.6kFWZ8IBKL2qkftevHtyNYYRMwikGHPC7BVW7IW5WDo"} Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1515:34)
    at TLSSocket.emit (events.js:400:28)
    at TLSSocket._finishInit (_tls_wrap.js:937:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:709:12)

==> /var/log/onlyoffice/documentserver/converter/out.log <==
[2023-11-28T10:02:17.399] [ERROR] [localhost] [192.168.111.134Nextcloud_Hub.docx1701165060029] [uid-1] nodeJS - error downloadFile:url=https://192.168.118.220:13443/example/download?fileName=Nextcloud%20Hub.docx&useraddress=192.168.111.134;attempt=1;code:DEPTH_ZERO_SELF_SIGNED_CERT;connect:undefined Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1515:34)
    at TLSSocket.emit (events.js:400:28)
    at TLSSocket._finishInit (_tls_wrap.js:937:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:709:12)
[2023-11-28T10:02:18.420] [ERROR] [localhost] [192.168.111.134Nextcloud_Hub.docx1701165060029] [uid-1] nodeJS - error downloadFile:url=https://192.168.118.220:13443/example/download?fileName=Nextcloud%20Hub.docx&useraddress=192.168.111.134;attempt=2;code:DEPTH_ZERO_SELF_SIGNED_CERT;connect:undefined Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1515:34)
    at TLSSocket.emit (events.js:400:28)
    at TLSSocket._finishInit (_tls_wrap.js:937:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:709:12)
[2023-11-28T10:02:19.440] [ERROR] [localhost] [192.168.111.134Nextcloud_Hub.docx1701165060029] [uid-1] nodeJS - error downloadFile:url=https://192.168.118.220:13443/example/download?fileName=Nextcloud%20Hub.docx&useraddress=192.168.111.134;attempt=3;code:DEPTH_ZERO_SELF_SIGNED_CERT;connect:undefined Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1515:34)
    at TLSSocket.emit (events.js:400:28)
    at TLSSocket._finishInit (_tls_wrap.js:937:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:709:12)

Originally posted by @mr-xiangxu in https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/676#issuecomment-1829405000

mr-xiangxu commented 9 months ago

I used the method in README as in https://github.com/ONLYOFFICE/Docker-DocumentServer#generation-of-self-signed-certificates, and it turned out self signed certificate would cause a connection error ...

igwyd commented 9 months ago

Hello @mr-xiangxu, add the enviroment USE_UNAUTHORIZED_STORAGE=true from here if you want use selfsignet certs.

mr-xiangxu commented 9 months ago

@igwyd Thx!