Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document server is using the wrong port when following official instructions #2888

Open
1 task done
bohwaz opened this issue Sep 13, 2024 · 1 comment
Open
1 task done
Assignees

Comments

@bohwaz
Copy link

bohwaz commented Sep 13, 2024

This issue is unique.

  • I have used the search tool and did not find an issue describing my bug.

Operating System of DocumentServer

Docker

Version information

latest (011630116202)

Expected Behavior

Starting docker container on a different port than 80, example should work.

Actual Behavior

Example editor does not work at all.

Reproduction Steps

  1. follow instructions from official doc: https://helpcenter.onlyoffice.com/installation/docs-community-install-docker.aspx?_ga=2.51711023.782359554.1594636128-1157782750.1587541027
  2. change port number, as instructed: docker run -i -t -d -p 8083:80 --restart=always -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver
  3. install example as instructed: docker exec XXXX sudo supervisorctl start ds:example
  4. open example editor and create new document, be faced with the UI loaded but an error message:

image

Additional information

The documentserver log file shows the issue: it is trying to make an internal request on port 8083 (public facing port), when it is internally using port 80:

Error 
[ERROR] [localhost] [172.17.0.1new.xlsx1726236365762] [uid-1] nodeJS - postData error: url = http://localhost:8083/example/track?filename=new.xlsx&useraddress=172.17.0.1;data = {"key":"172.17.0.1new.xlsx1726236365762","status":1,"users":["uid-1"],"actions":[{"type":1,"userid":"uid-1"}],"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiIxNzIuMTcuMC4xbmV3Lnhsc3gxNzI2MjM2MzY1NzYyIiwic3RhdHVzIjoxLCJ1c2VycyI6WyJ1aWQtMSJdLCJhY3Rpb25zIjpbeyJ0eXBlIjoxLCJ1c2VyaWQiOiJ1aWQtMSJ9XSwiaWF0IjoxNzI2MjM2MzY2LCJleHAiOjE3MjYyMzY2NjZ9.PLxes5qAaTcYZLSzPbMdBp7K63Pi3RcAMqnDNhJMSPs"} Error: connect ECONNREFUSED 127.0.0.1:8083
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

As seen in #1819 you can get around this by using the public network IP of the machine instead of localhost, but this is not a solution, just a workaround, and it won't work when you have a firewall in place. The document server should not do requests to the outside for its internal needs.

Also the documentation should not point to something that does not work.

@bohwaz
Copy link
Author

bohwaz commented Sep 13, 2024

Changing the port in nginx ds.conf makes it working correctly, so there is something missing in documentserver code to use the correct host in URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants