Error while downloading the document file to be converted

Nextcloud
Nextcloud version: 18.0.0.10
Operating system and version: Ubuntu 18.04
Apache or nginx version: Apache/2.4.29
PHP version: PHP7.3

Onlyoffice
Installed with help from: How to Integrate OnlyOffice with NextCloud on Ubuntu - LinuxBabe

The issue you are facing

Error	onlyoffice	GetConvertedUri on check error: Error occurred in the document service: Error while downloading the document file to be converted.

Is this the first time you’ve seen this error? (Y/N)
Yes it is my first time seeing this problem

Nextcloud configuration
nextcloud/config/config.php

<?php
$CONFIG = array (
  'instanceid' => '---Secret---',
  'passwordsalt' => '---Secret---',
  'secret' => '---Secret---',
  'trusted_domains' =>
  array (
    0 => '---Secret---',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '18.0.0.10',
  'overwrite.cli.url' => '---Secret---',
  'dbname' => 'nxtc_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nxtc',
  'dbpassword' => '---Secret---',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'app_install_overwrite' =>
  array (
    0 => 'dropit',
    1 => 'drawio',
    2 => 'quickaccesssorting',
  ),
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'remember_login_cookie_lifetime' => 1296000,
  'session_lifetime' => 600,
  'session_keepalive' => true,
  'maintenance' => false,
  'mysql.utf8mb4' => true,
  'onlyoffice' =>
  array (
    'verify_peer_off' => TRUE,
    'jwt_header' => "AuthorizationJwt",
  ),
);

apache2/sites-available/nextcloud.conf

#     Alias /nextcloud "/var/www/html/nextcloud/"

<Directory /var/www/html/nextcloud/>
    Options +FollowSymlinks
    AllowOverride All
    Require all granted

    <IfModule mod_dav.c>
        Dav off
    </IfModule>

    SetEnv HOME /var/www/html/nextcloud
    SetEnv HTTP_HOME /var/www/html/nextcloud
</Directory>


<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/html/nextcloud/
    ServerName ---Secret---
    ServerAlias ---Secret---
    Redirect permanent / ---Secret---

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


<Ifmodule mod_ssl.c>
    <VirtualHost *:443>
        ServerName ---Secret---
        DocumentRoot /var/www/html/nextcloud

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/---Secret---.crt
        SSLCertificateKeyFile /etc/ssl/certs/---Secret---.key
#        SSLCertificateChainFile /etc/apache2/certs/chain.pem
    </VirtualHost>

    <IfModule mod_headers.c>
        Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
        Header always set X-Content-Type-Options: nosniff
        Header always set X-XSS-Protection: "1; mode=block"
        Header always set X-Robots-Tag: none
        Header always set X-Frame-Options: SAMEORIGIN
        Header always set Referrer-Policy: no-referrer
    </IfModule>
</IfModule>

Onlyoffice configuration
nginx/conf.d/ds.conf

include /etc/nginx/includes/http-common.conf;
server {
  listen 0.0.0.0:80;
  listen [::]:80 default_server;
  server_tokens off;
  server_name ---Secret---;

  include /etc/nginx/includes/ds-*.conf;
}

server {
  listen 443 ssl;
  listen [::]:443 ssl;
  server_name ---Secret---t;

  ssl on;
  ssl_certificate /etc/ssl/certs/---Secret---.crt;
  ssl_certificate_key /etc/ssl/certs/---Secret---.key;

  access_log /var/log/nginx/nginx.vhost.access.log;
  error_log /var/log/nginx/nginx.vhost.error.log;

  include /etc/nginx/includes/ds-*.conf;
}

I have been trying with:

And:

As a temporary solution you can disable verification of the certs by the Document Server. It should help. Please change the value of the parameter “rejectUnauthorized”: from true to false in /etc/onlyoffice/documentserver/default.json. After that restart all the services of the Document Server."

I would need help ASAP because this Nextcloud is in production and we need the integration to work. And suggestions on what I can try with?

Thanks in advance
/Rojz

This issue got solved by reinstalling the Onlyoffice. But Now I can’t get Onlyoffice to connect to my Nextcloud due to " domain refused to connect."

Annotation%202020-02-05%20145559

Any idea what this could be?
They are both on the same network and 2 seperate vm’s.

This somehow fixed by itself… I went back to my Onlyoffice today to see if I could find anything… and it does now work without any tuning or anything.

I take that back… I can’t get this error to go away… I managed to fix it on a test machine… but I can’t get it to work on out production nextcloud… Any ideas?

I can also add that I have 2 identical Nextclouds that I want to connect to the same Onlyoffice… 1 of them can connect, but the other one cannot.

Production Nextcloud:

Test server 1: (Works)

Test server 2: (Dosen’t work)

Yes… Our production is on NC16. Yes it is another address to the production server, but that onlyoffice is a direct copy of the other onlyoffice with a changed ip.

It seems like it fixed my problems with help from the Onlyoffice forum! But I will update here too so that others can maybe get some idea’s from this.

Onlyoffice:
default.json -> “rejectUnauthorized” to false.
local.json -> “header”: “AuthorizationJwt” from “header”: “Authorization”
supervisorctl restart all

Nexcloud:
config/config.php ->
‘onlyoffice’ => array (
‘verify_peer_off’ => true,
‘jwt_header’ => “AuthorizationJwt”
)

Hello, where can I found the default.json file? I can’t find it on the appdata folder of onlyoffice.

sudo nano /etc/onlyoffice/documentserver/local.json

OK, so I am running into this same problem now - I am trying to get Nextcloud snap to work with an OnlyOffice snap on the same machine (192.168.1.99). This error message occurs when I hit SAVE on the Nextcloud ONLYOFFICE configuration page:

https://192.168.1.99/index.php/settings/admin/onlyoffice (Really HTTP because connection is insecure)

I have fiddled with these settings repeatedly, so it’s likely that I am confused.

The ONLYOFFICE URL for configuring it with Nextcloud: ONLYOFFICE Api Documentation - Nextcloud ONLYOFFICE integration app

Here is the exact message (Nexcloud) I am getting: Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.)

Ports - Nextcloud: 80, 443 ONLYOFFICE: 82,443

I am probably misinterpreting the required/requested data in the Nextcloud configuration page fields for ONLYOFFICE, but here’s what I have.

ONLYOFFICE Docs address: https://192.168.1.99:443/

Disable Certificate Verification is CHECKED

Secret key (leave blank to disable): 9c4719901e

ONLYOFFICE Docs address for internal requests from the server: http://192.168.1.99:82/

Server address for internal requests from ONLYOFFICE Docs: http://192.168.1.99:80/

A couple related questions, or maybe a feature suggestion?

(1) Is there a Nextcloud page where I can conveniently access the log files for debugging? (I can’t find it)

(2) I’ve tried editing the local.jason file as suggested above (even stopped the ONLYOFFICE Server), but I can’t seen to edit this file as suggested (used vi and nano to no avail)

Thanks for any guidance.

Larry

great solution