ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.88k stars 1.09k forks source link

Timeout on healthcheck, docserver only on ip6? #2050

Open MikeDacre opened 1 year ago

MikeDacre commented 1 year ago

This issue is unique.

Operating System of DocumentServer

Linux (DEB package)

Version information

7.2.2-56

Expected Behavior

Just upgraded to ee from regular community docserver. Should work as before, although was broken before (see issue #2049).

Actual Behavior

On install, supervisorctl states that everything is running, but I get timeouts when connecting to the healthcheck oo.mdd.li/healthcheck.

Looking in nginx log:

2022/12/21 19:21:50 [error] 12417#12417: *55 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 198.54.134.139, server: oo.mdd.li, request: "GET /healthcheck/ HTTP/2.0", upstream: "http://localhost:8000/healthcheck/", host: "oo.mdd.li"

When I check with netstat, there is nothing listenting on port 8000 tcp, only IP6: tcp6 0 0 :::8000 :::* LISTEN 2289/docservice

I tried changing the nginx proxy pass to [::]:8000, but same error.

/var/log/onlyoffice/documentserver/nginx.error.log & /var/log/onlyoffice/documentserver/docservice/err.log empty.

/var/log/onlyoffice/documentserver/docservice/out.log:

[2022-12-21T19:24:44.379] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2022-12-21T19:24:44.384] [WARN] [localhost] [docId] [userId] 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
[2022-12-21T19:24:44.395] [ERROR] [localhost] [docId] [userId] nodeJS - redisClient error ReplyError: Ready check failed: NOAUTH Authentication required.
[2022-12-21T19:24:44.396] [ERROR] [localhost] [docId] [userId] nodeJS - redisClient error ReplyError: Ready check failed: NOAUTH Authentication required.
[2022-12-21T19:24:44.466] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.2.2. Build: 56

Reproduction Steps

  1. Install onlyoffice-ee
  2. Start everything

Additional information

Server: Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-135-generic x86_64) Package: onlyoffice-documentserver-ee/squeeze,now 7.2.2-56 amd64

License file installed. default.json attached, local.json:

{
  "services": {
    "CoAuthoring": {
      "sql": {
        "type": "postgres",
        "dbHost": "<ip>",
        "dbPort": "5432",
        "dbName": "onlyoffice",
        "dbUser": "onlyoffice",
        "dbPass": "<pass>"
      },
      "token": {
        "enable": {
          "request": {
            "inbox": true,
            "outbox": true
          },
          "browser": true
        },
        "inbox": {
          "header": "Authorization"
        },
        "outbox": {
          "header": "Authorization"
        }
      },
      "secret": {
        "inbox": {
          "string": "-"
        },
        "outbox": {
          "string": "-"
        },
        "session": {
          "string": "-"
        }
      },
      "redis": {
        "host": "localhost"
      }
    }
  },
  "rabbitmq": {
    "url": "amqp://guest:guest@localhost"
  }
}

nginx site config:

  if ($host = oo.mdd.li) {
        return 301 https://$host$request_uri;
  } # managed by Certbot

  location = /.well-known/caldav {
    return 301 $scheme://$host/remote.php/dav;
  }

  # Cloudflare
  include /etc/nginx/global/cloudflare-ip.conf;

  listen <ip>:80;
  listen <ip>:80;
  server_name oo.mdd.li;
  server_tokens off;

  return 404;

  # Log files
  access_log  /var/log/nginx/oo.mdd.li.log;
  error_log   /var/log/nginx/oo.mdd.li.err.log;
}

server {
  listen 127.0.0.1:8082;
  server_tokens off;

  # Log files
  access_log  /var/log/nginx/oo-local.mdd.li.log;
  error_log   /var/log/nginx/oo-local.mdd.li.err.log;

  include /etc/nginx/includes/ds-*.conf;
}

server {

  listen <ip>:443 ssl http2;
  listen [<ip>]:443 ssl http2;
  server_name oo.mdd.li;
  server_tokens off;

  # Cloudflare
  include /etc/nginx/global/cloudflare-ip.conf;

  # log files

  # Security Headers                                                                                                                                                                                    
  add_header Strict-Transport-Security "max-age=31536000; preload;";
  add_header X-Content-Type-Options nosniff;
  add_header X-XSS-Protection "1; mode=block";
  add_header X-Robots-Tag none;
  add_header X-Download-Options noopen;
  add_header X-Permitted-Cross-Domain-Policies none;

  # HSTS (ngx_http_headers_module is required) (63072000 seconds)
  add_header Strict-Transport-Security "max-age=63072000" always;

  # OCSP stapling
  ssl_stapling on;
  ssl_stapling_verify on;

  # verify chain of trust of OCSP response using Root CA and Intermediate certs
  ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;

  resolver 8.8.4.4 8.8.8.8;

  location = /robots.txt {
    log_not_found off;
    access_log off;
  }

  include /etc/nginx/includes/ds-*.conf;
}

Going to try uninstalling, deleting all config files, and reinstalling from scratch with the same nginx config.

Rita-Bubnova commented 1 year ago

@MikeDacre Sorry for the long wait. DesktopEditors v7.4.1 is released. Is this issue relevant?

iwkse commented 1 year ago

I have the same issue, node express listening only on ipv6 but I don't think that's the problem. I've forced it changing the server.listen in DocService/sources/server.js to listen on ipv4 but still healthcheck doesn't work. I'm doing that on a 5.3.4 version.

MikeDacre commented 1 year ago

@Rita-Bubnova This is related to #2146, which I posted a few months later after trying again. I haven't been able to get OnlyOffice to work on my server since an update failure around October 2022. I will try again with the new versions and see if there are ongoing issues.

iwkse commented 1 year ago

@Rita-Bubnova to me instead it was something else but I didn't test if the solution suggested by reading logs could fix it. That's because we decided to switch to newer version of OnlyOffice. In my logs it was saying the node used to compile libraries was of a different build of the one I have and suggested to re-run npm install on such folders. What I suggest is to look at all logs in /var/log/documentserver, not just the docserver log.