OnlyOffice some endpoint result in 502 when hosting

Do you want to: Suggest a feature / Report a bug / Ask a how-to question
I think this is some kind of bug, but I would also like to get help how to resolve it.

For bug reports, provide the steps to reproduce and if possible a minimal demo of the
problem.
Locally everything works, but when i host onlyoffice/documentserver on azure app services or on virtual machine 502 error is returned from these routes:

  • /healthcheck,
  • /7.3.3-49/doc/A3x32rFT5pdAss4holuZ/c/?EIO=4&transport=polling&t=OXdKwcG.

All I configured for image to run on azure app services/vm is I provided JWT_SECRET as well as gave all necessary environment variables for postgreSQL database (although i do not believe it changes something).

Document Server version:
Docker image 7.3

Type of installation of the Document Server (docker, deb/rpm, exe)
Docker
OS: Linux
Browser version: Microsoft Edge Version 113.0.1774.57 (Official build) (64-bit)
I also created issue on github where I describe this problem.

Hello @raltvein
Please do not post the same issue on different communication channels. Let’s focus our work here, on forum.
First of all, please bear in mind, that we didn’t test Document server installation on Azure, so we cannot predict possible issues. Official installation guides and system requirements are located here:Installation Guides - Docs Community Edition - ONLYOFFICE
Nonetheless, please clarify the situation, I checked out the link from your screenshot and saw installed Document server:ONLYOFFICE Docs Community Edition
Do I understand it right that you face issues when you’re trying to integrate it with some sort of storage? Please reproduce the situation and provide us with Document server and container itself logs. DS logs are located inside the container: var/log/onlyoffice
As for container logs, please run docker logs ID_of_container command.

Thank you for your reply,
I think that first of all I should describe OnlyOffice use case. In your reply you assumed that I am trying to intergrate OnlyOffice with any kind o storage but thats not what I am trying to achieve. In my system OnlyOffice will be used only for filling out forms and will not be connected to any storage. So whole flow is that user goes to my website and there he can fill out a form (oform). This form is opened inside my webpage in iframe using OnlyOffice document server (for connection I use React library for OnlyOffice). After use fills out the form it will not be saved anywhere but instead user will download it and send it to me.
Now for the problem. My problem is that while locally OnlyOffice works perfectly fine, i can not make it work on azure (I have tried 3 different hosting platforms, and all of them did not work. I tried web apps, virtual machine and container instance). While front page works, that you have discovered, /healthcheck does not. My main problem is that when oform is opening websocket endpoint gives same 502 error.


image
And because of that error file will not open and eventually this message will pop up.
image
Here are errors that I see in docker console, when I receive this 502 errors.

2023/06/01 04:59:15 [error] 6393#6393: *6299 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.25, server: , request: "GET /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "20.105.70.34"
2023/06/01 04:59:15 [error] 6393#6393: *6299 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.25, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8000/favicon.ico", host: "20.105.70.34", referrer: "http://20.105.70.34/healthcheck"
2023/06/01 05:03:31 [error] 6393#6393: *6341 open() "/var/www/onlyoffice/documentserver/web-apps/vendor/socketio/socket.io.min.js.map" failed (2: No such file or directory), client: 10.92.0.25, server: , request: "GET /7.3.3-49/web-apps/vendor/socketio/socket.io.min.js.map HTTP/1.1", host: "20.105.70.34"
2023/06/01 05:03:32 [error] 6393#6393: *6345 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.25, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=websocket HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=websocket", host: "20.105.70.34"
2023/06/01 05:03:33 [error] 6393#6393: *6347 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLlD1 HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLlD1", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:03:34 [error] 6393#6393: *6342 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.25, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLlXE HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLlXE", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:03:36 [error] 6393#6393: *6342 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.25, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLl_r HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLl_r", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:03:41 [error] 6393#6393: *6355 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.25, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLnLu HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLnLu", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:03:48 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLp3M HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLp3M", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:03:59 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLrcL HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLrcL", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:04:10 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLuIA HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLuIA", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:04:21 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLwzy HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLwzy", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:04:32 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLzfp HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLzfp", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:04:42 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM06o HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM06o", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:04:53 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM2nw HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM2nw", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:05:04 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM5Tp HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM5Tp", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:05:15 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM89m HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM89m", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:05:26 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrMArZ HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrMArZ", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:05:37 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrMDXR HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrMDXR", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"

Logs from /var/log/onlyoffice/documentserver/nginx.error.log

root@SandboxHost-638210290853263304:/var/log/onlyoffice/documentserver# tail -f nginx.error.log
2023/06/01 05:04:10 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLuIA HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLuIA", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:04:21 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLwzy HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLwzy", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:04:32 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLzfp HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrLzfp", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:04:42 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM06o HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM06o", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:04:53 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM2nw HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM2nw", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:05:04 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM5Tp HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM5Tp", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:05:15 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM89m HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrM89m", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:05:26 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrMArZ HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrMArZ", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:05:37 [error] 6393#6393: *6359 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.26, server: , request: "GET /7.3.3-49/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrMDXR HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/I34o8x4pvlzZjaC27uMg/c/?EIO=4&transport=polling&t=OXrMDXR", host: "20.105.70.34", referrer: "http://20.105.70.34/7.3.3-49/web-apps/apps/documenteditor/forms/index.html?_dc=7.3.3-49&lang=en&customer=ONLYOFFICE&frameEditorId=documentEditor&mode=view&parentOrigin=http://127.0.0.1:5173"
2023/06/01 05:07:03 [error] 6393#6393: *6398 connect() failed (111: Unknown error) while connecting to upstream, client: 10.92.0.25, server: , request: "GET /actuator/gateway/routes HTTP/1.1", upstream: "http://127.0.0.1:8000/actuator/gateway/routes", host: "20.105.70.34:80"

I also looked into docservice and metrics folders under /var/log/onlyoffice/documentserver and found there 2 log files err.log and out.log but they did not contain any useful information.

root@SandboxHost-638210290853263304:/var/log/onlyoffice/documentserver/metrics# tail -f out.log
  gauges: { 'statsd.timestamp_lag': 0 },
  timer_data: {},
  counter_rates: {
    'statsd.bad_lines_seen': 0,
    'statsd.packets_received': 0,
    'statsd.metrics_received': 0
  },
  sets: {},
  pctThreshold: [ 90 ]
}

root@SandboxHost-638210290853263304:/var/log/onlyoffice/documentserver/docservice# tail -f out.log
[2023-06-01T04:18:31.470] [ERROR] [localhost] [docId] [userId] nodeJS - checkFileExpire error: error: no pg_hba.conf entry for host "20.105.113.111", user "pgadminaccount", database "onlyoffice", no encryption
    at Parser.parseErrorMessage (/snapshot/server/build/server/DocService/node_modules/pg-protocol/dist/parser.js:287:98)
    at Parser.handlePacket (/snapshot/server/build/server/DocService/node_modules/pg-protocol/dist/parser.js:126:29)
    at Parser.parse (/snapshot/server/build/server/DocService/node_modules/pg-protocol/dist/parser.js:39:38)
    at Socket.<anonymous> (/snapshot/server/build/server/DocService/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9)
    at Socket.Readable.push (internal/streams/readable.js:206:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)

So the issue seems to be in that nginx redirects requests to some upstream branch located at localhost:8000 (localhost meaning inside docker container) but there is no process that is running on port 8000 inside docker container.

root@SandboxHost-638210290853263304:/var/log/onlyoffice/documentserver/metrics# sudo netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:25672           0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:9001          0.0.0.0:*               LISTEN      606/python3         
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      632/nginx: master p 
tcp        0      0 0.0.0.0:4369            0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::8126                 :::*                    LISTEN      -                   
tcp6       0      0 :::5672                 :::*                    LISTEN      -                   
tcp6       0      0 :::80                   :::*                    LISTEN      632/nginx: master p 
tcp6       0      0 :::4369                 :::*                    LISTEN      -                   
udp        0      0 0.0.0.0:8125            0.0.0.0:*                           -     

As for installation all I did was to start docker container and provide it with postgreSQL database as well as with secret key. The same steps that I took locally, where everything is working and on port 8000 is some kind of process. Also, while there is no process on port 8000, supervisorctl status all command shows that all services are running just fine.

root@SandboxHost-638210290853263304:/var/log/onlyoffice/documentserver/metrics# supervisorctl status all
ds:converter                     RUNNING   pid 781, uptime 13:01:18
ds:docservice                    RUNNING   pid 772, uptime 13:01:19
ds:example                       STOPPED   Not started
ds:metrics                       RUNNING   pid 615, uptime 13:02:24

If you need any other information I will be happy to provide it for you. My company is very optimistic about your software and we would like start using it for form filling so that our clients do not screw things up. Also we will be definitely buying paid version but before that my company wants to see working prototype so that we do not spend money on something that does not work.

Also want to note that my hosting environment complies with OnlyOffice docker system requirements

root@SandboxHost-638211942365672455:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          50G  1.2G   46G   3% /
tmpfs            64M     0   64M   0% /dev
shm              64M     0   64M   0% /dev/shm
/dev/sdc         50G  1.2G   46G   3% /etc/hosts
tmpfs           744M     0  744M   0% /sys/fs/cgroup
tmpfs           744M     0  744M   0% /proc/acpi
tmpfs           744M     0  744M   0% /sys/firmware
root@SandboxHost-638211942365672455:/# free
               total        used        free      shared  buff/cache   available
Mem:         1523616      328504       93132       27600     1101980     1013824
Swap:              0           0           0
root@SandboxHost-638211942365672455:/# grep -c ^processor /proc/cpuinfo
1

Hello @raltvein
It seems that there’s no mutual connection between your Document server and remote database. We’ve tried to reproduce it and achieved the same error entry when we comment out a few lines in pg_hba.conf file:1

Please send us your pg_hba.conf file just in case. About your scenario in general, please let us know the exact command with arguments which you used to start Document server container. Additionally, let us know your exact OS version.
So far it looks like there’s no access to database from your Document server.

Hi,
Sorry for such late answer. Regarding problem, I am pretty sure, that connection to database is working as OnlyOffice is creating 2 tables (doc_changes and task_result) in database on startup even when I delete them manually. Other than than here is my pg_hba.conf file.

---------------- A lot of comments that I removed ---------------- 
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            scram-sha-256
# IPv6 local connections:
host    all             all             ::1/128                 scram-sha-256
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            scram-sha-256
host    replication     all             ::1/128                 scram-sha-256

Command used to start container is:

docker run -d --expose=80 --name testtesttesttesttest123_0_c1a28533
-e WEBSITE_CORS_ALLOWED_ORIGINS=*
-e WEBSITE_CORS_SUPPORT_CREDENTIALS=False
-e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false
-e WEBSITE_SITE_NAME=testtesttesttesttest123
-e WEBSITE_AUTH_ENABLED=False
-e PORT=80
-e WEBSITE_ROLE_INSTANCE_ID=0
-e WEBSITE_HOSTNAME=testtesttesttesttest123.azurewebsites.net
-e WEBSITE_INSTANCE_ID=638f1feff8fe9b984cca776eed83865f7c3054d0fc925571092e4af3e0e4a49f
-e WEBSITE_USE_DIAGNOSTIC_SERVER=False
onlyoffice/documentserver:7.3

A lot of system azure environment variables but nothing special. I am fairly certain that it passed more environmental variables than that, for instance it passed database credentials to container but for some reason azure does not show custom environmental variables in logs. (or custom environmental variables are passed in some different way).

Operation system version is hard to say as I am using azure services that do not provide this information, however on virtual machine (that was also hosted on azure) I had ubuntu 20.04 and error was same.

Hello @raltvein

I’d like to be involved too.
Thanks for the info. We will check it and once any news come up, I’ll let you know.