Description
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.
/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:
Activity
zsixSiuL commentedon May 9, 2018
same here!!!
alexanderonlyoffice commentedon May 11, 2018
@johaahn, we have reproduced the issue. We will analyze the information we got and contact you.
alexanderonlyoffice commentedon May 11, 2018
@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":
fromtrue
tofalse
in /etc/onlyoffice/documentserver/default.json. After that restart all the services of the Document Server.edarblanco commentedon May 15, 2018
Hi, when change option "rejectUnauthorized": from true to false, the server response is bad gateway
alexanderonlyoffice commentedon May 16, 2018
@edarblanco, please send a screenshot of ONLYOFFICE address settings.
edarblanco commentedon May 16, 2018
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
add_header Strict-Transport-Security "max-age = 31536000; includeSubDomains" always;
add_header X-Frame-Options "ALLOW-FROM https: //onlyofficeserver.domaind.tld" always;
alexanderonlyoffice commentedon May 17, 2018
@edarblanco, we are glad the issue has been resolved. We will take your solution into consideration.
runasas2017 commentedon Sep 16, 2018
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 commentedon Oct 16, 2018
@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 commentedon Oct 18, 2018
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
But it`s still the same " Error while downloading the document file to be converted "
any suggestions ?
mathiasconradt commentedon Oct 31, 2018
@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 commentedon Oct 31, 2018
@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 commentedon Nov 4, 2019
Same problem here with the snap version 16. Tried everything with docker and without but no chance...
x4team commentedon Nov 4, 2019
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
timmy1420 commentedon Jan 31, 2020
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)
biva commentedon Apr 9, 2020
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 dowget 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 commentedon Aug 2, 2020
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 commentedon Sep 2, 2020
same problem as alonso-10
rakibulinux commentedon Sep 23, 2020
Hello, @alexanderonlyoffice @Alonso-10 and @Alexconte31, I am getting the same problem. Any help will appreciate it.
PhilippSchoenbaechler commentedon Sep 24, 2020
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:

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

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

Any Ideas?
Thx, Philipp
biva commentedon Sep 24, 2020
@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 commentedon Sep 24, 2020
@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)!
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 commentedon Dec 28, 2021
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 commentedon Jan 6, 2022
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:

Now I get 4 problems:
How to find and edit this file?
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
Could you help me please at least for my 3 problems which were discussed here?
SergeyKorneyev commentedon Jan 21, 2022
Hi @SaschaMuehl,
sudo docker exec -it [container ID] bash
. The ID can be checked with thedocker ps
command.Also, It would be better if you created a separate issue in case you have any further questions.
cndingwei commentedon Oct 1, 2024
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”
)