Not able to connect NC with onlyoffice

hello i am using NC and onlyoffice on OCP on https when I am trying to integrate Onlyoffice with NC i am getting this error->

[2024-10-17T04:32:29.580] [ERROR] [localhost] [check_1970493587] [userId] nodeJS - error downloadFile:url=http://nextcl-team-claros.apps.ocp4.pacosta.com/index.php/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.NamhXUzACw8vCWGETZcgSv9OyrEk8rtOEV4LhqG1PjU;attempt=3;code:null;connect:null Error: Error response: statusCode:503; headers:{"pragma":"no-cache","cache-control":"private, max-age=0, no-cache, no-store","content-type":"text/html"};
    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 [as onIncoming] (node:_http_client:631:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at Socket.socketOnData (node:_http_client:494:22)
    at Socket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

thanks if someone can help me here ?

Hello @platipus

Please share more information about your environment:

  1. Type and version of the OS where Nextcloud and ONLYOFFICE Docs (Document Server) are installed;
  2. Version of Nextcloud;
  3. Version and installation type (Docker, DEB/RPM package, EXE/MSI) of Document Server;
  4. Version of the connector app;
  5. Wether both apps are installed on the same machine or on different ones.

According to your description HTTPS is enabled, is it enabled for Document Server only? From the log I can see that it fails to get download link to the file from Nextcloud that is defined with HTTP. Also, please make sure that services can mutually access each other, for instance, with wget <address> command - from Document Server to Nextcloud and vice versa.

Hello @Constantine thanks for your attention on this topic.I am sharing the information as below for my environment and issue.
I have run the only-office (version 8.1.3.4) and Nextcloud(27.1.3) which is using apache with the docker on single machine and also enabled https for both after enabling https for them they integrated with each other but now i am taking these docker compose and data of both and try to run on ocp environment which is offline (without internet) on ocp. I have run the onlyoffice successfully and also enable the https for it after that documents are opened successfully in it. in ocp same namespace i have run the nextcloud also on enabled it on https but when i integrate nextcloud from onlyoffice getting error in networktab like this->

{
    "documentserver": "https:\/\/onlyoffice-test.apps.ocp4.pacosta.com\/",
    "verifyPeerOff": true,
    "documentserverInternal": null,
    "storageUrl": null,
    "secret": "ML10NEMiyHtbKdIDzo84YccjFKi1zIyo",
    "jwtHeader": null,
    "error": "Error occurred in the document service: Error while downloading the document file to be converted.",
    "version": "8.1.3.4"
}

this is my config.php in nextcloud →

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
  'onlyoffice' =>
  array (
    "jwt_secret" => "ML10NEMiyHtbKdIDzo84YccjFKi1zIyo",
    "jwt_header" => "AuthorizationJwt",
   ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'ocbhpy7g88zm',
  'passwordsalt' => 'gjpyPiOmSbD5ChjDQQ0YywLZ0di0Rd',
  'secret' => 'HPIVzEo/8EOP1j6kGR/Qd2eF5wI86Fv/8TTGTO1CYeyrMB2Q',
  'trusted_domains' =>
  array (
    0 => 'nextclo-test.apps.ocp4.pacosta.com',
    1 => 'onlyoffice-test.apps.ocp4.pacosta.com',
    2 => '*.apps.ocp4.pacosta.com',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'sqlite3',
  'version' => '27.1.3.2',
  'overwrite.cli.url' => 'https://nextclo-test.apps.ocp4.pacosta.com/',
  'installed' => true,
);

using this local.json in onlyoffice->

[root@registry_test onlydefault]# cat local.json
{
  "services": {
    "CoAuthoring": {
      "sql": {
        "type": "postgres",
        "dbHost": "postgres-only",
        "dbPort": "5431",
        "dbName": "onlyoffice",
        "dbUser": "onlyoffice",
        "dbPass": "onlyoffice"
      },
      "token": {
        "enable": {
          "request": {
            "inbox": true,
            "outbox": true
          },
          "browser": true
        },
        "inbox": {
          "header": "AuthorizationJwt",
          "inBody": false
        },
        "outbox": {
          "header": "AuthorizationJwt",
          "inBody": false
        }
      },
      "secret": {
        "inbox": {
          "string": "ML10NEMiyHtbKdIDzo84YccjFKi1zIyo"
        },
        "outbox": {
          "string": "ML10NEMiyHtbKdIDzo84YccjFKi1zIyo"
        },
        "session": {
          "string": "ML10NEMiyHtbKdIDzo84YccjFKi1zIyo"
        }
      },
      "requestDefaults": {
        "rejectUnauthorized": false
      }
    }
  },
  "rabbitmq": {
    "url": "amqp://guest:guest@rabbitmq"
  },
  "wopi": {
    "enable": false,
    "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCWlIr6LhoR8yC8\nkWArCiqrLqqK6E2LB/e1oSv//49ScqqofhmE9gpJbFG8U0NNdR0x/kj1pvKZd6a8\nRVGzRDPXuhHk7oR/kkq1f5LEY8fXr6to1OjyREE1biDwnOdorlAjAcx23ywVFH7G\nEAbxkldNnDJCid1JaXxlp6hlOLP9VlXMkygRmYN+qszdGd8JwH7oeBuZqqPmgcVN\nlx/940pTeUaRXTiA9hMj1VwilPY4a6SSY+SIjRtm0XvI2NgWbkMp4Z6X9ZhaAmJU\nQrFV2ZLRWZtCgIf8MtcRlD7+yfqtivH0dzFYklohSYEx6DqFz54+jpklOBordtzI\ni0vD7wiFAgMBAAECggEAAJK4gsX9zSRD+ERiE6/cPQ/ARk66d8BeCAQeZIEROIaY\njLqqS1Dba/lQFwV4CCD/z+P1UrWTLGMX8wFiJ0gd9lIanhALznswd5FEQdZLT4Z8\nM7Ti+vBPrteqwO3ZfnpLN134jwF/uAMNUtvbkMEWW3q+2bBAwn/7ueZ6hTzgm+Le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 65537,
    "exponentOld": 65537
  },
  "queue": {
    "type": "rabbitmq"
  },
  "storage": {
    "fs": {
      "secretString": "nc6TmGYJVpgWoS22bLcd"
    }
  }
}

If you are running Document Server with Nextcloud in closed private network that does not allow public names, please refer to this article:

Second case describes how to configure Advanced settings in the connector to resolve the logic.

Do I understand correctly that in your case OCP uses some kind of proxy?