Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to Sentinel hub with a proxy #38

Open
cnette opened this issue Nov 14, 2023 · 6 comments
Open

Connecting to Sentinel hub with a proxy #38

cnette opened this issue Nov 14, 2023 · 6 comments

Comments

@cnette
Copy link

cnette commented Nov 14, 2023

I can not connect the plugin to the service due to a proxy. I try "default" proxy and "httpproxy" as settings.
image

It could be due to urllib to ping the website and could be resolve by QgsNetworkAcessManager like in the documentation to publish plugins :
Plugins should make use of QgsNetworkAccessManager instead of using urllib2/requests/etc... which often fail to use correct proxy settings.

2023-11-14T09:44:15 WARNING Traceback (most recent call last):
File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\site-packages\urllib3\connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\site-packages\urllib3\util\connection.py", line 84, in create_connection
raise err
File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\site-packages\urllib3\util\connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée

         During handling of the above exception, another exception occurred:
         
         Traceback (most recent call last):
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connectionpool.py", line 670, in urlopen
          httplib_response = self._make_request(
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connectionpool.py", line 381, in _make_request
          self._validate_conn(conn)
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connectionpool.py", line 978, in _validate_conn
          conn.connect()
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connection.py", line 309, in connect
          conn = self._new_conn()
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connection.py", line 171, in _new_conn
          raise NewConnectionError(
         urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [WinError 10061] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée
         
         During handling of the above exception, another exception occurred:
         
         Traceback (most recent call last):
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\requests\adapters.py", line 439, in send
          resp = conn.urlopen(
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connectionpool.py", line 726, in urlopen
          retries = retries.increment(
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\util\retry.py", line 446, in increment
          raise MaxRetryError(_pool, url, error or ResponseError(cause))
         urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='identity.dataspace.copernicus.eu', port=443): Max retries exceeded with url: /auth/realms/CDSE/protocol/openid-connect/token (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée'))
@Adrok24
Copy link
Contributor

Adrok24 commented Dec 6, 2023

Hi, could you send a capture of the settings you are using? Could you tell which kind of proxy you are using?

@cnette
Copy link
Author

cnette commented Dec 6, 2023

Hi,
This is default config and I try also this configuration HTTP or HTTPS
image

image

@Adrok24
Copy link
Contributor

Adrok24 commented Dec 6, 2023

The proxy settings are saved and taken from a qsettings file. This file is a .config or .ini that can be found in a hidden folder in windows for example C:\Users<YourUsername>\AppData\Roaming\QGIS\QGIS3\profiles\default\QGIS\QGIS3.ini. Could you search for 'proxy' in this file and tell me if your configurations are stored there?

@cnette
Copy link
Author

cnette commented Dec 7, 2023 via email

@Adrok24
Copy link
Contributor

Adrok24 commented Dec 7, 2023

Hi, thank you for reporting this. We are trying to replicate this issue to find a solution. Once we find a fix for this we are going to reach you back.

@cnette
Copy link
Author

cnette commented Jan 3, 2024

Hello,
I'd like to ask you again about this.
Have you found a solution to my plugin problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants