Document Server version: latest
Type of installation of the Document Server (docker, deb/rpm, exe, please point us to the installation guide that you used as well): Installed by docker image, used this guide to set ssl and created volumes as it written in the official guide.
OS: Windows Server 2019 (MVC app) and Docker on Linux (OnlyOffice Document Server)
Browser version: Chrome
Additional information: I run a onlyoffice/documentserver container on the same machine on Windows where I have the application which uses OnlyOffice editor and it works well. But when I run a container on a separate server on Linux I have faced with the problem that files can not be loaded (“Download failed” error)…
Hello @Shirali,
Please provide full Document Server logs (/var/log/onlyoffice/documentserver - inside the container) after the issue reproduction, docker ps command’s output
Usually, I first start without SSL and add that ontop, when things are ok. So far this could be an SSL issue.
Maybe you have a firewall running on the other host?
Are you serving other apps/backends on those other hosts?
You should be able to reach the onlyoffice welcome page if you access: https://<host-ip>/welcome
You can try that with all the hosts.
Yes, probably it’s all because of firewall. I think I should properly set proxy server to solve this issue, but I don’t understand what exactly should I write in config
Hello there,
basically you could try to use a tutorial, that isn’t too old and fits your environment.
I use my server on an actual internet domain and every service runs in docker. Personally I use SWAG as my proxy. It has no UI, but I’m very familiar with simple configuration files.
I don’t have any links in mind. Just check out on the net what you can find. There are many blogs and YT-videos out there showing one way to get things installed and configured. You can simply try to find something that suits your setup best/closest.
Onlyoffice has some instructions too. But, to my knowledge, they don’t cover proxy settings.
So, I used this templates but it didn’t help at all.
I also configured public and local IPs, hoping it would work.
In console logs I have this error https://<Linux IP>/downloadfile/88d52c9b-202c-41a4-afec-3ab31035da07. Also I have figured out that Linux server doesn’t curl my app endpoints.
I’m already cooked and I have no idea what else to try…
First of all you need a working and accessible onlyoffice-service, before you can setup a proxy or however access you have planned. In my personal experience deploying a docker is the easiest way and can be reproduced without much effort on any other docker-host by just reusing the the compose file/docker run command.
So before you go on, please check if your onlyoffice-service is accessible via:
http://<host ip>:<port>/welcome
on your browser or via console with: curl http://<host ip>:<port>/healthcheck
It should return true.
You should do it from the host (ssh and with curl) and from a remote machine (curl or browser), to see if the ports http 80/ https 443 are accessible.
But to make things easier, try http without SSL first. Proxying is just redirecting the traffic from the proxy to the upstream host, based on the requested domain/address and/or port … here the same address and port you have the service running. If you do this step by step you can see at what point things seem to hang. Then we can investigate the cause and hopefully find the culprit.
Strangely, there are no relevant errors in above-provided converter and docservice logs, please do as suggested above - check the access with curl request, also, please provide your current proxy configuration, a screenshot showing DevTools - Console and Network tabs when reproducing the issue
Thank you all for your help!
I reinstalled Debian on the server and repeated all the previous steps, and somehow it worked.
However, now I have encountered a new problem: when I try to download a file by its URL, a CORS-related error appears in the logs.
async function saveFile() { // I invoke this function
docEditor.downloadAs("pdf")
}
function onDownloadAs(event) {
loadPDF(event.data.url)
}
function loadPDF(pdfUrl) {
pdfjsLib.getDocument(pdfUrl).promise.then(function (pdf) { ... } // returns error
}
Could someone explain me how to disable CORS for my document server?