Nextcloud version: 24.0.6
Operating system and version: Debian 5.10
Apache or nginx version: Apache 2.4.54
PHP version: 8.0.25
The issue you are facing: I recently installed Nextcloud via the docker all-in-one method. I followed the guide for a reverse proxy setup found here. I used Caddy (not as a docker container), which was recommended. Everything is working for the most part, except for Nextcloud Office/Collabora.
Any time I try to open a document it times out and gives the following error: “Failed to load Nextcloud Office - Please try again later”. In the Nextcloud Office section in the Admin settings, it says that it can’t reach the Collabora container.
Strangely enough, if I stop the master container via docker, everything works fine. I can open files and the Collabora server is reachable. However as soon as I start the master container again, Collabora breaks. This happens every time.
Is this the first time you’ve seen this error: Y
Steps to replicate it:
- Install Nextcloud all in one via docker
- See that Nextcloud Office is not working?
The output of your Nextcloud log in Admin > Logging:
[richdocuments] Error: GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to [REDACTED DOMAIN] port 443 after 0 ms: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for [REDACTED DOMAIN]/hosting/discovery at <<closure>>
0. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 158
GuzzleHttp\Handler\CurlFactory::createRejection(GuzzleHttp\Handl ... l}, [7,"Failed to co ... "])
1. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 110
GuzzleHttp\Handler\CurlFactory::finishError(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
2. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php line 47
GuzzleHttp\Handler\CurlFactory::finish(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
3. /var/www/html/lib/private/Http/Client/DnsPinMiddleware.php line 113
GuzzleHttp\Handler\CurlHandler->__invoke("*** sensitive parameters replaced ***", "*** sensitive parameters replaced ***")
4. /var/www/html/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php line 35
OC\Http\Client\DnsPinMiddleware->OC\Http\Client\{closure}("*** sensitive parameters replaced ***")
5. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 31
GuzzleHttp\PrepareBodyMiddleware->__invoke("*** sensitive parameters replaced ***", "*** sensitive parameters replaced ***")
6. /var/www/html/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php line 71
GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
7. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 63
GuzzleHttp\RedirectMiddleware->__invoke("*** sensitive parameters replaced ***", "*** sensitive parameters replaced ***")
8. /var/www/html/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php line 75
GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
9. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 331
GuzzleHttp\HandlerStack->__invoke("*** sensitive parameters replaced ***", "*** sensitive parameters replaced ***")
10. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 168
GuzzleHttp\Client->transfer("*** sensitive parameters replaced ***", "*** sensitive parameters replaced ***")
11. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 187
GuzzleHttp\Client->requestAsync("get", GuzzleHttp\Psr7\Uri {}, ["/mnt/ncdata/fi ... "])
12. /var/www/html/lib/private/Http/Client/Client.php line 218
GuzzleHttp\Client->request("get", "[REDACTED PARTIAL URL]", ["/mnt/ncdata/fi ... e])
13. /var/www/html/custom_apps/richdocuments/lib/WOPI/DiscoveryManager.php line 84
OC\Http\Client\Client->get("[REDACTED PARTIAL URL]", [45,[true]])
14. /var/www/html/custom_apps/richdocuments/lib/WOPI/DiscoveryManager.php line 56
OCA\Richdocuments\WOPI\DiscoveryManager->fetchFromRemote()
15. /var/www/html/custom_apps/richdocuments/lib/WOPI/Parser.php line 41
OCA\Richdocuments\WOPI\DiscoveryManager->get()
16. /var/www/html/custom_apps/richdocuments/lib/TokenManager.php line 232
OCA\Richdocuments\WOPI\Parser->getUrlSrc("application/vnd ... t")
17. /var/www/html/custom_apps/richdocuments/lib/Controller/DocumentController.php line 174
OCA\Richdocuments\TokenManager->getToken("*** sensitive parameters replaced ***")
18. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 225
OCA\Richdocuments\Controller\DocumentController->index("*** sensitive parameters replaced ***", "/Documents/Welc ... x")
19. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 133
OC\AppFramework\Http\Dispatcher->executeController(OCA\Richdocument ... {}, "index")
20. /var/www/html/lib/private/AppFramework/App.php line 172
OC\AppFramework\Http\Dispatcher->dispatch(OCA\Richdocument ... {}, "index")
21. /var/www/html/lib/private/Route/Router.php line 298
OC\AppFramework\App::main("OCA\\Richdocume ... r", "index", OC\AppFramework\ ... {}, ["richdocuments.document.index"])
22. /var/www/html/lib/base.php line 1030
OC\Route\Router->match("/apps/richdocuments/index")
23. /var/www/html/index.php line 36
OC::handleRequest()
GET /apps/richdocuments/index?fileId=235&requesttoken=[REDACTED]&path=%2FDocuments%2FWelcome%20to%20Nextcloud%20Hub.docx
from [REDACTED IP] by [REDACTED NAME] at 2022-11-04T10:06:24+00:00
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'nextcloud-aio-redis',
'password' => '[REDACTED]',
'port' => 6379,
),
'overwritehost' => '[REDACTED]',
'overwriteprotocol' => 'https',
'default_phone_region' => 'nl',
'passwordsalt' => '[REDACTED]',
'secret' => '[REDACTED]',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '[REDACTED]',
),
'datadirectory' => '/mnt/ncdata',
'dbtype' => 'pgsql',
'version' => '24.0.6.1',
'overwrite.cli.url' => '[REDACTED]',
'dbname' => 'nextcloud_database',
'dbhost' => 'nextcloud-aio-database',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => '[REDACTED]',
'dbpassword' => '[REDACTED]',
'installed' => true,
'instanceid' => '[REDACTED]',
'loglevel' => '2',
'log_type' => 'file',
'logfile' => '/var/www/html/data/nextcloud.log',
'log_rotate_size' => '10485760',
'log.condition' =>
array (
'apps' =>
array (
0 => 'admin_audit',
),
),
'preview_max_x' => '2048',
'preview_max_y' => '2048',
'jpeg_quality' => '60',
'enabledPreviewProviders' =>
array (
1 => 'OC\\Preview\\Image',
2 => 'OC\\Preview\\MarkDown',
3 => 'OC\\Preview\\MP3',
4 => 'OC\\Preview\\TXT',
5 => 'OC\\Preview\\OpenDocument',
6 => 'OC\\Preview\\Movie',
),
'enable_previews' => true,
'upgrade.disable-web' => true,
'mail_smtpmode' => 'smtp',
'trashbin_retention_obligation' => 'auto, 30',
'versions_retention_obligation' => 'auto, 30',
'activity_expire_days' => '30',
'simpleSignUpLink.shown' => false,
'share_folder' => '/Shared',
'tempdirectory' => '/mnt/ncdata/tmp/',
'one-click-instance' => true,
'one-click-instance.user-limit' => 100,
'htaccess.RewriteBase' => '/',
'files_external_allow_create_new_local' => false,
'trusted_proxies' =>
array (
0 => '127.0.0.1',
1 => '::1',
),
'allow_local_remote_servers' => true,
'mail_sendmailmode' => 'smtp',
'mail_from_address' => '[REDACTED]',
'mail_domain' => '[REDACTED]',
'mail_smtphost' => '[REDACTED]',
'mail_smtpport' => '25',
'twofactor_enforced' => 'true',
'twofactor_enforced_groups' =>
array (
),
'twofactor_enforced_excluded_groups' =>
array (
),
'maintenance' => false,
'data-fingerprint' => '[REDACTED]',
'one-click-instance.link' => 'https://nextcloud.com/all-in-one/',
);
The output of your Apache log in /var/log/apache2/access.log
(inside the nextcloud-aio-apache container):
127.0.0.1 - - [04/Nov/2022:11:35:53 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1015 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:35:53 +0100] "GET /apps/files/ajax/getstoragestats?dir=%2FDocuments HTTP/1.1" 200 986 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:35:53 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:35:55 +0100] "POST /apps/text/session/close HTTP/1.1" 200 780 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:35:58 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:35:58 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:00 +0100] "PROPFIND /remote.php/dav/files/[REDACTED]/Documents/havelaar.docx HTTP/1.1" 207 1443 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:00 +0100] "GET /apps/richdocuments/index?fileId=1235&requesttoken=[REDACTED[&path=%2FDocuments%2Fhavelaar.docx HTTP/1.1" 200 7694 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:01 +0100] "GET /index.php/apps/photos/service-worker.js HTTP/1.1" 200 6437 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:02 +0100] "GET /index.php/apps/photos/service-worker.js HTTP/1.1" 200 6437 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:03 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:04 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:08 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:10 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:11 +0100] "HEAD / HTTP/1.1" 302 1413 "-" "curl/7.74.0"
127.0.0.1 - - [04/Nov/2022:11:36:13 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:16 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:18 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:22 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:24 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:28 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:29 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:34 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:34 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:39 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:40 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:41 +0100] "HEAD / HTTP/1.1" 302 1413 "-" "curl/7.74.0"
127.0.0.1 - - [04/Nov/2022:11:36:44 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:46 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
127.0.0.1 - - [04/Nov/2022:11:36:49 +0100] "POST /apps/text/session/sync HTTP/1.1" 200 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"