cancel
Showing results for 
Search instead for 
Did you mean: 

problems using python cmislib uploading to 5.0.d

idwright
Star Collaborator
Star Collaborator
I've just upgraded from 4.2.f to 5.0.d and am having problems with a very simple python script used to upload a file via CMIS

I've tried changing the service url from /alfresco/cmisatom to /alfresco/api/-default-/public/cmis/versions/1.0/atom but if anything that makes it more unhappy (firstly crashes because of an empty repository name, then if I hard code the name to '-default-' crashes again see below)

The access log on the server seems to indicate a 401 for the POST (For GET there seems to be a 401 followed by a 200)

With alfresco/cmisatom the script doesn't fail but it doesn't upload the file either

Using cmislib==0.5.1

The CMIS workbench uploads a file OK. (no 401)

Has anybody got any thoughts on this?

Thanks


  File "/home/iwright/test/cmis/local/lib/python2.7/site-packages/cmislib/model.py", line 2758, in createDocument
    contentEncoding)
  File "/home/iwright/test/cmis/local/lib/python2.7/site-packages/cmislib/model.py", line 1187, in createDocument
    result = self._cmisClient.post(postUrl.encode('utf-8'), xmlDoc.toxml(encoding='utf-8'), ATOM_XML_ENTRY_TYPE)
  File "/home/iwright/test/cmis/local/lib/python2.7/site-packages/cmislib/model.py", line 260, in post
    **kwargs)
  File "/home/iwright/test/cmis/local/lib/python2.7/site-packages/cmislib/net.py", line 286, in post
    return opener.open(request)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1214, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>
3 REPLIES 3

wligtenberg
Champ in-the-making
Champ in-the-making
I am experiencing the same issue, even coming from 5.0.a.
I do see that using alfresco/api/-default-/public/cmis/versions/1.0/atom works for small files.
I only get an error with larger files ~2M.

Maybe they changed the way the accept large posts?

resplin
Elite Collaborator
Elite Collaborator
WLigtenberg and I tested, and found that cmislib works correctly with 5.0.d and 5.1.c so long as the files are small.

We reported our findings in the Apache Chemistry issue tracker:
https://issues.apache.org/jira/browse/CMIS-961

The problem with the repository name being blank is reported here:
https://issues.apache.org/jira/browse/CMIS-716

idwright
Star Collaborator
Star Collaborator
If I connect to 8080 i.e. directly to tomcat rather than via Apache proxy set up and use the cmisatom endpoint then I can also upload small files.

I see the same pattern in the access log but the 401 is followed by a 201 when it works