Nuxeo Drive 4.x client tries to switch to https access which is not available

My nuxeo server is behind a reverse proxy and is accessed by http. When configuring the client to connect with http it works perfectly and uses http url.

But after restart the nuxeo drive client switches automatically to https: 2019-10-23 14:59:25 21200 5124 INFO nxdrive.engine.engine Updated server url to

The proxy server returns HTTP 404 code, the https access doesn't exists. Here is the client log message: 2019-10-23 14:59:33 21200 17720 INFO nxdrive.manager Status code for = 404

But the client keeps calling with https ang getting error: 2019-10-23 15:00:02 21200 18156 DEBUG nuxeo.client Calling '' 2019-10-23 15:00:03 21200 18156 WARNING nxdrive.engine.watcher.remote_watcher Network error:

It seems that the client misinterpretes the test call on https support, which in this case is not an ssl error, and switches to https instead of keeping http.

Also it's quite surprising and misleading to have a behavior change on the first client connection and after its' restart.

Could you have a look on this please?

Versions: Server - 10.10 HF11 Nuxeo Drive client 4.2.0

0 votes

1 answers



more logs when first connecting the account:

2019-10-23 14:58:10 19140 11724 DEBUG nxdrive.utils Testing URL '' 2019-10-23 14:58:11 19140 11724 DEBUG nxdrive.utils Testing URL '' 2019-10-23 14:58:12 19140 11724 DEBUG nxdrive.utils Testing URL '' 2019-10-23 14:58:14 19140 11724 DEBUG nxdrive.utils Testing URL '' 2019-10-23 14:58:15 19140 11724 DEBUG nxdrive.utils Testing URL '' 2019-10-23 14:58:16 19140 11724 DEBUG nxdrive.utils Testing URL '' 2019-10-23 14:58:17 19140 11724 DEBUG nxdrive.utils Testing URL '' 2019-10-23 14:58:18 19140 11724 DEBUG nxdrive.utils Testing URL '' 2019-10-23 14:58:19 19140 11724 DEBUG nxdrive.utils Found URL: 2019-10-23 14:58:19 19140 11724 INFO nxdrive.manager Proxy configuration for startup page connection: NoProxy<> 2019-10-23 14:58:19 19140 11724 INFO nxdrive.manager Status code for = 401 2019-10-23 14:58:19 19140 11724 INFO nxdrive.gui.api Web authentication is available on server


The code that checks for SSL support is catching all errors, not just SSL ones. In your case, why the reverse proxy handles HTTPS (or seem to handle)? I think the proxy translates HTTPS traffic to HTTP and thus request errors, right?

FI the SSL check has been added with

0 votes

the proxy try to anwer gently that the tunnel is not available for https. Nuxeo drive switch aggressively on https only with the fact that a https connection is succesfull no matter the content returned.

This patch is failing in many points : 1/ different behaviour just after adding the http only account (test https but stay in http because may be https answering 404) , and when nxdrive is restarted (nxdrive.engine.engine Updated server url to https) 2/ fail to differentiate a proxy message error with the nuxeo instance 3/ no way to manually deactivate this behaviour, once the url is changed to https, we cant change it. 4/ try to detect https support with a list of url instead of just detecting the redirect of a http call to https with the http redirect code 5/ goes against user in changing their settings

actually, i had to block 443 tcp to the proxy from the nuxeo drive host to prevent switching to https !


this code doesnt not handle the content returned (or the 4xx code) and fail when http://url is a nuxeo instance but https://url is not

this code only keep http if tcp connexion fail, or if the server return 5xx code, not 4xx


        url = self.server_url.replace(&quot;http://&quot;, &quot;https://&quot;)
        proxies = self.manager.proxy.settings(url=url)
        import requests

        requests.get(url, proxies=proxies)
        self.server_url = url
        self._dao.update_config(&quot;server_url&quot;, self.server_url);Updated server url to {self.server_url}&quot;)
    except Exception:
            f&quot;Server at {self.server_url} doesn&apos;t seem to handle HTTPS, keeping HTTP&quot;,

the only way to address the redirect case is to stay on http and check a redirect code, not brute forcing on https


You are right, the check is not ideal. I will create a bugfix ticket and it will be fixed in 4.2.1. Thanks for the report :)

great support !

Hi Mickaël Schoentgen, has this modification been made?

Not yet, but you can follow It is not yet planned as we have other hot topics to tackle first. I will raise the priority thought.

Ok, thanks