AnsweredAssumed Answered

CMIS via squid only works for small files

Question asked by idwright on Feb 19, 2014
Latest reply on Mar 28, 2014 by idwright
I'm trying to help out somebody who is sitting behind a squid proxy server.

Using, from Chemistry, the python cmislib but have also tried the java implmentation.


The problem is that only small files can be uploaded/updated - 125kb seems to be OK, 256kb not although I manage to upload some slightly larger files running everything locally.

It's fairly easy to test if you've got squid installed by setting the http(s)_proxy variables.

i.e.
export http_proxy=http://localhost:3128
export https_proxy=http://localhost:3128


I thought I'd ask as Squid is mentioned here:
http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fws-caching-about.html


The python error is:

  File "/usr/local/lib/python2.7/dist-packages/cmislib/model.py", line 1185, in createDocument
    result = self._cmisClient.post(postUrl.encode('utf-8'), xmlDoc.toxml(encoding='utf-8'), ATOM_XML_ENTRY_TYPE)
  File "/usr/local/lib/python2.7/dist-packages/cmislib/model.py", line 260, in post
    **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/cmislib/net.py", line 286, in post
    return opener.open(request)
  File "/usr/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 32] Broken pipe>

The squid logs (edited) are as follows:

Success

1392803545.462     29 127.0.0.1 TCP_MISS/401 329 GET http://alfresco/alfresco/cmisatom - DIRECT/ip.ad.dr.ess -
1392803545.620    156 127.0.0.1 TCP_MISS/200 29202 GET http://alfresco/alfresco/cmisatom - DIRECT/ip.ad.dr.ess application/atomsvc+xml
1392803545.651     15 127.0.0.1 TCP_MISS/401 329 GET http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/path? - DIRECT/ip.ad.dr.ess -
1392803545.809    157 127.0.0.1 TCP_MISS/200 7733 GET http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/path? - DIRECT/ip.ad.dr.ess application/atom+xml
1392803545.906     29 127.0.0.1 TCP_MISS/401 329 POST http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/children? - DIRECT/ip.ad.dr.ess -
1392803546.396    489 127.0.0.1 TCP_MISS/409 9280 POST http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/children? - DIRECT/ip.ad.dr.ess text/html
1392803546.412     14 127.0.0.1 TCP_MISS/401 329 GET http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/path? - DIRECT/ip.ad.dr.ess -
1392803546.586    172 127.0.0.1 TCP_MISS/200 11509 GET http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/path? - DIRECT/ip.ad.dr.ess application/atom+xml
1392803546.611     15 127.0.0.1 TCP_MISS/401 378 PUT http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/content/manual2.txt? - DIRECT/ip.ad.dr.ess text/plain
1392803547.127    514 127.0.0.1 TCP_MISS/201 759 PUT http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/content/manual2.txt? - DIRECT/ip.ad.dr.ess text/plain





Failure

1392803561.654     34 127.0.0.1 TCP_MISS/401 329 GET http://alfresco/alfresco/cmisatom - DIRECT/ip.ad.dr.ess -
1392803561.808    152 127.0.0.1 TCP_MISS/200 29202 GET http://alfresco/alfresco/cmisatom - DIRECT/ip.ad.dr.ess application/atomsvc+xml
1392803561.838     15 127.0.0.1 TCP_MISS/401 329 GET http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/path? - DIRECT/ip.ad.dr.ess -
1392803562.218    380 127.0.0.1 TCP_MISS/200 7733 GET http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/path? - DIRECT/ip.ad.dr.ess application/atom+xml
1392803562.543     30 127.0.0.1 TCP_MISS/401 329 POST http://alfresco/alfresco/cmisatom/5ed06978-3f57-xxxx-a9de-0404443ddb6d/children? - DIRECT/ip.ad.dr.ess -

Outcomes