Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DC95C10965 for ; Wed, 4 Mar 2015 10:13:08 +0000 (UTC) Received: (qmail 22099 invoked by uid 500); 4 Mar 2015 10:12:05 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 22029 invoked by uid 500); 4 Mar 2015 10:12:05 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 22018 invoked by uid 99); 4 Mar 2015 10:12:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2015 10:12:05 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of umesh.sehgal@gmail.com designates 209.85.215.48 as permitted sender) Received: from [209.85.215.48] (HELO mail-la0-f48.google.com) (209.85.215.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2015 10:12:01 +0000 Received: by lamq1 with SMTP id q1so20265043lam.0 for ; Wed, 04 Mar 2015 02:11:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=xLO2YLPwUyD8m6cIPft2HQ/yPtgeK9k/+AOF/I7qybM=; b=MW8RCix5gsRygjsPiC3yO1qyJvmoA7hbReo4HSwlkeegmLE7qg652QlB+fTAD6nBEN /IRLbWuqQkjQMeWZqKHGt8gNBPdMx3Y1NdxFo5J0yr1rbBhoZGhd9nNvjubes2OkGnp4 BrjuUOSIK7d2P46PDYruBLTgomTCnxsUFJ6hsHD6BuBw/abuc8v//iZmoc9EuDAogbl3 FcVHUGAEqb3CMRjjgForE3nOLp6A4yoAeD+4oKOIhYPU9pcVXXouKAnhawkoAa9KuPl8 gqUXi3eXYmA4jlZNd1HT2SKxpRYnw9vrS7DJHvGCO7nef5k85n490pmvpnWcUFmctV03 oKvg== MIME-Version: 1.0 X-Received: by 10.152.116.18 with SMTP id js18mr2728115lab.106.1425463899891; Wed, 04 Mar 2015 02:11:39 -0800 (PST) Received: by 10.25.18.209 with HTTP; Wed, 4 Mar 2015 02:11:39 -0800 (PST) In-Reply-To: <54F5CCD6.8070000@kippdata.de> References: <54F42715.6040800@kippdata.de> <54F439D6.9030904@kippdata.de> <54F45CA5.1020009@kippdata.de> <54F5CCD6.8070000@kippdata.de> Date: Wed, 4 Mar 2015 15:41:39 +0530 Message-ID: Subject: Re: Fwd: File upload fails after upgrade to 7.0.59 From: Umesh Sehgal To: Tomcat Users List Content-Type: multipart/alternative; boundary=001a11c284e264af35051073adb7 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c284e264af35051073adb7 Content-Type: text/plain; charset=UTF-8 On Tue, Mar 3, 2015 at 8:31 PM, Rainer Jung wrote: > Am 03.03.2015 um 13:45 schrieb Umesh Sehgal: > > On Mon, Mar 2, 2015 at 6:20 PM, Rainer Jung >> wrote: >> >> Am 02.03.2015 um 13:34 schrieb Umesh Sehgal: >>> >>> On Mon, Mar 2, 2015 at 5:25 PM, Umesh Sehgal >>> >>>> wrote: >>>> >>>> >>> On Mon, Mar 2, 2015 at 3:52 PM, Rainer Jung >>> >>>> wrote: >>>>> >>>>> Am 02.03.2015 um 11:02 schrieb Umesh Sehgal: >>>>> >>>>>> >>>>>> Thanks for the quick reply, I tried using the maxSwallowSize with >>>>>> >>>>>>> increased >>>>>>> value but to no effect. The max size that I have been able to upload >>>>>>> is >>>>>>> ~16 >>>>>>> KB. I also see that the maxSwallowSize got introduced with update 55 >>>>>>> but >>>>>>> the behavior I'm seeing is 50 update onwards, is there any other >>>>>>> param >>>>>>> too? >>>>>>> is there any logging that can be turned on tomcat to help debug? >>>>>>> >>>>>>> >>>>>>> Please do not top post. For the rest see below. >>>>>> >>>>>> On Mon, Mar 2, 2015 at 2:32 PM, Rainer Jung < >>>>>> rainer.jung@kippdata.de> >>>>>> >>>>>> wrote: >>>>>>> >>>>>>> Am 02.03.2015 um 09:34 schrieb Umesh Sehgal: >>>>>>> >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> >>>>>>>> We recently upgraded our application's tomcat from 7.0.30 to >>>>>>>>> 7.0.59. >>>>>>>>> After >>>>>>>>> upgrade the file upload feature has broken. I have been able to >>>>>>>>> nail >>>>>>>>> it >>>>>>>>> down to the point that the problem manifests 7.0.50 onwards. Here >>>>>>>>> is >>>>>>>>> the >>>>>>>>> exception that I see inside logs: >>>>>>>>> >>>>>>>>> Caused by: java.net.SocketException: Connection reset by >>>>>>>>> peer: >>>>>>>>> socket >>>>>>>>> write error >>>>>>>>> at java.net.SocketOutputStream.socketWrite0(Native Method) >>>>>>>>> at java.net.SocketOutputStream.socketWrite(Unknown Source) >>>>>>>>> at java.net.SocketOutputStream.write(Unknown Source) >>>>>>>>> at sun.security.ssl.OutputRecord.writeBuffer(Unknown Source) >>>>>>>>> at sun.security.ssl.OutputRecord.write(Unknown Source) >>>>>>>>> >>>>>>>>> Also, I notice that the problem doesn't happen with a 2KB file but >>>>>>>>> 2MB. I >>>>>>>>> don't see anything obvious in the 7.0.50 changelog which could >>>>>>>>> explain >>>>>>>>> this >>>>>>>>> behavior. Can someone please provide some pointer as what could be >>>>>>>>> causing >>>>>>>>> this? >>>>>>>>> >>>>>>>>> >>>>>>>>> https://bz.apache.org/bugzilla/show_bug.cgi?id=57617 >>>>>>>>> >>>>>>>> >>>>>>>> Fixed for next 7.0.60 in >>>>>>>> >>>>>>>> http://svn.apache.org/r1659295 >>>>>>>> >>>>>>>> The original change can be found looking for "maxSwallowSize" in the >>>>>>>> changelog >>>>>>>> >>>>>>>> >>>>>>>> Could it be "If a request that includes an Expect: 100-continue >>>>>>> header >>>>>>> >>>>>> receives anything other than a 2xx response, close the connection This >>>>>> protects against misbehaving clients that may not sent the request >>>>>> body >>>>>> in >>>>>> that case and send the next request instead. (markt) "? >>>>>> >>>>>> It was changed in 7.0.49, but 49 was not released, so 50 was the first >>>>>> version with this change. >>>>>> >>>>>> >>>>>> Regards, >>>>>> >>>>>> Rainer >>>>>> >>>>>> >>>>>> I did see this in changelog but in the captured traffic don't see any >>>>> expect 100 header request. Any other way I can confirm this on the >>>>> tomcat >>>>> side? >>>>> >>>>> Thanks, >>>>> Umesh >>>>> >>>>> >>>>> Can you please point me to SVN change for : >>>> "If a request that includes an Expect: 100-continue header receives >>>> anything other than a 2xx response, close the connection This protects >>>> against misbehaving clients that may not sent the request body in that >>>> case >>>> and send the next request instead. (markt) "? >>>> >>>> >>> http://svn.apache.org/r1540689 >>> >>> >>> Hi Rainer, >>> >> >> Thanks, I think the problem is indeed caused by this change. I downloaded >> the tomcat source, removed the above change from AbstractHttp11Processor >> and delpoyed the updated jar. The file upload didn't work right away but >> at >> least now maxSwallowSize is honored and I can upload the files per the >> size >> specified. >> >> I did the above work to confirm, but of course I don't want to ship it >> carrying modified code. Can you please suggest as what could be done in >> this case? >> > > OK, good to know. I'd say now it would be good to find out why your webapp > sends a non-2xx response code and hwich it is. > > Since you already suceeded to build tomcat, simply add a custom log or > System.out.println() statement printing response.getStatus() where the > change in r1540689 was added and tell us what it is for the failing uploads. > > Regards, > > Rainer > > > I see 401 response code. Not sure why it's 401 but may be because of the way authorization is done. Thanks, Umesh > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --001a11c284e264af35051073adb7--