← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1284807] Re: Uploads to a swift container failing with connection reset by peer or broken pipe

 

[Expired for OpenStack Dashboard (Horizon) because there has been no
activity for 60 days.]

** Changed in: horizon
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1284807

Title:
  Uploads to a swift container failing with connection reset by peer or
  broken pipe

Status in Ubuntu Cloud Archive:
  Expired
Status in OpenStack Dashboard (Horizon):
  Expired

Bug description:
  Using the following provided by Ubuntu's Cloud Archive:
  - Swift (1.10.0)
  - python-swiftclient (1.6.0)
  - python-django-horizon (2013.2-0ubuntu1~cloud0)
  - Django 1.5.4

  How to reproduce:
  - Create a container "test"
  - Try to upload a file to the test container

  Horizon is able to create and delete containers.
  It is also able to delete objects but you are unable to upload files without a connection reset by peer (if the endpoint is SSL) or a broken pipe error (if the endpoint is HTTP).

  Using python-swiftclient on the same machine where horizon is
  installed will upload the file successfully regardless if the endpoint
  is SSL or not.

  I have tried to understand why python-swiftclient is able to upload a
  file while horizon cannot - without success, hence this bug report.

  Environment information:
  - nginx in front of proxy nodes. If the endpoint is HTTPS, nginx handles the SSL termination.
  - swift endpoint is https://swift.example.org:443 or http://swift.example.org:80 which corresponds to the nginx server
  - keystone PKI authentication
  - horizon (HTTP, no SSL) on a standalone server
  - swift-proxy on a standalone server
  - swift-container, swift-object and swift-account running on the same standalone server

  Full stack trace of an upload to a swift container through Horizon with the swift endpoint in SSL (https termination done by nginx):
  ===
  2014-02-25 19:17:44,266 30361 DEBUG openstack_dashboard.api.swift Swift connection created using token "69adf78ca3971562af3e7dcee5060ab5" and url "https://swift.example.org:443/v1/AUTH_c8bc4d5c4d694995882d3a43318fd6be";
  2014-02-25 19:18:15,355 30361 ERROR swiftclient [Errno 104] Connection reset by peer
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
      rv = func(self.url, self.token, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 890, in put_object
      conn.send('%x\r\n%s\r\n' % (len(chunk), chunk))
    File "/usr/lib/python2.7/httplib.py", line 790, in send
      self.sock.sendall(data)
    File "/usr/lib/python2.7/ssl.py", line 229, in sendall
      v = self.send(data[count:])
    File "/usr/lib/python2.7/ssl.py", line 198, in send
      v = self._sslobj.write(data)
  error: [Errno 104] Connection reset by peer
  2014-02-25 19:18:15,357 30361 ERROR django.request Internal Server Error: /horizon/project/containers/test/upload
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response
      response = callback(request, *callback_args, **callback_kwargs)
    File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 38, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 54, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 38, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 86, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 68, in view
      return self.dispatch(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 86, in dispatch
      return handler(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 165, in post
      return self.form_valid(form)
    File "/usr/lib/python2.7/dist-packages/horizon/forms/views.py", line 94, in form_valid
      exceptions.handle(self.request)
    File "/usr/lib/python2.7/dist-packages/horizon/forms/views.py", line 91, in form_valid
      handled = form.handle(self.request, form.cleaned_data)
    File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/containers/forms.py", line 95, in handle
      exceptions.handle(request, _("Unable to upload object."))
    File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/containers/forms.py", line 91, in handle
      object_file)
    File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/swift.py", line 243, in swift_upload_object
      headers=headers)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 1233, in put_object
      response_dict=response_dict)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
      rv = func(self.url, self.token, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 890, in put_object
      conn.send('%x\r\n%s\r\n' % (len(chunk), chunk))
    File "/usr/lib/python2.7/httplib.py", line 790, in send
      self.sock.sendall(data)
    File "/usr/lib/python2.7/ssl.py", line 229, in sendall
      v = self.send(data[count:])
    File "/usr/lib/python2.7/ssl.py", line 198, in send
      v = self._sslobj.write(data)
  error: [Errno 104] Connection reset by peer
  ===

  Full stack trace of an upload to a swift container through Horizon with the swift endpoint is NOT SSL (http proxy by nginx): 
  ===
  2014-02-25 19:45:38,873 30362 DEBUG openstack_dashboard.api.swift Swift connection created using token "69adf78ca3971562af3e7dcee5060ab5" and url "https://swift.example.org:443/v1/AUTH_c8bc4d5c4d694995882d3a43318fd6be";
  2014-02-25 19:46:09,968 30362 ERROR swiftclient [Errno 32] Broken pipe
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
      rv = func(self.url, self.token, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 890, in put_object
      conn.send('%x\r\n%s\r\n' % (len(chunk), chunk))
    File "/usr/lib/python2.7/httplib.py", line 790, in send
      self.sock.sendall(data)
    File "/usr/lib/python2.7/ssl.py", line 229, in sendall
      v = self.send(data[count:])
    File "/usr/lib/python2.7/ssl.py", line 198, in send
      v = self._sslobj.write(data)
  error: [Errno 32] Broken pipe
  2014-02-25 19:46:09,969 30362 ERROR django.request Internal Server Error: /horizon/project/containers/test/upload
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response
      response = callback(request, *callback_args, **callback_kwargs)
    File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 38, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 54, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 38, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 86, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 68, in view
      return self.dispatch(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 86, in dispatch
      return handler(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 165, in post
      return self.form_valid(form)
    File "/usr/lib/python2.7/dist-packages/horizon/forms/views.py", line 94, in form_valid
      exceptions.handle(self.request)
    File "/usr/lib/python2.7/dist-packages/horizon/forms/views.py", line 91, in form_valid
      handled = form.handle(self.request, form.cleaned_data)
    File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/containers/forms.py", line 95, in handle
      exceptions.handle(request, _("Unable to upload object."))
    File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/containers/forms.py", line 91, in handle
      object_file)
    File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/swift.py", line 243, in swift_upload_object
      headers=headers)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 1233, in put_object
      response_dict=response_dict)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
      rv = func(self.url, self.token, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 890, in put_object
      conn.send('%x\r\n%s\r\n' % (len(chunk), chunk))
    File "/usr/lib/python2.7/httplib.py", line 790, in send
      self.sock.sendall(data)
    File "/usr/lib/python2.7/ssl.py", line 229, in sendall
      v = self.send(data[count:])
    File "/usr/lib/python2.7/ssl.py", line 198, in send
      v = self._sslobj.write(data)
  error: [Errno 32] Broken pipe
  ===

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1284807/+subscriptions


References