ONLYOFFICE / onlyoffice-nextcloud

The app which enables the users to edit office documents from Nextcloud using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Nextcloud
GNU Affero General Public License v3.0
558 stars 157 forks source link

Nextcloud reports GetConvertedUri on check error: Error occurred in the document service: Error while downloading the document file to be converted. #38

Open kdmitriy opened 5 years ago

kdmitriy commented 5 years ago

Do you want to request a feature or report a bug? Bug What is the current behavior? The nextcloud server reports "GetConvertedUri on check error: Error occurred in the document service: Error while downloading the document file to be converted." The certificate is not self-signed, by LetsEncrypt. Nextcloud also utilizes a valid certificate.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Clean install of standalone document server on both, docker and standalone server. Same behavior affects both. The secret keys are not set and cert checks are set not to validate. Attempted to set secret keys, same behavior.

What is the expected behavior?

Did this work in previous versions of DocumentServer? Same behavior on stand-alone server and docker. DocumentServer version: Latest docker Operating System: Ubuntu 18.04

Browser version: All

Please let me know how I could troubleshoot this further and have it fixed. I've ran through all posts with the same issue, none seem to be relevant to my scenario of not using self-signed certs. Thank you!

ShockwaveNN commented 5 years ago

Is documentserver running fine by itself? What is the result of https:\\documentserverurl\healthcheck and is tehre any errors in /var/log/onlyoffice/documentserver

kdmitriy commented 5 years ago

The service is running, and I don’t however see any errors in the error logs.

ShockwaveNN commented 5 years ago

If such issue seems unrelated to DocumentServer, moved issue to onlyoffice-nextcloud

alexanderonlyoffice commented 5 years ago

Hello @kdmitriy, could you please send us logs of the Document Server and Nextcloud to support@onlyoffice.com. Please add a note to the mail 'For technical support'.

kdmitriy commented 5 years ago

Hi @alexanderonlyoffice I have forwarded logs to you, please let me know if you need anything else to take this further. Thank you!

alexanderonlyoffice commented 5 years ago

Hello @kdmitriy, we analyzed the logs you sent us. We can see this error "Peer certificate CN=*****' did not match expected CN="*****". None of the common names in the certificate match the name that was entered. You can check by entering your certificate on SSL Checker website.

kdmitriy commented 5 years ago

I believe that was an old error when I had internal DNS conflicts with resolving names. The SSLCheck was throwing errors due to it being non-routable and only available to the internal network. I opened it up to the internet to double check the certificate. Thanks!

[image1.jpeg]

On Dec 13, 2018, at 3:11 AM, Alexander Zozulya notifications@github.com<mailto:notifications@github.com> wrote:

Hello @kdmitriyhttps://github.com/kdmitriy, we analyzed the logs you sent us. We can see this error "Peer certificate CN=pf..net<http://pf..net>' did not match expected CN=office..net<http://office..net>". None of the common names in the certificate match the name that was entered (office.angrywarrior.nethttp://office.****.net). You can check it via SSL Checkerhttps://www.sslshopper.com/ssl-checker.html#hostname=office.****.net.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/38#issuecomment-446931034, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ArlP1wdypDZMM9bRsKEtQBXetHqfS5LJks5u4jXPgaJpZM4ZM3ao.

alexanderonlyoffice commented 5 years ago

@kdmitriy, if we understood it right, the problem is solved. Please confirm.

kdmitriy commented 5 years ago

Hi Alexander, Unfortunately no, still the same issue persists. Both servers have a valid letsencrypt certificates, if it makes a difference, both of the server are behind NAT, I’ve exposed a document server to validate a certificate with no issues identified. Both of those hosts will only be available on the internal network, that could be another reason why it was complaining about a certificate, in this case about the nextcloud rather than only office when the only office is exposed to the internet and checking host against CA. Fri Dec 14 06:25:02.556922 2018] [ssl:warn] [pid 47214] AH01909: cloud.****.net:443:0 server certificate does NOT include an ID which matches the server name

The following still show when the cert error is resolved by exposing the endpoint to the internet. GetConvertedUri on check error: Error occurred in the document service: Error while downloading the document file to be converted. ErrorPHP7 minutes ago implode(): Invalid arguments passed at /var/www/nextcloud/apps/onlyoffice/templates/settings.php#66 ErrorPHP7 minutes ago count(): Parameter must be an array or an object that implements Countable at /var/www/nextcloud/apps/onlyoffice/templates/settings.php#64 Let me know what are your thoughts. Thanks!

LinneyS commented 5 years ago

implode() and count() will be fixed in the next version 013b9ff113142771e41c3bbc8de94f5d6c5ff55c But these are only php informational messages that do not affect the performance

What other messages when saving the connection settings?

kdmitriy commented 5 years ago

The only other error related to OpenOffice that I’m seeing is “GetConvertedUri on check error: Error occurred in the document service: Error while downloading the document file to be converted.” where I can’t connect document server to the nextcloud.

It could be the issue with the ROOT CA check with Ubuntu such as here if such as Public Root CA is not installed on the box: https://github.com/ONLYOFFICE/onlyoffice-owncloud/issues/180 still looking at this if possibly the public Root CA is missing on the server.

Edit: I’ve installed LetsEncrypt CA bundles which appeared to be missing on ubuntu, that hasn’t changed anything. Still seeing the following on logs:


{"reqId":"sRz0fg7mdkCEyOeCf5vK","level":3,"time":"2018-12-14T09:13:02+00:00","remoteAddr":"172.16.20.163","user":"admin","app":"onlyoffice","method":"PUT","url":"\/index.php\/apps\/onlyoffice\/ajax\/settings","message":"GetConvertedUri on check error: Error occurred in the document service: Error while downloading the document file to be converted.","userAgent":"Mozilla\/5.0 (iPhone; CPU iPhone OS 12_1_1 like Mac OS X) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/12.0 Mobile\/15E148 Safari\/604.1","version":"14.0.4.2"}
LinneyS commented 5 years ago

Is your nextcloud server accessible from Document Server?

wget http://pf.***.net/

kdmitriy commented 5 years ago

Yes, it’s accessible, pf is a gateway when DNS wasn’t properly configured. Nextcloud is at cloud.**** sub domain

root@6f3dad7c3648:/home# wget https://cloud.****.net --2018-12-14 09:38:34-- https://cloud.****.net/Resolving cloud..net (cloud..net)... xx.xx.xx.xx Connecting to cloud..net (cloud..net)|xx.xx.xx.xx|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: ‘index.html’

index.html 8.80K --.-KB/s in 0s

2018-12-14 09:38:34 (53.3 MB/s) - ‘index.html’ saved [9007]

Unless I specify internal IP in advanced settings, then I get the certificate errors that were visible from the previous logs along with bad request. I’m not seeing such issues with FQDN. Certificates seem to be properly configured.

LinneyS commented 5 years ago

The Nextcloud is not accessable from Document Server at the address from the settings. What is the message in the Document Server log about it?

kdmitriy commented 5 years ago

I've reviewed all logs on the document server, all logs appear to be empty. I've decided to reinstall docker and start fresh, the same issue still persists where nextcloud receives the same error “GetConvertedUri on check error: Error occurred in the document service: Error while downloading the document file to be converted.”. I don't see any other issues logged in either of the server logs. Thanks!

alexanderonlyoffice commented 5 years ago

@kdmitriy, please turn on extended logging for the Document Server. In order to do that, please enter the container with Document Server -> open /etc/onlyoffice/documentserver/log4js/production.json -> change 'WARN' value to 'ALL' -> save and close the config -> restart all services of Document server with the command supervisorctl restart all -> check the logs once again.

kdmitriy commented 5 years ago

@AlekseyKostenko debug logs emailed. Let me know if you need anything else. Thank you!

kdmitriy commented 5 years ago

@alexander I have emailed you logs. Thanks!

On Dec 17, 2018, at 12:00 AM, Alexander Zozulya notifications@github.com<mailto:notifications@github.com> wrote:

@kdmitriyhttps://github.com/kdmitriy, please turn on extended logging for the Document Server. In order to do that, please enter the container with Document Server -> open /etc/onlyoffice/documentserver/log4js/production.json -> change 'WARN' value to 'ALL' -> save and close the config -> restart all services of Document server with the command supervisorctl restart all -> check the logs once again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/38#issuecomment-447754473, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ArlP199SkTHM8RsJUqWmZ9R6NAUWhzEYks5u5080gaJpZM4ZM3ao.

eustachy84 commented 5 years ago

Hello

I have similar problem. Fresh install ONLYOFFICE on docker. Two different internal subnets. ONLYOFFICE installed with JWT_ENABLED=true, JWT_SECRET=mysecret(different, no standard one). Before ONLYOFFICE HAAPROXY with ssl offload. ONLYOFFICE(on haapromxy) and next cloud using LetsEncrypt Cert. Can wget all across.

Thanks for sugestion Rafal

mqu commented 5 years ago

facing same issue here with docker, nextcloud and onlyoffice in a dedicated container. You can find my docker-compose.yml here : https://gist.github.com/mqu/6b71ed396e018eb948b40ef8e4340c20

to activate logs on onlyoffice container, just issue :

docker-compose exec onlyoffice /bin/bash
sed -i -e 's/WARN/ALL/' /etc/onlyoffice/documentserver/log4js/production.json
supervisorctl restart all

# have a look at logs files :
cd /var/log/onlyoffice/documentserver
ls -alt
langfingaz commented 5 years ago

I had the same error message recently and in my case it was caused by the system time being a couple seconds off on one (or more) of the involved computers (Nextcloud / Onlyoffice / Client).

You might verify that by running timedatectl on all computers.

After I started and enabled a timesync service, it was resolved: sudo systemctl start systemd-timesyncd && sudo systemctl enalbe systemd-timesyncd.

Not sure if this helps you in your case though.

andreasnuesslein commented 4 years ago

I had the same issue because the docker container could actually not resolve the hostname correctly for the same host. so basically what I had to do was add --add-host=:

docker run -i -t -d -p 3412:80 --restart=always --add-host=nextcloud.myhost.com:ext.ern.al.ip onlyoffice/documentserver
LinneyS commented 4 years ago

@kdmitriy Could you please specify if the problem recurs?

ltdaydo commented 4 years ago

Hi all I have the same problem That is my log of /var/***/documentserver/docservice/out.log

error: syntax error at or near "ON"
    at Connection.parseE (/var/www/onlyoffice/documentserver/server/DocService/node_modules/pg/lib/connection.js:606:11)
    at Connection.parseMessage (/var/www/onlyoffice/documentserver/server/DocService/node_modules/pg/lib/connection.js:403:19)
    at Socket.<anonymous> (/var/www/onlyoffice/documentserver/server/DocService/node_modules/pg/lib/connection.js:123:22)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at TCP.onread (net.js:601:20)

I check https://localhost/healthcheck result return that "true" Any have any suggestion for me :( Thanks so much

foobn commented 3 years ago

I have the same problem. Document Server is running fine. One nextcloud with the same TLD is connected and running. Another nextcloud with a different TLD give the error statet above.

damien-sorin commented 8 months ago

Hi, right now had an issue with Nextcloud-OnlyOffice in combination with my OnlyOffice Document-Server.

After reading @foobn's comment, i tried something: turns out that the cause of my problem was the different url's of nextcloud and document server

Reconfigured document server to use the same url (but of course different port), using the same TLS certificate as the nextcloud solved my problem.


here are some more information for all who are interested:

both is hosted on the same server. Externally available is only the Port of nextcloud, not my custom Port (25801) of the document server.

both had its own TLS certificate configured (nextcloud.domain.tld and document-server.domain.tld).

from command line of the server

openssl s_client -connect https://nextcloud.domain.tld

and

openssl s_client -connect https://document-server.domain.tld:25801

states that everything is fine.

Nextcloud ONLYOFFICE configuration was

Address:     https://document-server.domain.tld
Secret Key:  xxxxxxxxxxxxxxxxxxxxxxxx

After saving the settings a green success notification appeared. So its seems fine - but it didn't work in the end. -> Endless loading screen in Mobile App, and a generic error in browser.