Web dav upload large files

297 views
Skip to first unread message

Станиславский Константин

unread,
Feb 24, 2014, 6:38:33 AM2/24/14
to sardi...@googlegroups.com
Hello,

I am trying to use jackrabbit and Sardine library to upload files to Webdav server.
Everything is just perfect excepti uploading big files.
When I try to upload bigger than several KB files,
the httpclient used by both libraries returns java.net.SocketException: Connection reset by peer: socket write error

In Sardine it is hidden (by showing the first lines without the exception) but the real error is:

From Sardine: 
Feb 24, 2014 1:36:38 PM org.apache.http.impl.client.DefaultHttpClient tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Socket Closed
Feb 24, 2014 1:36:38 PM org.apache.http.impl.client.DefaultHttpClient tryExecute
INFO: Retrying request

From Jackrabbit:
Feb 24, 2014 1:22:40 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
Feb 24, 2014 1:22:40 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
ERR C:\Test\TestWebDav.zip
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:377)
at sun.security.ssl.OutputRecord.write(OutputRecord.java:363)
at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:830)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:801)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
at java.io.FilterOutputStream.write(FilterOutputStream.java:97)
at org.apache.commons.httpclient.methods.InputStreamRequestEntity.writeRequest(InputStreamRequestEntity.java:175)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at com.transfer.JackrabbitManager.uploadFile(JackrabbitManager.java:287)
at Main.main(Main.java:38)

They use different versions of httpclient (~v 3.1).

Do you have an Idea how to fix this problem?

Jon Stevens

unread,
Feb 26, 2014, 3:16:43 AM2/26/14
to sardi...@googlegroups.com
Why do you think this is sardine's issue?

jon



--
You received this message because you are subscribed to the Google Groups "sardine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sardine-dav...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Станиславский Константин

unread,
Feb 26, 2014, 8:59:39 AM2/26/14
to sardi...@googlegroups.com
From Sardine: 
Feb 24, 2014 1:36:38 PM org.apache.http.impl.client.DefaultHttpClient tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Socket Closed
Feb 24, 2014 1:36:38 PM org.apache.http.impl.client.DefaultHttpClient tryExecute
INFO: Retrying request

As you can see, the Sardine didn't manage well with connection interruptions.

Jon Stevens

unread,
Feb 26, 2014, 3:26:47 PM2/26/14
to sardi...@googlegroups.com
How exactly is that sardine's fault that when the server dies, it doesn't reconnect?

jon


Reply all
Reply to author
Forward
0 new messages