Switched domains, Onlyoffice won't connect

Nextcloud version: Nextcloud 20.0.7
Operating system and version: Ubuntu 20.04 LXC
Apache or nginx version: nextcloud nginx/1.19.5, onlyoffice nginx/1.18.0 (Ubuntu)
PHP version (eg, 7.4): nextcloudPHP 7.4.13, onlyoffice PHP 7.4.3

The issue you are facing:

Timeout when saving the new domain to the onlyoffice integration.
“Error onlyoffice GuzzleHttp\Exception\ConnectException: cURL error 28: Connection timed out after 60001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)”

Switched from a .tech TLD to a .nl TLD. Up until I clicked “save” in the Onlyoffice app within Nextcloud, the integration worked fine.
Curl works from both sides from within the LXCs (nextcloud < reverse proxy > onlyoffice) without issues, I can reach both from my PC as well.
The only thing changed is another domain name.
Reverting to the .tech domain name ends in the same error now that .tech redirects to .nl.
Both domains are at cloudflare, same configuration.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Click on save
  2. Timeout occurs
  3. New log entry, no connection

The output of your Nextcloud log in Admin > Logging:

{"reqId":"hyWA6MjwUoSOD7xHDJcL","level":3,"time":"2021-02-10T20:18:26+00:00","remoteAddr":"10.69.10.10","user":"xander","app":"onlyoffice","method":"PUT","url":"/apps/onlyoffice/ajax/settings/address","message":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 28: Connection timed out after 60001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":155,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":105,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":43,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php","line":28,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php","line":51,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":37,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":29,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":70,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":59,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":361,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":163,"function":"transfer","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":183,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/lib/private/Http/Client/Client.php","line":233,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/apps/onlyoffice/lib/documentservice.php","line":364,"function":"get","class":"OC\\Http\\Client\\Client","type":"->"},{"file":"/var/www/nextcloud/apps/onlyoffice/lib/documentservice.php","line":253,"function":"Request","class":"OCA\\Onlyoffice\\DocumentService","type":"->"},{"file":"/var/www/nextcloud/apps/onlyoffice/lib/documentservice.php","line":396,"function":"HealthcheckRequest","class":"OCA\\Onlyoffice\\DocumentService","type":"->"},{"file":"/var/www/nextcloud/apps/onlyoffice/controller/settingscontroller.php","line":168,"function":"checkDocServiceUrl","class":"OCA\\Onlyoffice\\DocumentService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"SaveAddress","class":"OCA\\Onlyoffice\\Controller\\SettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":200,"CustomMessage":"HealthcheckRequest on check error"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0","version":"20.0.7.1","id":"60244287a5d86"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => 'cloud.olddomain.tech',
    1 => '10.69.30.10',
    2 => 'oldsub.olddomain.tech',
    3 => 'cloud.newdomain.nl',
  ),
  'trusted_proxies' =>
  array (
    0 => '10.69.30.7',
    1 => 'nginx1',
    2 => 'nginx1.olddomain.tech',
  ),
  'datadirectory' => '/mnt/localncdata/nc',
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 45',
  'overwrite.cli.url' => 'https://cloud.newdomain.nl/',
  'htaccess.RewriteBase' => '/',
  'dbtype' => 'mysql',
  'version' => '20.0.7.1',
  'dbname' => 'nextcloud',
  'dbhost' => '10.69.20.12',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'fsdfs',
  'installed' => true,
  'maintenance' => false,
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\TXT',
    1 => 'OC\\Preview\\MarkDown',
    2 => 'OC\\Preview\\OpenDocument',
    3 => 'OC\\Preview\\PDF',
    4 => 'OC\\Preview\\MSOffice2003',
    5 => 'OC\\Preview\\MSOfficeDoc',
    6 => 'OC\\Preview\\StarOffice',
    7 => 'OC\\Preview\\Image',
    8 => 'OC\\Preview\\Photoshop',
    9 => 'OC\\Preview\\TIFF',
    10 => 'OC\\Preview\\SVG',
    11 => 'OC\\Preview\\Font',
    12 => 'OC\\Preview\\MP3',
    13 => 'OC\\Preview\\Movie',
    14 => 'OC\\Preview\\MKV',
    15 => 'OC\\Preview\\MP4',
    16 => 'OC\\Preview\\AVI',
    17 => 'OC\\Preview\\MSOffice2007',
    18 => 'OC\\Preview\\Illustrator',
    19 => 'OC\\Preview\\Postscript',
  ),
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
  ),
  'loglevel' => 2,
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'filesystem_check_changes' => 1,
  'updater.release.channel' => 'stable',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'onlyoffice' =>
  array (
    'verify_peer_off' => true,
  ),
  'theme' => '',
  'has_rebuilt_cache' => true,
  'debug' => false,
  'mail_sendmailmode' => 'smtp',
  'app_install_overwrite' =>
  array (
    0 => 'dropit',
    1 => 'files_downloadactivity',
    2 => 'drawio',
    3 => 'files_retention',
  ),
  'updater.secret' => 'fdsfgraw',
);

The output of your Apache/nginx/system log in /var/log/____:

2021/02/10 18:22:02 [error] 26612#26612: *436628 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 18:22:14 [error] 26612#26612: *436632 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 18:22:48 [error] 26612#26612: *436646 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 18:23:37 [error] 26612#26612: *436798 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 18:23:45 [error] 26612#26612: *436816 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 18:23:57 [error] 26612#26612: *436822 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 18:24:03 [error] 26612#26612: *436848 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 19:15:50 [error] 26612#26612: *438693 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 19:16:26 [error] 26612#26612: *438707 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 20:19:02 [error] 26612#26612: *441779 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 20:26:40 [error] 147#147: *77 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 20:29:06 [error] 147#147: *204 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 20:31:04 [error] 147#147: *232 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 20:36:25 [error] 147#147: *783 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 20:41:46 [error] 147#147: *958 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 20:54:04 [error] 147#147: *1867 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"
2021/02/10 21:18:26 [error] 147#147: *2613 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.69.30.7, server: _, request: "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock", host: "cloud.newdomain.nl", referrer: "https://cloud.newdomain.nl/settings/admin/onlyoffice"