sslnextcloudonlyoffice

Error integrating snap packages onlyoffice-ds and nextcloud when using https. GET https://*/welcome/healthcheck resulted in a 404 Not Found


I use snap packages onlyoffice-ds and nextcloud to create my local cloud. Currently nextcloud works with a self-signed certificate over https. I'm also trying to run the onlyoffice-ds package from Snap using the same certificates and getting a 404 error:

Error when trying to connect (Client error: `GET https://onlyoffice.local/welcome/healthcheck` resulted in a `404 Not Found` response:

From my computer I go to the site https://onlyoffice.local/welcome/ and I can also make a curl request to this domain and get an adequate response:

curl https://onlyoffice.local/welcome/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width">

    <!--
    *
    * (c) Copyright Ascensio System SIA 2023
    *

But when I try to connect via nextcloud I get a 404 error:

Error when trying to connect (Client error: `GET https://onlyoffice.local/welcome/healthcheck` resulted in a `404 Not Found` response:

404 Not Found

404 Not Found
nginx

I also tried to request this page from curl and found that the server actually gives a 404 error:

curl https://onlyoffice.local/welcome/healthcheck
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

Later I tried to use the docker image onlyoffice/documentserver:latest but encountered a similar problem.

I checked the nginx logs in the onlyoffice snap package (/var/snap/onlyoffice-ds/current/var/log/nginx/error.log). It doesn't find the healthcheck file:

2023/09/27 14:34:19 [error] 1089473#0: *205 open() "/snap/onlyoffice-ds/current/var/www/onlyoffice/documentserver/server/welcome/healthcheck" failed (2: No such
 file or directory), client: 10.1.0.10, server: , request: "GET /welcome/healthcheck HTTP/1.0", host: "onlyoffice.local"
2023/09/27 14:34:34 [error] 1089473#0: *206 "/snap/onlyoffice-ds/current/var/www/onlyoffice/documentserver/server/welcome/healthcheck/index.html" is not found (
2: No such file or directory), client: 10.1.0.10, server: , request: "GET /welcome/healthcheck/ HTTP/1.0", host: "onlyoffice.local"

After which I checked whether the file was in the assembly and it turned out that it was not in any folder. Now I have absolutely no idea what to do...


Solution

  • Try to check how you specify the address of the document server in Nextcloud -> Administration settings -> ONLYOFFICE. If you specify it as https://onlyoffice.local/welcome/ then you should change it to just https://onlyoffice.local/ and check if the issue persists. The healthcheck request should be performed through the domain of your document server directly, so if you add /welcome at the end of it, the problem may occur.