ONLYOFFICE / onlyoffice-owncloud

The app which enables the users to edit office documents from ownCloud using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to ownCloud
Apache License 2.0
297 stars 90 forks source link

OnlyOffice/Nextcloud Error while downloading the document file to be converted.) (version 6.4.2.6) #364

Open mstoss opened 2 years ago

mstoss commented 2 years ago

Hello,

after searching on the web, i can't find a solution.

My setup is: one VM for onlyoffice in docker mode and NC22 on a another VM.

Everything work fine without the "secret".

Configuration on NextCloud:

"onlyoffice": {
            "DocumentServerInternalUrl": "",
            "DocumentServerUrl": "https:\/\/onlyoffice.inha.fr:9980\/",
            "StorageUrl": "",
            "customizationChat": "true",
            "customizationCompactHeader": "true",
            "customizationFeedback": "true",
            "customizationForcesave": "false",
            "customizationHelp": "true",
            "customizationReviewDisplay": "original",
            "customizationToolbarNoTabs": "true",
            "defFormats": "{\"csv\":\"true\",\"doc\":\"true\",\"docm\":\"false\",\"docx\":\"true\",\"dotx\":\"false\",\"epub\":\"false\",\"html\":\"false\",\"odp\":\"true\",\"ods\":\"true\",\"odt\":\"true\",\"otp\":\"false\",\"ots\":\"false\",\"ott\":\"false\",\"pdf\":\"false\",\"potm\":\"false\",\"potx\":\"false\",\"ppsm\":\"false\",\"ppsx\":\"false\",\"ppt\":\"true\",\"pptm\":\"false\",\"pptx\":\"true\",\"rtf\":\"false\",\"txt\":\"false\",\"xls\":\"true\",\"xlsm\":\"false\",\"xlsx\":\"true\",\"xltm\":\"false\",\"xltx\":\"false\"}",
            "demo": "{\"available\":false,\"enabled\":false,\"start\":{\"date\":\"2021-07-27 16:41:40.182883\",\"timezone_type\":3,\"timezone\":\"UTC\"}}",
            "editFormats": "{\"csv\":\"true\",\"odp\":\"true\",\"ods\":\"true\",\"odt\":\"true\",\"rtf\":\"true\",\"txt\":\"true\"}",
            "enabled": "yes",
            "groups": "[]",
            "installed_version": "7.2.0",
            "jwt_secret": "MySecret",
            "preview": "false",
            "sameTab": "true",
            "settings_error": "Une erreur s'est produite dans le service de document: Error while downloading the document file to be converted.",
            "types": "prevent_group_restriction",
            "verify_peer_off": "false",
            "versionHistory": "true"
        },

My local.conf configuration on DocumentServer:

{

  "services": {
    "CoAuthoring": {
      "sql": {
        "type": "postgres",
        "dbHost": "localhost",
        "dbPort": "5432",
        "dbName": "onlyoffice",
        "dbUser": "onlyoffice",
        "dbPass": "onlyoffice"
      },
      "redis": {
        "host": "localhost"
      },
      "token": {
        "enable": {
          "request": {
            "inbox": true,
            "outbox": true
          },
          "browser": true
        },
        "inbox": {
          "header": "Authorization"
        },
        "outbox": {
          "header": "Authorization"
        }
      },
      "secret": {
        "inbox": {
          "string": "MySecret"
        },
        "outbox": {
          "string": "MySecret"
        },
        "session": {
          "string": "MySecret"
        }
      }
    }
  },
  "rabbitmq": {
    "url": "amqp://guest:guest@localhost"
  }
}

The error log of converter:

[2021-11-13T22:14:04.082] [ERROR] nodeJS - error downloadFile:url=https://nextcloud.inha.fr/index.php/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.4Xiz5bP6XVZdfew0hjgjEd-EY7TsxuAZG7CgOl--yAQ;attempt=3;code:null;connect:null;(id=conv_check_1584836803_docx)
Error: Error response: statusCode:403; headers:{"date":"Sat, 13 Nov 2021 22:14:03 GMT","server":"Apache/2.4.51 (Debian)","strict-transport-security":"max-age=15552000; includeSubDomains","set-cookie":["ocgloqnac8r6=1a8kkrqdg6sjki0nnd32p84p8t; path=/; secure; HttpOnly; SameSite=Lax","oc_sessionPassphrase=N1kdIOF2t6mbTO9mILYp3pDUHcRlqMEP%2F3VW7Kaf%2Bj8CnsONUc0Tl7KiO7sdJpRXihRqrqh6y7EEHzMC8FUokpRIOBNiYWSQHhhs49d2s5RDX4u26%2FvUl2sBmttUr%2BoA; path=/; secure; HttpOnly; SameSite=Lax","ocgloqnac8r6=fclk5nfegfu6ugb4h2h24jg8m6; 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"],"expires":"Thu, 19 Nov 1981 08:52:00 GMT","cache-control":"no-cache, no-store, must-revalidate","pragma":"no-cache","content-security-policy":"default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'","referrer-policy":"no-referrer","x-content-type-options":"nosniff","x-download-options":"noopen","x-frame-options":"SAMEORIGIN","x-permitted-cross-domain-policies":"none","x-robots-tag":"none","x-xss-protection":"1; mode=block","feature-policy":"autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'","content-length":"27","keep-alive":"timeout=5, max=100","connection":"Keep-Alive","content-type":"application/json; charset=utf-8"}; body:
{"message":"Access denied"}

The error on NC:

172.17.1.87 - - [13/Nov/2021:23:24:27 +0100] "GET /index.php/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.4Xiz5bP6XVZdfew0hjgjEd-EY7TsxuAZG7CgOl--yAQ HTTP/1.1" 403 5325 "-" "Node.js/6.13"
172.17.1.87 - - [13/Nov/2021:23:24:28 +0100] "GET /index.php/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.4Xiz5bP6XVZdfew0hjgjEd-EY7TsxuAZG7CgOl--yAQ HTTP/1.1" 403 1683 "-" "Node.js/6.13"
172.17.1.87 - - [13/Nov/2021:23:24:30 +0100] "GET /index.php/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.4Xiz5bP6XVZdfew0hjgjEd-EY7TsxuAZG7CgOl--yAQ HTTP/1.1" 403 1675 "-" "Node.js/6.13"

When i change the local.json configuration file, i use the command:

supervisorctl restart all

I don't see where i am wrong in my configuration.

Thanks for your help !

SergeyKorneyev commented 2 years ago

Hello, The configuration seems in order, so far. The cause of the issue may be easier to pinpoint if you change the Nextcloud log level to debug and share more of the resulting logs.