QGIS-ResourceSharing icon indicating copy to clipboard operation
QGIS-ResourceSharing copied to clipboard

urlopen error : proxy issue?

Open Fabien98 opened this issue 7 years ago • 11 comments

Hello,

I'm wondering if anybody is experiencing connection issue with this plugin when behind a proxy? As for me, (I'm behind a proxy) , I can't download any collections and I systematically encounter:

Error : <urlopen error [Errno 10060] ..Failed attempt.. etc..

I precise that I can normally browse to Github with a regular browser through my proxy.

Fabien98 avatar Mar 15 '17 08:03 Fabien98

Hi,

I think someone also email-ed me about this issue. I am building QGIS 2.18 now and will try it soon.

Cheers

On Wed, Mar 15, 2017 at 9:34 AM, Fabien98 [email protected] wrote:

Hello,

I'm wondering if anybody is experiencing connection issue with this plugin when behind a proxy? As for me, (I'm behind a proxy) , I can't download any collections and I systematically encounter:

Error : <urlopen error [Errno 10060] ..Failed attempt.. etc..

I precise that I can normally browse to Github with a regular browser through my proxy.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/akbargumbira/qgis_resources_sharing/issues/40, or mute the thread https://github.com/notifications/unsubscribe-auth/AA8lB1Q24WcwO9xNgz4hiVIW4Rfb6WObks5rl6KvgaJpZM4Mdoac .

--

------------------- *Akbar Gumbira * www.akbargumbira.com http://www.akbargumbira.com

akbargumbira avatar Mar 17 '17 11:03 akbargumbira

Hi,

I can confirm this issue. For me the error is "Error: <urlopen error Tunnel connection failed: 407 Proxy Authentication Required>"

Why? The plugin try to fetch resource directly without using proxy setting of QGis.

Regards.

lbartoletti avatar Nov 13 '17 09:11 lbartoletti

Hi, Yes, the problem is that using git protocol, I need to inject the proxy to the connection. The work is still unfinished here https://github.com/akbargumbira/qgis_resources_sharing/tree/bug_fix_dulwich

akbargumbira avatar Nov 13 '17 10:11 akbargumbira

@Fabien98, @lbartoletti, in PR #85 I have upgraded dulwich to 0.19.15 (my impression is that dulwich is supposed to respect client proxy settings - https://www.dulwich.io/docs/). It would be nice if you could check if that helps.

The PR has has been merged into master, so to test the dulwich upgrade:

  1. download: https://github.com/QGIS-Contribution/QGIS-ResourceSharing/archive/master.zip
  2. unzip in your plugin directory
  3. remove the directory that contains your current Resource Sharing plugin
  4. (re)start QGIS
  5. enable the plugin in the plugin manager
  6. run

havatv avatar Mar 03 '20 16:03 havatv

@Fabien98, @lbartoletti, version 0.12.0 of the Resource Sharing plugin is now on plugins.qgis.org, and can be installed from QGIS. It includes a number of fixes that can be relevant to this issue. Could you test with that version and report back?

havatv avatar Mar 29 '20 00:03 havatv

@borysiasty, you seem to have some experience with network access (the plugin manager) in QGIS. What (if anything) do we need to do to support users that are behind proxies, so that they can benefit from Resource Sharing through this plugin?

havatv avatar Apr 27 '20 14:04 havatv

Hello, I've juste tested the last 0.14.1 version with QGIS 3.4.5.

It's OK to see description of different collections in the QGIS Resource Sharing plugin window, but it's still not possible for me to install them

Here's the last line debug log console information: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /qgis/QGIS-Resources.git/info/refs?service=git-upload-pack (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10060] Une tentative de connexion a échoué car le parti connecté n’a pas répondu convenablement au-delà d’une certaine durée ou une connexion établie a échoué car l’hôte de connexion n’a pas répondu'))

Fabien98 avatar Apr 29 '20 13:04 Fabien98

Thanks a lot for testing, @Fabien98. I think that the list of repositories is downloaded using the QGIS network manager. It is good to see that it seems work behind a proxy. The collections are downloaded using "dulwich" - a Python library for working with git repositories. So the problem seems to be with dulwich. I have not been able to find out what to do to make dulwich use proxy settings.

https://github.com/dulwich/dulwich/issues/545 indicates that it should be possible to get dulwich / porcelain to use proxy settings. @Fabien98, do you have these settings in place?

From what I can see from the dulwich documentation and code, it seem to be assumed that you are in a setting where you can use git from the command line on your computer to clone and pull repositories. @Fabien98, if you do not already have git installed, could you install it, clone the github.com/qgis/QGIS-Resources.git repository and test if you can get git to work (pull)? Unfortunately, I am not able to test myself, since I am not behind a proxy, and have not experienced this type of problem.

havatv avatar Apr 29 '20 13:04 havatv

@havatv I'm afraid I don't have any direct experience with the proxy stuff :(

borysiasty avatar May 05 '20 19:05 borysiasty

@havatv I'm afraid I don't have any direct experience with the proxy stuff :(

Anyone else we/you could ask, @borysiasty?

havatv avatar May 05 '20 20:05 havatv

Three ideas:

  1. @elpaso or e.g. @nyalldawson who knows everything (now they'll kill me :) )
  2. ask on qgis-developer list
  3. ask git blame who was involved in QgsNetwork.* classes

borysiasty avatar May 06 '20 11:05 borysiasty