libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David L. Day (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LIBCLOUD-959) AZURE_BLOBS upload_object fails on both Container and Driver
Date Thu, 16 Nov 2017 18:43:00 GMT

    [ https://issues.apache.org/jira/browse/LIBCLOUD-959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16255759#comment-16255759
] 

David L. Day commented on LIBCLOUD-959:
---------------------------------------

On further investigation, appears to be an issue with requests/urllib3 and https calls, possibly
due to me being behind a corporate firewall.

Validated with:

{noformat}
> python.exe -c "import requests;requests.get('https://www.google.com')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\dayd3\Envs\azure\lib\site-packages\requests\api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\dayd3\Envs\azure\lib\site-packages\requests\api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\dayd3\Envs\azure\lib\site-packages\requests\sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\dayd3\Envs\azure\lib\site-packages\requests\sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\dayd3\Envs\azure\lib\site-packages\requests\adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.google.com', port=443):
Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection
object at 0x03738650>: Failed to establish a new connection: [Errno 11001] getaddrinfo
failed',))
{noformat}

Closing this out.


> AZURE_BLOBS upload_object fails on both Container and Driver
> ------------------------------------------------------------
>
>                 Key: LIBCLOUD-959
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-959
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Storage
>         Environment: Python 2.7.11
>            Reporter: David L. Day
>
> The upload_object method on both the driver and container objects fails for Provider.AZURE_BLOBS.
Listing containers and objects works.
> {noformat}
> > pip list
> Package         Version
> --------------- ---------
> apache-libcloud 2.2.1
> asn1crypto      0.23.0
> certifi         2017.11.5
> cffi            1.11.2
> chardet         3.0.4
> cryptography    2.1.3
> enum34          1.1.6
> idna            2.6
> ipaddress       1.0.18
> pip             9.0.1
> pycparser       2.18
> pyOpenSSL       17.3.0
> requests        2.18.4
> setuptools      36.6.0
> six             1.11.0
> urllib3         1.22
> wheel           0.30.0
> {noformat}
> Code to reproduce:
> {code:python}
> # -*- coding: utf-8 -*-
> import libcloud.security
> from libcloud.storage.types import Provider
> from libcloud.storage.providers import get_driver
> key = ''
> secret = ''
> cls = get_driver(Provider.AZURE_BLOBS)
> driver = cls(key=key, secret=secret)
> print "Containers: ", driver.list_containers()
> testing = driver.get_container(container_name='testing')
> print "Objects in 'testing': ", testing.list_objects()
> print "Downloading LICENSE.txt:"
> lic = testing.get_object('LICENSE.txt')
> testing.download_object(lic, 'C:\\Users\\dayd3\\Downloads\\LICENSE.txt')
> print "Uploading via driver:"
> driver.upload_object(file_path='C:\\Users\\dayd3\\Downloads\\test.txt', container=testing,
object_name='test/test.txt')
> print "Uploading via container:"
> testing.upload_object(file_path='C:\\Users\\dayd3\\Downloads\\test.txt', object_name='test/test.txt')}}
> {code}
> Error:
> {noformat}
> > python azure.py
> Containers:  [<Container: name=testing, provider=Microsoft Azure (blobs)>]
> Objects in 'testing':  []
> Uploading via driver:
> Traceback (most recent call last):
>   File "azure.py", line 15, in <module>
>     driver.upload_object(file_path='C:\\Users\\dayd3\\Downloads\\test.txt', container=testing,
object_name='test/test.txt')
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\storage\drivers\azure_blobs.py",
line 771, in upload_object
>     use_lease=ex_use_lease)
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\storage\drivers\azure_blobs.py",
line 895, in _put_object
>     stream=stream)
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\storage\base.py", line
627, in _upload_object
>     headers=headers, raw=True)
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\common\base.py", line
590, in request
>     stream=stream)
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\http.py", line 230, in
prepared_request
>     verify=self.ca_cert if self.ca_cert is not None else self.verify)
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\requests\sessions.py", line 618,
in send
>     r = adapter.send(request, **kwargs)
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\requests\adapters.py", line 508,
in send
>     raise ConnectionError(e, request=request)
> requests.exceptions.ConnectionError: HTTPSConnectionPool(host='dmainnovbdl1.blob.core.windows.net',
port=443): Max retries exceeded with url: /testing/test/test.txt (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection
object at 0x0000000003B6A6D8>: Failed to establish a new connection: [Errno 11004] getaddrinfo
failed',))
> {noformat}
> I'm receiving the same problem with download_object. I've updated the code sample above,
and here's the output:
> {noformat}
> Containers:  [<Container: name=testing, provider=Microsoft Azure (blobs)>]    
                                                       
> Objects in 'testing':  [<Object: name=LICENSE.txt, size=6019, hash=0x8D526E7516C1176,
provider=Microsoft Azure (blobs) ...>]          
> Downloading LICENSE.txt:                                                            
                                                 
> Traceback (most recent call last):                                                  
                                                 
>   File "azure.py", line 16, in <module>                                       
                                                       
>     testing.download_object(lic, 'C:\\Users\\dayd3\\Downloads\\LICENSE.txt')        
                                                 
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\storage\base.py", line
162, in download_object                        
>     delete_on_failure=delete_on_failure)                                            
                                                 
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\storage\drivers\azure_blobs.py",
line 546, in download_object         
>     response = self.connection.request(obj_path, raw=True, data=None)               
                                                 
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\common\base.py", line
590, in request                                 
>     stream=stream)                                                                  
                                                 
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\http.py", line 230, in
prepared_request                               
>     verify=self.ca_cert if self.ca_cert is not None else self.verify)               
                                                 
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\requests\sessions.py", line 618,
in send                                       
>     r = adapter.send(request, **kwargs)                                             
                                                 
>   File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\requests\adapters.py", line 508,
in send                                       
>     raise ConnectionError(e, request=request)                                       
                                                 
> requests.exceptions.ConnectionError: HTTPSConnectionPool(host='dmainnovbdl1.blob.core.windows.net',
port=443): Max retries exceeded wi
> th url: /testing/LICENSE.txt (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection
object at 0x0000000003DE57F0>:
>  Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))         
                                                 
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message