[bug] Document Server doesnt work in Swarm Mode
ztimson opened this issue · 0 comments
Description of the bug
The document server doesn't work when deployed using docker swarm.
Opening files results in errors.
Step by step instructions to reproduce the bug
- Enable swarm mode
- Deploy docker compose file as a new stack
- Setup account/storage as usual
- Create/edit a
*.docx
file - Docserver will eaither timeout while loading or immediatly error. Logs can also be found on the
doumentserver
side
Observed behavior
The document server logs show that it can't connect to the filestash endpoint.
[2023-11-23T06:03:49.320] [ERROR] [localhost] [ACdZcfbFcdEctwc5S9be] [Tcndgd2cbdEcfc8cmcWd] nodeJS - error downloadFile:url=http://172.18.0.6:8334/onlyoffice/content?key=ACdZcfbFcdEctwc5S9be;attempt=3;code:ECONNREFUSED;connect:null Error: connect ECONNREFUSED 172.18.0.6:8334
You can see the IP address is an internal docker address that isn't routable (part of docker swarms overlay network).
The source code shows that when the request is assembled, a TCP response is used to determin the IP address & assume that it is reachable from the documentserver
.
Expected behavior
There should be a way to provide the address the documentserver
should use which would fix my issue.
I believe if the source was changed to use the APPLICATION_URL
environment varaible that is already provided, we would be good to go. Alternatively a new environment variable could be created if APPLICATION_URL
would cause issues.
I would make the change myself but I don't know go or the project, just found it & im trying to get it to work.