Skip to content

Cannot use Collabora and Nextcloud docker image behind https reversproxy #782

Description

@kiwy42

I have both install with docker-compose both nextcloud:latest (16.0.01) and collabora:latest.
both are behind reverse-proxy nginx-proxy docker image with let's encrypt companion.
I can reach https://collab.domain.com (ok page) , I can reach https://nextcloud.domain.com with with sign certificate without issue.
However when trying to set up Collabora in Nextcloud if I try to set the url with HTTPS I get and error:
Saved with error: Collabora Online should use the same protocol as the server installation.
If I try to use it I can't open any document and I have error in logs showing that Nextcloud tries to reach collab.domain.com in HTTP.

[richdocuments] Error: GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to collab.domain.com port 80: No route to host (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) at <<closure>>

 0. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 149
    GuzzleHttp\Handler\CurlFactory::createRejection(GuzzleHttp\Handl ... l}, {errno: 7,error: ... "})
 1. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 102
    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 43
    GuzzleHttp\Handler\CurlFactory::finish(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
 3. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 28
    GuzzleHttp\Handler\CurlHandler->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 4. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 51
    GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensitive parameters replaced ***")
 5. /var/www/html/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php line 37
    GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensitive parameters replaced ***")
 6. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 30
    GuzzleHttp\PrepareBodyMiddleware->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 7. /var/www/html/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php line 70
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 8. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 60
    GuzzleHttp\RedirectMiddleware->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 9. /var/www/html/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php line 67
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
10. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 277
    GuzzleHttp\HandlerStack->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
11. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 125
    GuzzleHttp\Client->transfer("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
12. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 131
    GuzzleHttp\Client->requestAsync("get", GuzzleHttp\Psr7\Uri {}, {verify: "/var/w ... }})
13. /var/www/html/lib/private/Http/Client/Client.php line 161
    GuzzleHttp\Client->request("get", "http://collab.domain.com ... y", {verify: "/var/w ... e})
14. /var/www/html/custom_apps/richdocuments/lib/WOPI/DiscoveryManager.php line 106
    OC\Http\Client\Client->get("http://collab.domain.com ... y", {timeout: 5})
15. /var/www/html/custom_apps/richdocuments/lib/WOPI/DiscoveryManager.php line 78
    OCA\Richdocuments\WOPI\DiscoveryManager->fetchFromRemote()
16. /var/www/html/custom_apps/richdocuments/lib/WOPI/Parser.php line 41
    OCA\Richdocuments\WOPI\DiscoveryManager->get()
17. /var/www/html/custom_apps/richdocuments/lib/TokenManager.php line 177
    OCA\Richdocuments\WOPI\Parser->getUrlSrc("application/vnd ... t")
18. /var/www/html/custom_apps/richdocuments/lib/Controller/DocumentController.php line 176
    OCA\Richdocuments\TokenManager->getToken("*** sensitive parameters replaced ***")
19. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 166
    OCA\Richdocuments\Controller\DocumentController->index("*** sensitive parameter replaced ***")
20. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Richdocument ... {}, "index")
21. /var/www/html/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Richdocument ... {}, "index")
22. /var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Richdocume ... r", "index", OC\AppFramework\ ... {}, {_route: "richdocuments.document.index"})
23. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "richdocuments.document.index"})
24. /var/www/html/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {_route: "richdocuments.document.index"})
25. /var/www/html/lib/base.php line 975
    OC\Route\Router->match("/apps/richdocuments/index")
26. /var/www/html/index.php line 42
    OC::handleRequest()

GET /apps/richdocuments/index?fileId=23252& requesttoken=S31C%2BgL8Q4cV5eAuP5Y6iXGGXKbfOTCBh1oqYDzZ%2FS8%3D%3APyQ4jDfOArJWg65Gau5D4xvuM5WcYwLF1TBkMW63yEo%3D
from 90.65.44.96 by admin at 2019-06-23T16:48:51+00:00

When trying to save http://collab.domain.com in Nextcloud setting there's no error but I still can't reach Collabora as my instance is exposed in HTTPS.
As I understand Nextcloud docker only work in HTTP mode and tries to use the same protocol to reach Collabora. However Collabora is in my case selfhosted and I could manage a workaround with some localname and redirection (I'd rather not) but for people with hosted Collabora how can they reach there provider in HTTPS with a docker image of Nextcloud.

I wasn't sure if it was a problem for Nextcloud or Docker Nextcloud but I feel like it's mostly a Docker Nextcloud as it's impossible to start it in HTTPS self-sign.
I hope I gave you enought information, I'm not the only one having the issue i found a lot of similar thread on nexctloud forum

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions