CmisSync icon indicating copy to clipboard operation
CmisSync copied to clipboard

Chunked encoding upload is not supported on the HTTP/1.0 protocol.

Open douglascrp opened this issue 9 years ago • 4 comments

Hi.

I'm trying to use CmisSync against an Alfresco Community 4.2.f, but I'm unable to make it work.

Files created on Alfresco are correctly synchronized to my client, but the other way around doesn't work.

This is the log file:

2014-08-28 12:51:26,716 [4] INFO  CmisSync.Lib.RepoBase [(null)] - Full Sync Started: C:\Documents and Settings\user\CmisSync\company
2014-08-28 12:51:27,287 [4] INFO  CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Uploading file absent on repository: C:\Documents and Settings\user\CmisSync\company\documento criado no windows.rtf.rtf
2014-08-28 12:51:27,287 [4] INFO  CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Uploading: C:\Documents and Settings\user\CmisSync\company\documento criado no windows.rtf.rtf
2014-08-28 12:51:27,287 [4] ERROR CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Could not upload file: C:\Documents and Settings\user\CmisSync\company\documento criado no windows.rtf.rtf
DotCMIS.Exceptions.CmisConnectionException: Cannot access http://127.0.0.1/alfresco/cmisatom/b206d520-1c60-4acb-b348-9cedb3ee96ce/children?id=workspace://SpacesStore/545775a3-77a1-4083-8521-7adfaa0bc9cb: Chunked encoding upload is not supported on the HTTP/1.0 protocol. ---> System.Net.ProtocolViolationException: Chunked encoding upload is not supported on the HTTP/1.0 protocol.
   at System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at DotCMIS.Binding.Impl.HttpUtils.Invoke(UrlBuilder url, String method, String contentType, Output writer, BindingSession session, Nullable`1 offset, Nullable`1 length, IDictionary`2 headers)
   --- End of inner exception stack trace ---
   at DotCMIS.Binding.Impl.HttpUtils.Invoke(UrlBuilder url, String method, String contentType, Output writer, BindingSession session, Nullable`1 offset, Nullable`1 length, IDictionary`2 headers)
   at DotCMIS.Binding.Impl.HttpUtils.InvokePOST(UrlBuilder url, String contentType, Output writer, BindingSession session)
   at DotCMIS.Binding.AtomPub.AbstractAtomPubService.Post(UrlBuilder url, String contentType, Output writer)
   at DotCMIS.Binding.AtomPub.ObjectService.CreateDocument(String repositoryId, IProperties properties, String folderId, IContentStream contentStream, Nullable`1 versioningState, IList`1 policies, IAcl addAces, IAcl removeAces, IExtensionsData extension)
   at DotCMIS.Client.Impl.Session.CreateDocument(IDictionary`2 properties, IObjectId folderId, IContentStream contentStream, Nullable`1 versioningState, IList`1 policies, IList`1 addAces, IList`1 removeAces)
   at DotCMIS.Client.Impl.Folder.CreateDocument(IDictionary`2 properties, IContentStream contentStream, Nullable`1 versioningState, IList`1 policies, IList`1 addAces, IList`1 removeAces, IOperationContext context)
   at DotCMIS.Client.Impl.Folder.CreateDocument(IDictionary`2 properties, IContentStream contentStream, Nullable`1 versioningState)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.UploadFile(String filePath, IFolder remoteFolder)
2014-08-28 12:51:27,287 [4] ERROR CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Could not crawl sync local file: C:\Documents and Settings\user\CmisSync\company\documento criado no windows.rtf.rtf
DotCMIS.Exceptions.CmisConnectionException: Cannot access http://127.0.0.1/alfresco/cmisatom/b206d520-1c60-4acb-b348-9cedb3ee96ce/children?id=workspace://SpacesStore/545775a3-77a1-4083-8521-7adfaa0bc9cb: Chunked encoding upload is not supported on the HTTP/1.0 protocol. ---> System.Net.ProtocolViolationException: Chunked encoding upload is not supported on the HTTP/1.0 protocol.
   at System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at DotCMIS.Binding.Impl.HttpUtils.Invoke(UrlBuilder url, String method, String contentType, Output writer, BindingSession session, Nullable`1 offset, Nullable`1 length, IDictionary`2 headers)
   --- End of inner exception stack trace ---
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.ProcessRecoverableException(String logMessage, Exception exception)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.UploadFile(String filePath, IFolder remoteFolder)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.CrawlLocalFile(String filePath, IFolder remoteFolder, IList remoteFiles)
2014-08-28 12:51:27,287 [4] ERROR CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Could not crawl folder: /Sites/company/documentLibrary/Projeto PDRSX
DotCMIS.Exceptions.CmisConnectionException: Cannot access http://127.0.0.1/alfresco/cmisatom/b206d520-1c60-4acb-b348-9cedb3ee96ce/children?id=workspace://SpacesStore/545775a3-77a1-4083-8521-7adfaa0bc9cb: Chunked encoding upload is not supported on the HTTP/1.0 protocol. ---> System.Net.ProtocolViolationException: Chunked encoding upload is not supported on the HTTP/1.0 protocol.
   at System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at DotCMIS.Binding.Impl.HttpUtils.Invoke(UrlBuilder url, String method, String contentType, Output writer, BindingSession session, Nullable`1 offset, Nullable`1 length, IDictionary`2 headers)
   --- End of inner exception stack trace ---
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.ProcessRecoverableException(String logMessage, Exception exception)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.CrawlLocalFile(String filePath, IFolder remoteFolder, IList remoteFiles)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.CrawlLocalFiles(String localFolder, IFolder remoteFolder, IList remoteFiles)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.CrawlSync(IFolder remoteFolder, String localFolder)
2014-08-28 12:51:27,287 [4] INFO  CmisSync.Lib.RepoBase [(null)] - Sync Error: Cannot access http://127.0.0.1/alfresco/cmisatom/b206d520-1c60-4acb-b348-9cedb3ee96ce/children?id=workspace://SpacesStore/545775a3-77a1-4083-8521-7adfaa0bc9cb: Chunked encoding upload is not supported on the HTTP/1.0 protocol.
2014-08-28 12:51:27,287 [4] ERROR CmisSync.StatusIconController [(null)] - Error syncing 'company': Cannot access http://127.0.0.1/alfresco/cmisatom/b206d520-1c60-4acb-b348-9cedb3ee96ce/children?id=workspace://SpacesStore/545775a3-77a1-4083-8521-7adfaa0bc9cb: Chunked encoding upload is not supported on the HTTP/1.0 protocol.
CmisSync.Lib.Cmis.BaseException: Cannot access http://127.0.0.1/alfresco/cmisatom/b206d520-1c60-4acb-b348-9cedb3ee96ce/children?id=workspace://SpacesStore/545775a3-77a1-4083-8521-7adfaa0bc9cb: Chunked encoding upload is not supported on the HTTP/1.0 protocol. ---> DotCMIS.Exceptions.CmisConnectionException: Cannot access http://127.0.0.1/alfresco/cmisatom/b206d520-1c60-4acb-b348-9cedb3ee96ce/children?id=workspace://SpacesStore/545775a3-77a1-4083-8521-7adfaa0bc9cb: Chunked encoding upload is not supported on the HTTP/1.0 protocol. ---> System.Net.ProtocolViolationException: Chunked encoding upload is not supported on the HTTP/1.0 protocol.
   at System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at DotCMIS.Binding.Impl.HttpUtils.Invoke(UrlBuilder url, String method, String contentType, Output writer, BindingSession session, Nullable`1 offset, Nullable`1 length, IDictionary`2 headers)
   --- End of inner exception stack trace ---
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.ProcessRecoverableException(String logMessage, Exception exception)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.CrawlSync(IFolder remoteFolder, String localFolder)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.Sync(Boolean syncFull)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.<.ctor>b__4(Object o, DoWorkEventArgs args)
   --- End of inner exception stack trace ---
2014-08-28 12:51:27,307 [4] INFO  CmisSync.Lib.RepoBase [(null)] - Full Sync Complete: C:\Documents and Settings\user\CmisSync\company

I tried with CmisSync.1.1.14.0 and CmisSync.1.2.10.0, running on Windows XP and Windows 8.

douglascrp avatar Aug 28 '14 16:08 douglascrp

Hi Douglas,

Is there some sort of proxy or firewall between the client and the server? Could you please try to run CmisSync on the server itself?

Thanks for using CmisSync! Nicolas Raoul Aegif

nicolas-raoul avatar Aug 28 '14 16:08 nicolas-raoul

Yes, there is, and because of that I also tried with another server in our local network, but we got the same result, and on that server, Alfresco runs on port 8080.

douglascrp avatar Aug 28 '14 17:08 douglascrp

Does the problem still happen with 2.1.0?

Also, Windows XP is not supported unfortunately.

Thanks for the feedback! Nicolas

nicolas-raoul avatar Dec 15 '14 09:12 nicolas-raoul

https://issues.apache.org/jira/browse/CMIS-421

The client library sends POST requests in chunks since OpenCMIS 0.2 in order to deal with huge documents. That is, the Content-Length header is not set.  
A HTTP 1.1 server should be able to handle that.

(developer of DotCMIS)

So apparently HTTP 1.0 servers (or any proxy/firewall converting to HTTP 1.0) won't work.

nicolas-raoul avatar May 19 '15 09:05 nicolas-raoul