Hi,
I have a strange problem with my OnlyOffice setup using Docker-Compose in my dev environment.
I have an application serving a WOPI Host (which for example is working with Collabaora). I want to try to switch to OnlyOffice so I setup a new dev environment with Docker-Compose. I have my app serving the WOPI Host and the OnlyOffice Document server. Config looks like this:
imixs-documents:
image: imixs/imixs-documents:latest
environment:
WOPI_PUBLIC_ENDPOINT: "localhost:80/"
WOPI_DISCOVERY_ENDPOINT: "onlyoffice-app:80/hosting/discovery"
WOPI_HOST_ENDPOINT: "imixs-documents:8080/api/wopi/"
ports:
- "8080:8080"
onlyoffice-app:
image: onlyoffice/documentserver
container_name: onlyoffice-app
expose:
- 80
ports:
- "80:80"
environment:
WOPI_ENABLED: "true"
The WOPI integration of OnlyOffice works very fine out of the box. So I can open from my application the office documents with the OnlyOffice documentserver.
So I know that GET FileInfo and GET FileContents is working correctly. But I failed so far to update my documents - POST FileContent is not working (or at least never called by OnlyOffice).
As I am in a Docker-Compose setup I have to deal with the internal and external host names. My application for example uses the internal docker host name to request the WOPI Discovery endpoint (“onlyoffice-app:80/hosting/discovery”) - working fine.
Also Only Office can successful call all the WOPI GET endpoints from my app endpoint via the docker host name (imixs-documents:8080/api/wopi/)
Of course my Browser access the OnlyOffice app via the external host name (localhost:80). I think this is all fine but something is going wrong with the internal communication between the document server and my application.
I can see the following error log message in the document server which my point to the problem (which I did not see so far):
onlyoffice-app | * Reloading nginx configuration nginx
onlyoffice-app | ...done.
onlyoffice-app | ==> /var/log/onlyoffice/documentserver/converter/err.log <==
onlyoffice-app |
onlyoffice-app | ==> /var/log/onlyoffice/documentserver/converter/out.log <==
onlyoffice-app | [2022-07-06T16:40:04.607] [WARN] nodeJS - update cluster with 1 workers
onlyoffice-app | [2022-07-06T16:41:09.907] [WARN] nodeJS - update cluster with 1 workers
onlyoffice-app | [2022-07-06T16:41:09.913] [WARN] nodeJS - worker 1086 started.
onlyoffice-app | [2022-07-06T16:41:09.916] [WARN] nodeJS - update cluster with 1 workers
onlyoffice-app | [2022-07-06T20:07:15.800] [WARN] nodeJS - update cluster with 1 workers
onlyoffice-app | [2022-07-06T20:07:15.811] [WARN] nodeJS - worker 976 started.
onlyoffice-app | [2022-07-06T20:07:15.817] [WARN] nodeJS - update cluster with 1 workers
onlyoffice-app | [2022-07-06T20:08:09.855] [WARN] nodeJS - update cluster with 1 workers
onlyoffice-app | [2022-07-06T20:08:09.862] [WARN] nodeJS - worker 1086 started.
onlyoffice-app | [2022-07-06T20:08:09.866] [WARN] nodeJS - update cluster with 1 workers
onlyoffice-app |
onlyoffice-app | ==> /var/log/onlyoffice/documentserver/docservice/err.log <==
onlyoffice-app |
onlyoffice-app | ==> /var/log/onlyoffice/documentserver/docservice/out.log <==
onlyoffice-app | at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
onlyoffice-app | [2022-07-06T17:04:47.984] [WARN] nodeJS - UpdateVersion expired: docId = imixs-rechnungsvorlage.odt
onlyoffice-app | [2022-07-06T20:07:16.582] [WARN] nodeJS - Express server starting...
onlyoffice-app | [2022-07-06T20:07:16.584] [WARN] nodeJS - Set services.CoAuthoring.token.enable.browser, services.CoAuthoring.token.enable.request.inbox, services.CoAuthoring.token.enable.request.outbox in the Document Server config to prevent an unauthorized access to your documents and the substitution of important parameters in ONLYOFFICE Document Server requests.
onlyoffice-app | [2022-07-06T20:07:16.585] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability
onlyoffice-app | [2022-07-06T20:07:16.736] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.1. Build: 23
onlyoffice-app | [2022-07-06T20:08:08.225] [WARN] nodeJS - Express server starting...
onlyoffice-app | [2022-07-06T20:08:08.227] [WARN] nodeJS - Set services.CoAuthoring.token.enable.browser, services.CoAuthoring.token.enable.request.inbox, services.CoAuthoring.token.enable.request.outbox in the Document Server config to prevent an unauthorized access to your documents and the substitution of important parameters in ONLYOFFICE Document Server requests.
onlyoffice-app | [2022-07-06T20:08:08.228] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability
onlyoffice-app | [2022-07-06T20:08:08.400] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.1. Build: 23
onlyoffice-app |
onlyoffice-app | ==> /var/log/onlyoffice/documentserver/metrics/err.log <==
onlyoffice-app |
onlyoffice-app | ==> /var/log/onlyoffice/documentserver/metrics/out.log <==
onlyoffice-app | counter_rates: {
onlyoffice-app | 'statsd.bad_lines_seen': 0,
onlyoffice-app | 'statsd.packets_received': 0,
onlyoffice-app | 'statsd.metrics_received': 0
onlyoffice-app | },
onlyoffice-app | sets: {},
onlyoffice-app | pctThreshold: [ 90 ]
onlyoffice-app | }
onlyoffice-app | 6 Jul 20:07:15 - [932] reading config file: ./config/config.js
onlyoffice-app | 6 Jul 20:07:15 - server is up INFO
onlyoffice-app |
onlyoffice-app | ==> /var/log/onlyoffice/documentserver/nginx.error.log <==
onlyoffice-app | 2022/07/05 10:32:27 [error] 967#967: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.128.4, server: , request: "GET /hosting/discovery HTTP/1.1", upstream: "127.0.0.1:8000/hosting/discovery", host: "onlyoffice-app"
onlyoffice-app | 2022/07/05 10:32:27 [error] 967#967: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.128.4, server: , request: "GET /hosting/discovery HTTP/1.1", upstream: "127.0.0.1:8000/hosting/discovery", host: "onlyoffice-app"
onlyoffice-app | 2022/07/05 10:32:27 [error] 967#967: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.128.4, server: , request: "GET /hosting/discovery HTTP/1.1", upstream: "127.0.0.1:8000/hosting/discovery", host: "onlyoffice-app"
onlyoffice-app | 2022/07/05 10:32:27 [error] 967#967: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.128.4, server: , request: "GET /hosting/discovery HTTP/1.1", upstream: "127.0.0.1:8000/hosting/discovery", host: "onlyoffice-app"
onlyoffice-app | 2022/07/05 10:32:27 [error] 967#967: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.128.4, server: , request: "GET /hosting/discovery HTTP/1.1", upstream: "127.0.0.1:8000/hosting/discovery", host: "onlyoffice-app"
onlyoffice-app | 2022/07/05 10:32:27 [error] 967#967: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.128.4, server: , request: "GET /hosting/discovery HTTP/1.1", upstream: "127.0.0.1:8000/hosting/discovery", host: "onlyoffice-app"
onlyoffice-app | 2022/07/05 10:32:28 [error] 967#967: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.128.4, server: , request: "GET /hosting/discovery HTTP/1.1", upstream: "127.0.0.1:8000/hosting/discovery", host: "onlyoffice-app"
onlyoffice-app | 2022/07/05 10:32:28 [error] 967#967: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.128.4, server: , request: "GET /hosting/discovery HTTP/1.1", upstream: "127.0.0.1:8000/hosting/discovery", host: "onlyoffice-app"
onlyoffice-app | 2022/07/05 10:33:21 [error] 967#967: *14 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.128.1, server: , request: "POST /hosting/wopi/word/edit?&%3Crs=DC_LLCC&%3E%3Cdchat=DISABLE_CHAT&%3E%3Ce=EMBEDDED&%3E%3Cfs=FULLSCREEN&%3E%3Chid=HOST_SESSION_ID&%3E%3Crec=RECORDING&%3E%3Csc=SESSION_CONTEXT&%3E%3Cthm=THEME_ID&%3E%3Cui=UI_LLCC&%3E%3Cwopisrc=WOPI_SOURCE&%3E&WOPISrc=imixs-documents:8080/api/wopi/35ae501d-ac67-4a1a-99ac-930587800671/files/imixs-rechnungsvorlage.odt HTTP/1.1", upstream: "127.0.0.1:8000/hosting/wopi/word/edit?&%3Crs=DC_LLCC&%3E%3Cdchat=DISABLE_CHAT&%3E%3Ce=EMBEDDED&%3E%3Cfs=FULLSCREEN&%3E%3Chid=HOST_SESSION_ID&%3E%3Crec=RECORDING&%3E%3Csc=SESSION_CONTEXT&%3E%3Cthm=THEME_ID&%3E%3Cui=UI_LLCC&%3E%3Cwopisrc=WOPI_SOURCE&%3E&WOPISrc=imixs-documents:8080/api/wopi/35ae501d-ac67-4a1a-99ac-930587800671/files/imixs-rechnungsvorlage.odt", host: "localhost", referrer: "localhost:8080/"
onlyoffice-app | 2022/07/05 10:33:21 [error] 967#967: *14 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.128.1, server: , request: "POST /hosting/wopi/word/edit?&%3Crs=DC_LLCC&%3E%3Cdchat=DISABLE_CHAT&%3E%3Ce=EMBEDDED&%3E%3Cfs=FULLSCREEN&%3E%3Chid=HOST_SESSION_ID&%3E%3Crec=RECORDING&%3E%3Csc=SESSION_CONTEXT&%3E%3Cthm=THEME_ID&%3E%3Cui=UI_LLCC&%3E%3Cwopisrc=WOPI_SOURCE&%3E&WOPISrc=imixs-documents:8080/api/wopi/35ae501d-ac67-4a1a-99ac-930587800671/files/imixs-rechnungsvorlage.odt HTTP/1.1", upstream: "127.0.0.1:8000/hosting/wopi/word/edit?&%3Crs=DC_LLCC&%3E%3Cdchat=DISABLE_CHAT&%3E%3Ce=EMBEDDED&%3E%3Cfs=FULLSCREEN&%3E%3Chid=HOST_SESSION_ID&%3E%3Crec=RECORDING&%3E%3Csc=SESSION_CONTEXT&%3E%3Cthm=THEME_ID&%3E%3Cui=UI_LLCC&%3E%3Cwopisrc=WOPI_SOURCE&%3E&WOPISrc=imixs-documents:8080/api/wopi/35ae501d-ac67-4a1a-99ac-930587800671/files/imixs-rechnungsvorlage.odt", host: "localhost", referrer: "localhost:8080/"
Can someone help me to understand what is going on here?
I think the main problem can be seen in the last line of the log message. The documentserver maybe tries to access my application via localhost:8080/ which is wrong in this docker-compose scenario as the application is only visible via the docker host name imixs-documents:8080
Maybe there is a trick that I can tell the OnlyOffice Document server the internal host name?
Thanks for any help
(because I am a new user I was forced to remove the http : // prfixes as this forum does not allow me to use this more then 2 times in a post)
====
Ralph