betagouv / SPPNautSPO

Generator and S3 interface for SPPNaut Startup
European Union Public License 1.2
0 stars 0 forks source link

Problème d'accès Cellar depuis le PC SHOM (Windows) #18

Open loicguillois opened 2 years ago

loicguillois commented 2 years ago
Sortie sans VPN ``` C:\Users\lguillois\Desktop\file_sync\file_sync>python corin_sync.py launch INFO:root:Corin synchronizer launched... after DEBUG:schedule:Running job Job(interval=1, unit=minutes, do=job, args=(), kwargs={}) INFO:root:Syncing Corin to local filesystem... coucou G4 INFO:root:Downloading ouvrage "G4" DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): agora.shom.fr:80 ERROR:root:Error while updating ouvrage "G4" C:\Users\lguillois\Desktop\file_sync\file_sync\corin_local\G4.xml G4.xml DEBUG:boto:path=/sppnaut-corin/G4.xml DEBUG:boto:auth_path=/sppnaut-corin/G4.xml DEBUG:boto:Method: PUT DEBUG:boto:Path: /sppnaut-corin/G4.xml DEBUG:boto:Data: DEBUG:boto:Headers: {'User-Agent': 'Boto/2.49.0 Python/3.7.6 Windows/10', 'Content-Type': 'text/xml', 'Content-MD5': 'Iqf0Vaf9NG6puEoK0SqVzQ==', 'Content-Length': '1062082', 'Expect': '100-Continue'} DEBUG:boto:Host: cellar-fr-north-hds-c1.services.clever-cloud.com:443 DEBUG:boto:Port: 443 DEBUG:boto:Params: {} DEBUG:boto:establishing HTTPS connection: host=cellar-fr-north-hds-c1.services.clever-cloud.com, kwargs={'timeout': 70, 'port': 443} DEBUG:boto:Token: None DEBUG:boto:StringToSign: PUT Iqf0Vaf9NG6puEoK0SqVzQ== text/xml Mon, 01 Aug 2022 09:16:58 GMT /sppnaut-corin/G4.xml DEBUG:boto:Signature: AWS C02LQ3V10SBVQXHW9U37:2nkpyMWwN6JoHclL2jamPrPV1xs= DEBUG:boto:Final headers: {'User-Agent': 'Boto/2.49.0 Python/3.7.6 Windows/10', 'Content-Type': 'text/xml', 'Content-MD5': 'Iqf0Vaf9NG6puEoK0SqVzQ==', 'Content-Length': '1062082', 'Expect': '100-Continue', 'Date': 'Mon, 01 Aug 2022 09:16:58 GMT', 'Authorization': 'AWS C02LQ3V10SBVQXHW9U37:2nkpyMWwN6JoHclL2jamPrPV1xs='} DEBUG:boto:Response headers: [('content-length', '0'), ('etag', '"22a7f455a7fd346ea9b84a0ad12a95cd"'), ('accept-ranges', 'bytes'), ('x-amz-request-id', 'tx0000000000000006a0d93-0062e79a0a-ed24dc-default'), ('date', 'Mon, 01 Aug 2022 09:16:58 GMT')] ERROR:root:Successfully updated ouvrage "C:\Users\lguillois\Desktop\file_sync\file_sync\corin_local\G4.xml" to Cellar g4p INFO:root:Downloading ouvrage "g4p" DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): agora.shom.fr:80 ERROR:root:Error while updating ouvrage "g4p" C:\Users\lguillois\Desktop\file_sync\file_sync\corin_local\g4p.xml g4p.xml DEBUG:boto:path=/sppnaut-corin/g4p.xml DEBUG:boto:auth_path=/sppnaut-corin/g4p.xml DEBUG:boto:Method: PUT DEBUG:boto:Path: /sppnaut-corin/g4p.xml DEBUG:boto:Data: DEBUG:boto:Headers: {'User-Agent': 'Boto/2.49.0 Python/3.7.6 Windows/10', 'Content-Type': 'text/xml', 'Content-MD5': 'DXd3d49NuMtU0/kFdctzvA==', 'Content-Length': '228', 'Expect': '100-Continue'} DEBUG:boto:Host: cellar-fr-north-hds-c1.services.clever-cloud.com:443 DEBUG:boto:Port: 443 DEBUG:boto:Params: {} DEBUG:boto:Token: None DEBUG:boto:StringToSign: PUT DXd3d49NuMtU0/kFdctzvA== text/xml Mon, 01 Aug 2022 09:17:20 GMT /sppnaut-corin/g4p.xml DEBUG:boto:Signature: AWS C02LQ3V10SBVQXHW9U37:y3IgaI4K3tzeINBjvK7Hj/TlOIw= DEBUG:boto:Final headers: {'User-Agent': 'Boto/2.49.0 Python/3.7.6 Windows/10', 'Content-Type': 'text/xml', 'Content-MD5': 'DXd3d49NuMtU0/kFdctzvA==', 'Content-Length': '228', 'Expect': '100-Continue', 'Date': 'Mon, 01 Aug 2022 09:17:20 GMT', 'Authorization': 'AWS C02LQ3V10SBVQXHW9U37:y3IgaI4K3tzeINBjvK7Hj/TlOIw='} DEBUG:boto:encountered RemoteDisconnected exception, reconnecting DEBUG:boto:establishing HTTPS connection: host=cellar-fr-north-hds-c1.services.clever-cloud.com, kwargs={'timeout': 70, 'port': 443} DEBUG:boto:Token: None DEBUG:boto:StringToSign: PUT DXd3d49NuMtU0/kFdctzvA== text/xml Mon, 01 Aug 2022 09:17:20 GMT /sppnaut-corin/g4p.xml DEBUG:boto:Signature: AWS C02LQ3V10SBVQXHW9U37:y3IgaI4K3tzeINBjvK7Hj/TlOIw= DEBUG:boto:Final headers: {'User-Agent': 'Boto/2.49.0 Python/3.7.6 Windows/10', 'Content-Type': 'text/xml', 'Content-MD5': 'DXd3d49NuMtU0/kFdctzvA==', 'Content-Length': '228', 'Expect': '100-Continue', 'Date': 'Mon, 01 Aug 2022 09:17:20 GMT', 'Authorization': 'AWS C02LQ3V10SBVQXHW9U37:y3IgaI4K3tzeINBjvK7Hj/TlOIw='} DEBUG:boto:Response headers: [('content-length', '0'), ('etag', '"0d7777778f4db8cb54d3f90575cb73bc"'), ('accept-ranges', 'bytes'), ('x-amz-request-id', 'tx0000000000000006a0da8-0062e79a20-ed24dc-default'), ('date', 'Mon, 01 Aug 2022 09:17:20 GMT')] ERROR:root:Successfully updated ouvrage "C:\Users\lguillois\Desktop\file_sync\file_sync\corin_local\g4p.xml" to Cellar ```
Sortie avec VPN ``` C:\Users\lguillois\Desktop\file_sync\file_sync>python corin_sync.py launch Traceback (most recent call last): File "corin_sync.py", line 29, in bucket = conn.get_bucket(CELLAR_BUCKET_CORIN) File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\site-packages\boto\s3\connection.py", line 509, in get_bucket return self.head_bucket(bucket_name, headers=headers) File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\site-packages\boto\s3\connection.py", line 528, in head_bucket response = self.make_request('HEAD', bucket_name, headers=headers) File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\site-packages\boto\s3\connection.py", line 671, in make_request retry_handler=retry_handler File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\site-packages\boto\connection.py", line 1071, in make_request retry_handler=retry_handler) File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\site-packages\boto\connection.py", line 1030, in _mexe raise ex File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\site-packages\boto\connection.py", line 943, in _mexe request.body, request.headers) File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\http\client.py", line 1252, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\http\client.py", line 1298, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\http\client.py", line 1247, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\http\client.py", line 1026, in _send_output self.send(msg) File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\http\client.py", line 966, in send self.connect() File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\http\client.py", line 1414, in connect super().connect() File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\http\client.py", line 938, in connect (self.host,self.port), self.timeout, self.source_address) File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\socket.py", line 728, in create_connection raise err File "C:\Users\lguillois\Desktop\WinPython\python-3.7.6.amd64\lib\socket.py", line 716, 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 ```
rik commented 2 years ago

Depuis le VPN, nous avons fait une requête HTTPS vers pypi.org (en copiant la requête depuis les devtools Edge):

python -m pip install s3cmd depuis PowerShell ou cmd.exe ne fonctionne pas et termine en timeout.

rik commented 2 years ago

On a pu un peu avancé en ajoutant une variable d'environnement SETX HTTPS_PROXY=http://squid.shom.fr:3128. Cela nous a permis de faire marcher python -m pip install s3cmd. Par contre, nous avons toujours des soucis pour parler à Cellar.