azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

'Connection reset by peer' while calling using API

Open avinash-keshri opened this issue 11 years ago • 3 comments

Hi folks,

We are often getting this ''Connection reset by peer' error while using various functions. Below is an example of the error while using the 'list_disks()'. Kindly look into this.

Traceback (most recent call last): File "resources/azureMgr.py", line 426, in print "--->",obj.get_disk_name_list() File "resources/azureMgr.py", line 49, in get_disk_name_list disks = self.sms.list_disks() File "/usr/local/lib/python2.7/dist-packages/azure/servicemanagement/servicemanagementservice.py", line 2287, in list_disks Disks) File "/usr/local/lib/python2.7/dist-packages/azure/servicemanagement/servicemanagementclient.py", line 322, in _perform_get response = self.perform_get(path, x_ms_version) File "/usr/local/lib/python2.7/dist-packages/azure/servicemanagement/servicemanagementclient.py", line 136, in perform_get response = self._perform_request(request) File "/usr/local/lib/python2.7/dist-packages/azure/servicemanagement/servicemanagementclient.py", line 294, in _perform_request resp = self._filter(request) File "/usr/local/lib/python2.7/dist-packages/azure/http/httpclient.py", line 231, in perform_request resp = connection.getresponse() File "/usr/lib/python2.7/httplib.py", line 1030, in getresponse response.begin() File "/usr/lib/python2.7/httplib.py", line 407, in begin version, status, reason = self._read_status() File "/usr/lib/python2.7/httplib.py", line 365, in _read_status line = self.fp.readline() File "/usr/lib/python2.7/socket.py", line 430, in readline data = recv(1) File "/usr/lib/python2.7/ssl.py", line 241, in recv return self.read(buflen) File "/usr/lib/python2.7/ssl.py", line 160, in read return self._sslobj.read(len) socket.error: [Errno 104] Connection reset by peer

avinash-keshri avatar Mar 31 '15 07:03 avinash-keshri

We also get it all the time when listing blobs in containers. Ended up wrapping every uses in try except for socket and httplib

themaxx75 avatar Apr 15 '15 18:04 themaxx75

Hello,

Sorry for this late answer. Is the problem still there using the latest version of the library and the latest contribution libraries (like requests 2.9.1)? Thank you,

lmazuel avatar Dec 22 '15 18:12 lmazuel

Closing this issue due to inactivity. Please feel free to open a new issue if the problem still persists using the latest version. Thanks!

lmazuel avatar Jul 26 '16 00:07 lmazuel