onlyoffice-owncloud: Error while downloading the document file to be converted

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.<anonymous> (_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

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 40 (7 by maintainers)

Most upvoted comments

@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/

@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.

@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.

i can confirm that this solution worked for me using NC15. thanks!

Update: Now i get some error in nextcloud.log like this: count(): Parameter must be an array or an object that implements Countable at /var/www/nextcloud/apps/onlyoffice/lib/appconfig.php#477

Undefined offset: 2 at /var/www/nextcloud/apps/onlyoffice/controller/editorcontroller.php#434

implode(): Invalid arguments passed at /var/www/nextcloud/apps/onlyoffice/templates/settings.php#66

count(): Parameter must be an array or an object that implements Countable at /var/wwwnextcloud/apps/onlyoffice/templates/settings.php#64

Error: Call to undefined method Doctrine\DBAL\Exception\DriverException::getResult() at /var/www/nextcloud/ocs/v1.php#71

what should i do?

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.

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?