sound like the remote connection was closed. Can you snoop the network
and post the result here?
Thanks
-- Jeanfrancois
> --
> You received this message because you are subscribed to the Google
> Groups "asynchttpclient" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/asynchttpclient/-/1B6t1gUWYD0J.
> To post to this group, send email to asyncht...@googlegroups.com.
> To unsubscribe from this group, send email to
> asynchttpclie...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/asynchttpclient?hl=en.
looks like there is a bug in AHC. Can you try 1.7.0-SNAPSHOT (I think it
got fixed) and let me know? The workaround is to increase the request
timeout.
A+
-- Jeanfrancois
On 11-12-06 10:09 AM, jg wrote:
> Hi Jean-Fran�ois,
> Method)Salut,
> --
> You received this message because you are subscribed to the Google
> Groups "asynchttpclient" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/asynchttpclient/-/EmZxR9TShXwJ.
try 1.7.1-SNAPSHOT and let me know.
Thanks!
-- Jeanfrancois
> --
> You received this message because you are subscribed to the Google
> Groups "asynchttpclient" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/asynchttpclient/-/5NrwDEFYpuwJ.
AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder(). setRequestTimeoutInMs(120000).build();
AsyncHttpClient c = new AsyncHttpClient(cf);
--
You received this message because you are subscribed to the Google Groups "asynchttpclient" group.
To view this discussion on the web visit https://groups.google.com/d/msg/asynchttpclient/-/UvdptgYlEWIJ.
Don't know if I should use grizzly instead, but don't know how...
Thanks anyway,jg
--
You received this message because you are subscribed to the Google Groups "asynchttpclient" group.
To view this discussion on the web visit https://groups.google.com/d/msg/asynchttpclient/-/5NrwDEFYpuwJ.
Ben non !ca sent le Québecois :-)
--
You received this message because you are subscribed to the Google Groups "asynchttpclient" group.
To view this discussion on the web visit https://groups.google.com/d/msg/asynchttpclient/-/UvdptgYlEWIJ.
sorry for the delay...have you found a fix for that? Can you package a
unit test and file an issue so it doesn't stay unfixed?
Thanks
-- Jeanfrancois
On 12-02-02 3:24 AM, jg wrote:
> Hi all,
>
> thanks a lot JF and Brian for all the answers. I could test with
> sonatype latest (async-http-client-1.7.1-20120124.193434-3.jar,
> netty-3.2.7).
> my test JS function is :
> var url = "http://<host:port>/alfresco/s/api/upload"
> var realm = new
> Realm.RealmBuilder().setPrincipal(login).setPassword(password).setScheme(Realm.AuthScheme.BASIC).build();
> var cfg = new AsyncHttpClientConfig.Builder()
> .setMaximumConnectionsPerHost(10)
> .setMaximumConnectionsTotal(100)
> .setRequestTimeoutInMs(120000)
> .build();
>
> var asyncHttpClient, ahc, future, response, filePart;
> try {
> asyncHttpClient = new AsyncHttpClient(cfg);
> ahc = asyncHttpClient.preparePost(url)
>
> ahc.setRealm(realm)
> ahc.setHeader("Content-Type", "multipart/form-data");
> //alfresco stuff, not really relevant
> ahc.addBodyPart(new StringPart("filename", new File(doc).name))
> ahc.addBodyPart(new StringPart("containerid", "documentLibrary"))
> ahc.addBodyPart(new StringPart("siteid", "mysite"))
> ahc.addBodyPart(new StringPart("uploadDirectory", "myDir"))
> ahc.addBodyPart(new StringPart("description", "my description"))
> filePart = com.ning.http.client.FilePart("filedata", new
> File(doc), "<mimetype>", "UTF-8")
> ahc.addBodyPart(filePart)
>
> future = ahc.execute();
> response = future.get();
> } finally {
> asyncHttpClient.close();
> }
>
> The file transfert with curl seems to work fine (curl -v -u log:psw
> http://<remote IP>:<port>/alfresco/s/api/upload
> "-Ffiledata=@myBigFile.zip" "-Ffilename=myBigFile.zip"
> "-Fsiteid=mySite" "-Fuploaddirectory=uploadDir" "-Fdescription=a
> description" "-Fcontenttype=application/zip"
> -Fcontainerid=documentLibrary).
>
> Is there a limit to unset somewhere?
> Merci (from Fr, not Qc :-))
>
> I could upload a file of 90Mo without problem, but not with 200Mo. It
> still generates an exception at once:
> 66014 [New I/O client worker #2-1] INFO
> com.ning.http.multipart.MultipartBody - Waiting for writing...
> 67015 [New I/O client worker #2-1] INFO
> com.ning.http.multipart.MultipartBody - Waiting for writing...
> 68015 [New I/O client worker #2-1] INFO
> com.ning.http.multipart.MultipartBody - Waiting for writing...
> 69016 [New I/O client worker #2-1] INFO
> com.ning.http.multipart.MultipartBody - Waiting for writing...
> 70016 [New I/O client worker #2-1] INFO
> com.ning.http.multipart.MultipartBody - Waiting for writing...
> 71016 [New I/O client worker #2-1] INFO
> com.ning.http.multipart.MultipartBody - Waiting for writing...
> 72016 [New I/O client worker #2-1] INFO
> com.ning.http.multipart.MultipartBody - Waiting for writing...
> 73016 [New I/O client worker #2-1] INFO
> com.ning.http.multipart.MultipartBody - Waiting for writing...
> 74016 [New I/O client worker #2-1] INFO
> com.ning.http.multipart.MultipartBody - Waiting for writing...
> 75016 [New I/O client worker #2-1] INFO
> com.ning.http.multipart.MultipartBody - Waiting for writing...
> [Mozilla Rhino exceptions...]
> Caused by: java.util.concurrent.ExecutionException:
> java.io.IOException: Unable to write on channel
> java.nio.channels.SocketChannel[connected local=/<local IP>:58623
> remote=<remote IP>:8342]
> at
> com.ning.http.client.providers.netty.NettyResponseFuture.abort(NettyResponseFuture.java:297)
> at
> com.ning.http.client.providers.netty.NettyAsyncHttpProvider$ProgressListener.operationComplete(NettyAsyncHttpProvider.java:1657)
> at
> com.ning.http.client.providers.netty.NettyAsyncHttpProvider$5.operationComplete(NettyAsyncHttpProvider.java:474)
> at
> org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:381)
> at
> org.jboss.netty.channel.DefaultChannelFuture.addListener(DefaultChannelFuture.java:148)
> at
> com.ning.http.client.providers.netty.NettyAsyncHttpProvider.writeRequest(NettyAsyncHttpProvider.java:467)
> at
> com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:82)
> at
> org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:381)
> at
> org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:372)
> at
> org.jboss.netty.channel.DefaultChannelFuture.setSuccess(DefaultChannelFuture.java:316)
> at
> org.jboss.netty.channel.socket.nio.NioWorker$RegisterTask.run(NioWorker.java:776)
> at
> org.jboss.netty.channel.socket.nio.NioWorker.processRegisterTaskQueue(NioWorker.java:258)
> at
> org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
> at
> org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
> at
> org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: java.io.IOException: Unable to write on channel
> java.nio.channels.SocketChannel[connected local=/<local IP>:58623
> remote=<remote IP>:8342]
> at
> com.ning.http.multipart.MultipartBody.writeToTarget(MultipartBody.java:584)
> at
> com.ning.http.multipart.MultipartBody.transferTo(MultipartBody.java:333)
> at
> com.ning.http.client.providers.netty.BodyFileRegion.transferTo(BodyFileRegion.java:46)
> at
> org.jboss.netty.channel.socket.nio.SocketSendBufferPool$FileSendBuffer.transferTo(SocketSendBufferPool.java:281)
> at
> org.jboss.netty.channel.socket.nio.NioWorker.write0(NioWorker.java:472)
> at
> org.jboss.netty.channel.socket.nio.NioWorker.writeFromUserCode(NioWorker.java:390)
> at
> org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:127)
> at
> org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:68)
> at
> org.jboss.netty.handler.codec.http.HttpClientCodec.handleDownstream(HttpClientCodec.java:82)
> at
> org.jboss.netty.handler.stream.ChunkedWriteHandler.flush(ChunkedWriteHandler.java:268)
> at
> org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:125)
> at org.jboss.netty.channel.Channels.write(Channels.java:611)
> at org.jboss.netty.channel.Channels.write(Channels.java:578)
> at
> org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251)
> at
> com.ning.http.client.providers.netty.NettyAsyncHttpProvider.writeRequest(NettyAsyncHttpProvider.java:460)
> at
> com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:82)
> at
> org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:381)
> at
> org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:372)
> at
> org.jboss.netty.channel.DefaultChannelFuture.setSuccess(DefaultChannelFuture.java:316)
> at
> org.jboss.netty.channel.socket.nio.NioWorker$RegisterTask.run(NioWorker.java:776)
> at
> org.jboss.netty.channel.socket.nio.NioWorker.processRegisterTaskQueue(NioWorker.java:258)
> at
> org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
> ... 3 more
> --
> You received this message because you are subscribed to the Google
> Groups "asynchttpclient" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/asynchttpclient/-/ZerRmA-oekgJ.