Document server converter trying to connect to old Nextcloud domain

I think this might be a bug but I’m not entirely sure. Also, first time on this forum, please redirect me if I’m inadvertently in the wrong place for this.

Document Server version: 7.4
Type of installation of the Document Server: Docker / k8s
OS: k8s nodes are ubuntu ( Ubuntu 18.04.5 LTS 5.4.0-150-generic docker://19.3.15), client side is multiple
Browser version: multiple

Connected to a Nextcloud server for which we were slowly changing domains. I set the new Nextcloud domain as the secondary trusted domain in the Nextcloud config, deleted the document server pod (which has no volumes so always starts from scratch apart from the token/secret), all seemed well and I was able to use the document server from this new Nextcloud domain so I made the old, trusted domain inactive. Everything still seemed fine but subsequently, every night the connection to the document server was lost (from the Nextcloud server’s perspective) and this resulted in the configuration that connects the nextcloud server to the OnlyOffice document server to become inactive. When I reactivated the config in the Nextcloud server, everything was fine but without fail, every morning the connection was lost and the configuration set inactive.

The document server showed the bellow error and I was puzzled to find the converter still trying to reach out to the original domain. Since the document server has no knowledge of this domain by its self, it must have gotten it from either looking at the first trusted domain in the Nextcloud server config or perhaps something like the overwrite domain in Nextcloud’s config.php. Now I’m wondering if this is a error or if this is by design?

When setting up a Nextcloud server I would often do so with multiple trusted domains for various reasons like backups in case the dns record expires or having a dedicated domain for a specific purpose. So now I am wondering that if in these cases, one of the domains fails, like in case of a expired dns record, would the document server start to display the same symptoms? In other words, is it simply not designed to be used like this?

==> /var/log/onlyoffice/documentserver/converter/out.log <==
[2023-10-04T22:44:17.639] [ERROR] [localhost] [conv_check_xxxxxxxxxxxxxxxxx_docx] [userId] nodeJS - error downloadFile:url=https://OLDNEXTCLOUDDOMAIN/index.php/apps/onlyoffice/empty?doc=xxxxxxxxxxxxxx.xxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxx;attempt=1;code:undefined;connect:undefined Error: Error response: statusCode:404; headers:{"server":"openresty/1.15.8.2","date":"Wed, 04 Oct 2023 22:44:17 GMT","content-type":"text/html","content-length":"159","connection":"keep-alive","strict-transport-security":"max-age=15724800; includeSubDomains"};
    at Request.fResponse (/snapshot/server/build/server/Common/sources/utils.js)
    at Request.emit (events.js:400:28)
    at Request.onRequestResponse (/snapshot/server/build/server/Common/node_modules/request/request.js:1059:10)
    at ClientRequest.emit (events.js:400:28)
    at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
    at TLSSocket.socketOnData (_http_client.js:515:22)
    at TLSSocket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9)
    at TLSSocket.Readable.push (internal/streams/readable.js:206:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
[2023-10-04T22:44:18.652] [ERROR] [localhost] [conv_check_xxxxxxxxxxxxxxxx_docx] [userId] nodeJS - error downloadFile:url=https://OLDNEXTCLOUDDOMAIN/index.php/apps/onlyoffice/empty?doc=xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxx;attempt=2;code:undefined;connect:undefined Error: Error response: statusCode:404; headers:{"server":"openresty/1.15.8.2","date":"Wed, 04 Oct 2023 22:44:18 GMT","content-type":"text/html","content-length":"159","connection":"keep-alive","strict-transport-security":"max-age=15724800; includeSubDomains"};
    at Request.fResponse (/snapshot/server/build/server/Common/sources/utils.js)
    at Request.emit (events.js:400:28)
    at Request.onRequestResponse (/snapshot/server/build/server/Common/node_modules/request/request.js:1059:10)
    at ClientRequest.emit (events.js:400:28)
    at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
    at TLSSocket.socketOnData (_http_client.js:515:22)
    at TLSSocket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9)
    at TLSSocket.Readable.push (internal/streams/readable.js:206:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
[2023-10-04T22:44:19.661] [ERROR] [localhost] [conv_check_xxxxxxxxxxxxxx_docx] [userId] nodeJS - error downloadFile:url=https://OLDNEXTCLOUDDOMAIN/index.php/apps/onlyoffice/empty?doc=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxx;attempt=3;code:undefined;connect:undefined Error: Error response: statusCode:404; headers:{"server":"openresty/1.15.8.2","date":"Wed, 04 Oct 2023 22:44:19 GMT","content-type":"text/html","content-length":"159","connection":"keep-alive","strict-transport-security":"max-age=15724800; includeSubDomains"};
    at Request.fResponse (/snapshot/server/build/server/Common/sources/utils.js)
    at Request.emit (events.js:400:28)
    at Request.onRequestResponse (/snapshot/server/build/server/Common/node_modules/request/request.js:1059:10)
    at ClientRequest.emit (events.js:400:28)
    at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
    at TLSSocket.socketOnData (_http_client.js:515:22)
    at TLSSocket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9)
    at TLSSocket.Readable.push (internal/streams/readable.js:206:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

Hello @julia

I set the new Nextcloud domain as the secondary trusted domain in the Nextcloud config

Do you mean config.php? What have you set on the connector page itself? Does it contain new address? If it’s possible, please go to the connector page and make a screenshot of your settings. Also let us know your version of connector app.

Hey,

Indeed I meant the config.php the connector app still has the same url for the document server. As that did not change.

Problem is that the document server was looking for the old Nextcloud domain which I disabled but it was still in the config.php. So I was wondering what the logic is here.

Could it be that some background process on the Nextcloud server is set up to instruct the document server converter to do some tasks using the top trusted domain in Nextcloud’s config.php?

Hello @julia
Could you please run a test? Please install test build of connector app, here’s a link for versions 25, 26, 27 of Nextcloud: https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/864#issuecomment-1750206472
When installation is completed, please add to your config.php file these lines:

'onlyoffice' => 
array (
    editors_check_interval => '0',
),

Please let us know the result. Will the situation change?

NB! We recommend preparing whole server backup before any server side actions.