DocumentServer icon indicating copy to clipboard operation
DocumentServer copied to clipboard

404 Debian via nextcloud

Open slehernaf opened this issue 6 months ago • 2 comments

Operating System of DocumentServer

Linux (DEB package)

Version information

8.3.3.18

Expected Behavior

Opening a file for editing via nextcloud

Actual Behavior

I get an error Cannot GET /8.3.3-ea54791d355555e1dacb7ea280b54900/web-apps/apps/spreadsheeteditor/main/index_loader.html

Image

Image

Additional information

cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

cat /etc/onlyoffice/documentserver/nginx/ds.conf

upstream docservice {
  server 127.0.0.1:8000;
}

map $http_host $this_host {
        "" $host;
        default $http_host;
}

map $http_x_forwarded_proto $the_scheme {
         default $http_x_forwarded_proto;
         "" $scheme;
}

map $http_x_forwarded_host $the_host {
        default $http_x_forwarded_host;
        "" $this_host;
}

map $http_upgrade $proxy_connection {
  default upgrade;
  "" close;
}

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

server {
  listen 0.0.0.0:181;
  listen [::]:181 default_server;
  server_name _;
  server_tokens off;

  return 301 https://$server_name:182$request_uri;
}

server {
  listen 0.0.0.0:182 ssl;
  listen [::]:182 ssl default_server;
  server_tokens off;
  root /var/www/onlyoffice/documentserver;

  ssl_certificate /etc/ssl/certs/nextcloud.crt;
  ssl_certificate_key /etc/ssl/private/nextcloud.key;
  ssl_verify_client off;

  add_header X-Content-Type-Options nosniff;

  location / {
        proxy_pass http://docservice;
        proxy_http_version 1.1;
  }
}

ls /var/www/onlyoffice/documentserver/web-apps/apps/spreadsheeteditor/main/

app.js  code.js  ie  index.html  index_internal.html  index_loader.html  locale  resources

Image

slehernaf avatar Jun 18 '25 02:06 slehernaf

Hello @slehernaf, you should use port 80 instead of 8000 in upstream docservice.

igwyd avatar Jun 19 '25 12:06 igwyd

I have another service running on port 80 and it is not possible to change it. Also, previously everything worked on this port.

Hello @slehernaf, you should use port 80 instead of 8000 in upstream docservice.

slehernaf avatar Jun 19 '25 14:06 slehernaf

Port 8000 is the document service port, and earlier it really could be used in integrations, but it was not correct, you should always use the nginx port included with the document server. if port 80 is busy, you can change it before installation using debconf system or after instalation in the nginx config /etc/nginx/conf.d/ds.conf.

igwyd avatar Jun 20 '25 06:06 igwyd

Duplicate of #2933

igwyd avatar Jun 20 '25 06:06 igwyd

Port 8000 is the document service port, and earlier it really could be used in integrations, but it was not correct, you should always use the nginx port included with the document server. if port 80 is busy, you can change it before installation using debconf system or after instalation in the nginx config /etc/nginx/conf.d/ds.conf.

I have updated my doc service to the version 9.0.2 in /etc/onlyoffice/documentserver/default.json .services.Co Authoring.server.port from 8000 to 8080, the error remained, then I changed the port to 179, doing the same in /etc/onlyoffice/documentserver/nginx/ds.conf block of

upstream docservice {
  server 127.0.0.1:179;
}

below is the output /var/log/onlyoffice/documentserver/docservice/out.log

[2025-07-04T23:29:15.539] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-07-04T23:29:15.589] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-07-04T23:29:15.593] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-07-04T23:29:15.881] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8080 in production-linux mode. Version: 9.0.2. Build: 9
[2025-07-04T23:31:38.044] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-07-04T23:31:38.126] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-07-04T23:31:38.131] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-07-04T23:31:38.502] [ERROR] [localhost] [docId] [userId] nodeJS - uncaughtException:Error: listen EACCES: permission denied 0.0.0.0:179
    at Server.setupListenHandle [as _listen2] (node:net:1886:21)
    at listenInCluster (node:net:1965:12)
    at Server.listen (node:net:2067:7)
    at /snapshot/server/DocService/sources/server.js
    at /snapshot/server/DocService/sources/DocsCoServer.js
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

slehernaf avatar Jul 04 '25 20:07 slehernaf