Skip to content

Error while downloading the document file to be converted #181

Closed
@johaahn

Description

@johaahn

After an upgrade to OnlyOffice 5.1.3 (deb), I'm now facing following error : “error while downloading the document file to be converted” on Admin page.

image

/var/log/onlyoffice/documentserver/converter/out.log
says :

[2018-04-28 16:08:42.109] [ERROR] nodeJS - error downloadFile:url=https://docs.example.net:444/apps/onlyoffice/empty?doc=RlVNUzBUcHJQUG9CRnRFaG94TDVHeFZ2bzVqSWVrVmREZWRWc2ZyWXdmdz0/eyJhY3Rpb24iOiJlbXB0eSJ9;attempt=3;code:DEPTH_ZERO_SELF_SIGNED_CERT;connect:undefined;(id=conv_check_1803620806_docx)
Error: self signed certificate
at Error (native)
at TLSSocket. (_tls_wrap.js:1092:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:610:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)

I'm using a self signed certificate and I have to.

Any ideas ?

I've also added in nextcloud/config/config.php

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

This settings above was enough to enable my self signed certificate on previous version.

I can access document server directly via HTTPS but not through nextcloud:
image

Activity

zsixSiuL

zsixSiuL commented on May 9, 2018

@zsixSiuL

same here!!!

alexanderonlyoffice

alexanderonlyoffice commented on May 11, 2018

@alexanderonlyoffice

@johaahn, we have reproduced the issue. We will analyze the information we got and contact you.

alexanderonlyoffice

alexanderonlyoffice commented on May 11, 2018

@alexanderonlyoffice

@johaahn, we have found the reason. When you use self-signed certificates they should be added to ca-certificate bundle of the OS of both servers (the one you use on Nextcloud should be added to the server with ONLYOFFICE Document Server and vice versa). The problem is that the certificate of Nextcloud should be also added to nodejs ca-certificate bundle, so the Document Server can verify it. But it is impossible for nodejs version 6, which is required for the Document Server at the moment.

We are working on the possibility to install Document Server with the later versions of nodejs, where it is possible to add self-signed certificates.

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.

edarblanco

edarblanco commented on May 15, 2018

@edarblanco

Hi, when change option "rejectUnauthorized": from true to false, the server response is bad gateway

alexanderonlyoffice

alexanderonlyoffice commented on May 16, 2018

@alexanderonlyoffice

@edarblanco, please send a screenshot of ONLYOFFICE address settings.

edarblanco

edarblanco commented on May 16, 2018

@edarblanco

Hello, it is necessary to say that my certificate is self-signed, but leaving it out and after several tests, I have solved the problem

    • Having a same domain generates a wildcard certificate, and imports it in all the instances that the services should run (say nextcloud, onlyoffice, zimbra)
    • Then I added these options to nginx and ready, all linked, I can use onlyoffice, nexcloud and zimbra without problems and they all see all
      add_header Strict-Transport-Security "max-age = 31536000; includeSubDomains" always;
      add_header X-Frame-Options "ALLOW-FROM https: //onlyofficeserver.domaind.tld" always;
alexanderonlyoffice

alexanderonlyoffice commented on May 17, 2018

@alexanderonlyoffice

@edarblanco, we are glad the issue has been resolved. We will take your solution into consideration.

runasas2017

runasas2017 commented on Sep 16, 2018

@runasas2017

Sorry, but what I needed to do if I use revers proxy nginx 192.168.1.101(access to nextcloud via proxy internal and external users). Nextcloud internal IP 192.168.1.10. Onlyoffice is installed on separate server like 192.168.1.11. I'm using lets encript certificates which are saved on proxy. Access to Nextcloud via cloud.firm.com. I wrote like addreses of onlyoffice local address. Web page onlyoffice is Present. server works. I sure the same trouble but I don't understand what and where I need to add. Please explain.

alexanderonlyoffice

alexanderonlyoffice commented on Oct 16, 2018

@alexanderonlyoffice

@runasas2017, please send us the screenshot of the error.

please check the accessibility of the Document Server for the Nextcloud and vice versa using the wget command. Example: wget https://documentserver_address (on the server where Nextcloud is installed) and wget https://nextcloud_address (on the server where Document Server is installed).

Specify also if you have added SSL certificates to the server where Document Server is installed. If your Nextcloud is using HTTPS, Document Server also should use HTTPS protocol.

changchichung

changchichung commented on Oct 18, 2018

@changchichung

same issue here
I can connect from onlyoffce to netxcloud and vice versa
and I can connect to onlyoffice

but still get error in nextcloud settings

and I modify the default.json to set rejectUnauthorized to false and restart services by supervisorctl

root@bc61d7159b7c:/# cat /etc/onlyoffice/documentserver/default.json |grep reject
				"rejectUnauthorized": false
root@bc61d7159b7c:/# 
root@bc61d7159b7c:/# supervisorctl restart all
onlyoffice-documentserver:spellchecker: stopped
onlyoffice-documentserver:gc: stopped
onlyoffice-documentserver:metrics: stopped
onlyoffice-documentserver:docservice: stopped
onlyoffice-documentserver:converter: stopped
onlyoffice-documentserver:metrics: started
onlyoffice-documentserver:spellchecker: started
onlyoffice-documentserver:gc: started
onlyoffice-documentserver:docservice: started
onlyoffice-documentserver:converter: started

But it`s still the same " Error while downloading the document file to be converted "

any suggestions ?

mathiasconradt

mathiasconradt commented on Oct 31, 2018

@mathiasconradt

@alexanderonlyoffice This ticket has been resolved, however the problem still exists when using http. I run OO in Docker with port mapping 8000:80, I can reach :8000 and see the OO info page saying "Document Server is running", however, in Nextcloud I get "Error while downloading the document file to be converted". Latest Docker image from repo as of today.

alexanderonlyoffice

alexanderonlyoffice commented on Oct 31, 2018

@alexanderonlyoffice

@mathiasconradt, this error means that the Document Server cannot download the file from Nextcloud for conversion and editing. Have you checked if Nextcloud is accessible for the Document Server?

Send us also the screenshot of the address settings of ONLYOFFICE integration app in Nextcloud.

14 remaining items

nextcloud101

nextcloud101 commented on Nov 4, 2019

@nextcloud101

Same problem here with the snap version 16. Tried everything with docker and without but no chance...

x4team

x4team commented on Nov 4, 2019

@x4team

Same problem here with the snap version 16. Tried everything with docker and without but no chance...

I have nextcloud 16 snap version on which everything works. BUT it has been updated since version 15! downgrade to snap unfortunately no.
SO:
TAKE EASY the Docker(via docker-compose) and set the nextcloud 15 version!:

version: '2'
services:
nginx:
image : nginx:stable
restart: always
depends_on:
- app
volumes:
- ./nginx/nginx-vhost.conf:/etc/nginx/conf.d/defaul$
- ./nginx/certificates:/mycerts
ports:
- 443:443
- 80:80
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --bin$
restart: always
volumes:
- ./data/nextcloud_db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=my_password
- MYSQL_PASSWORD=my_other_password
- MYSQL_DATABASE=nextcloud3
- MYSQL_USER=nextcloud
app:
image: nextcloud:15.0.0
depends_on:
- db
restart: always
volumes:
- ./app_data:/var/www/html

  • maybe if you save the application data to update it to 16/17 it will work
timmy1420

timmy1420 commented on Jan 31, 2020

@timmy1420

I'm also facing this issue. In my case I have an SSL with a let's encrypt certificate. Also using a docker container. Anyone know what's going on?

Here are some logs from /var/log/onlyoffice/documentserver/converter/out.log in onlyoffice docker container:
[2020-01-31T23:41:02.343] [ERROR] nodeJS - error downloadFile:url=http://127.0.0.1:8090/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.5RMkcq7uI01dPcf3BIR5ihAb3OVdmn5E8JLRZABtwQk;attempt=1;code:ECONNREFUSED;connect:null;(id=conv_check_969786424_docx)
Error: connect ECONNREFUSED 127.0.0.1:8090
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
[2020-01-31T23:41:03.347] [ERROR] nodeJS - error downloadFile:url=http://127.0.0.1:8090/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.5RMkcq7uI01dPcf3BIR5ihAb3OVdmn5E8JLRZABtwQk;attempt=2;code:ECONNREFUSED;connect:null;(id=conv_check_969786424_docx)
Error: connect ECONNREFUSED 127.0.0.1:8090
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
[2020-01-31T23:41:04.350] [ERROR] nodeJS - error downloadFile:url=http://127.0.0.1:8090/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.5RMkcq7uI01dPcf3BIR5ihAb3OVdmn5E8JLRZABtwQk;attempt=3;code:ECONNREFUSED;connect:null;(id=conv_check_969786424_docx)
Error: connect ECONNREFUSED 127.0.0.1:8090
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

I have a main site https://

.com.
The nextcloud is on a subdomain. https://sub..com -> Exposed from 127.0.0.1:8090
And only office is using port 3000 internally with http and doing a https redirect on port 3005 with nginx https://sub..com:3005. -> Exposed from 127.0.0.1:3000
Both domains have let's encrypt SSL.

Question:
But why is it using the port from the nextcloud docker container exposed host? (127.0.0.1:8090)

ghost
biva

biva commented on Apr 9, 2020

@biva

Hello, I have the same problem, and I found out that my document server (docker) doesn't have access to Nextcloud: if I launch wget nextcloud.mysite.com from docker (docker exec -it ID_CONTAINER /bin/bash), I don't get anything. But in fact, I can't access any site. If I do wget 77.95.65.121 (a google IP), I can't access it either.

For information, the document server is accessible from Nextcloud and all healtcheck are OK.
I'm using proxy on Apache and a certificate from Let's encrypt.
Any idea @alexanderonlyoffice ?

Alonso-10

Alonso-10 commented on Aug 2, 2020

@Alonso-10

Bonsoir moi aussi j'ai le même problème
Moi j'ai installé Onlyoffice directement sur le serveur Nextcloud et lors de l'intégration j'ai le message suivant : " Erreur durant la tentative de connexion (Une erreur s'est produite dans le service de document: Error while downloading the document file to be converted.) (version 5.6)". Et j'aimerais avoir un réponse afin de résoudre mon problème.
Merci
é

Alexconte31

Alexconte31 commented on Sep 2, 2020

@Alexconte31

same problem as alonso-10

rakibulinux

rakibulinux commented on Sep 23, 2020

@rakibulinux

Hello, @alexanderonlyoffice @Alonso-10 and @Alexconte31, I am getting the same problem. Any help will appreciate it.

  1. Error when trying to connect (Could not detect any host) (version 5.6)
  2. Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.) (version 5.6)

Screenshot from 2020-09-23 13-36-57

PhilippSchoenbaechler

PhilippSchoenbaechler commented on Sep 24, 2020

@PhilippSchoenbaechler

The same problem here, since update to version 5.6 last monday.
I use a separate virtual Linux-VM (without Docker) exclusive for the documentserver run wiht nginx with LetsEncrypt certificte.
Two different Nextcloud-Servers use this documentserver - on both I have the same problem.

The status-page says, that the documentserver is running:
OnlyOffice_Welcomescreen

In "/var/log/onlyoffice/documentserver/converter/out.log" I see the following error:
Error_Message

And this is the Error on Nextcloud-Side, when I save the OnlyOffice-Configuration (App-Version: 6.0.0):
Error_Message_Nextcloud

Any Ideas?

Thx, Philipp

biva

biva commented on Sep 24, 2020

@biva

@PhilippSchoenbaechler @rakibulinux I have the feeling that the ONLYOFFICE team is more active on their own forum: I posted and communicated a lot in https://dev.onlyoffice.org/viewtopic.php?f=53&t=24615#p34913

I have the same issue, tried a lot of ideas, but never achieved to make it work (NC on Debian/Apache + OO on Docker/Proxy). I'd like to write documentation to help others, but I can't until I have succeeded (https://github.com/biva/documentation/edit/biva/admin_manual/configuration_server/onlyoffice_configuration). I would be interested by your process to install it (@PhilippSchoenbaechler I understand that it was working before ?)

PhilippSchoenbaechler

PhilippSchoenbaechler commented on Sep 24, 2020

@PhilippSchoenbaechler

@biva
Thanks for your tip 👍

I have found the reason in my case:
The update from Documentserver 5.4 to 5.6 have overwrite the local.json-File (/etc/onlyoffice/documentserver)!
Solution_Onlyoffice

I have set the values to "true" and also replaced the value "secret" with the Secret-Key that I use in the app on Nextcloud.
After this, restart the Documentserver und nginx with this command:
supervisorctl restart all
systemctl restart nginx

And tada! Now, OnlyOffice runs correctly again.

I have installed my doxumentserver on a Debian 10 VM according to these instructions:
https://www.techlear.com/2020/05/01/how-to-install-onlyoffice-document-server-with-nginx-on-debian-10/

S0urC10ud

S0urC10ud commented on Dec 28, 2021

@S0urC10ud

This error can also be displayed if a wrong DNS-Server is used... Thus, a different certificate can be sent to the service and it might not be able to validate it.

SaschaMuehl

SaschaMuehl commented on Jan 6, 2022

@SaschaMuehl

Hallo @alexanderonlyoffice,
Is there meanwhile a hands-on solution for this problem?
I installed Onlyoffice via docker (latest version), use self-signed certificates and use the access via NGINX with a virtual path behind a reverse proxy server. (nextcloud and the document-server are running an the same machine but I also want to use the document-server internally)

https://192.168.178.92:4433 and https://XXX.spdns.org/onlyoffice/ are working as far I understand:
document-server

Now I get 4 problems:

  1. Nextcloud tells me the well known problem:
    Nextcloud
  2. trying to edit the default.json in Docker is not possible because there is no /etc/onlyoffice/documentserver/default.json
    How to find and edit this file?
  3. where should I copy the certificates to? I generated them to the folder /app/onlyoffice/DocumentServer/data/certs

Finally, there is a 4th question which might also be a root cause of my problem. If I click on "GO TO TEST EXAMPLE" I get two different NGINX messages (a via the 404 via my URL/virtual-path and a 500 via the local ip) -

->https://xxx.spdns.org/onlyoffice =>https://xxx.spdns.org/example

Example-Access-Error

Could you help me please at least for my 3 problems which were discussed here?

SergeyKorneyev

SergeyKorneyev commented on Jan 21, 2022

@SergeyKorneyev

Hi @SaschaMuehl,

  1. According to your screenshot, you have the Document Server address in the "Server address for internal requests from ONLYOFFICE Docs" field, the Nextcloud address needs to be specified there.
  2. The file is inside the Document Server container. You can access it with sudo docker exec -it [container ID] bash. The ID can be checked with the docker ps command.
  3. You can refer to the "Running ONLYOFFICE Docs using HTTPS" section of the following guide https://helpcenter.onlyoffice.com/installation/docs-community-install-docker.aspx
  4. This looks like a proxy issue at first glance, since if the Document Server is accessible at xxx.spdns.org/onlyoffice/, then the Example's address should be xxx.spdns.org/onlyoffice/example/

Also, It would be better if you created a separate issue in case you have any further questions.

cndingwei

cndingwei commented on Oct 1, 2024

@cndingwei

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”
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @johaahn@mathiasconradt@polarwinkel@legomind@edarblanco

        Issue actions

          Error while downloading the document file to be converted · Issue #181 · ONLYOFFICE/onlyoffice-owncloud