Hi All, There is no issues in authentication. I am getting
500 - Internal Server error as response while sending HTTP request with content of above 10MB. I used WireShark tool to grab the packets which is sent from client to HTTP Server. Here HTTP request packets with content from source to destination is grabbed. Any suggestions. Thanks SaravananD wrote: > > Hi hamming, > > So for this issue solution will be > > First send get request to complete authentication process. so that we can > avoid any socket error or connection time out, then we can send Post > request which has file of above 10 MB size. > > i will try this. > > Thanks > Saravanan D > > Hamming77 wrote: >> >> OK, I find that post a big file the httpclient cannot received the 401 >> unauthored packet, so the socket error. because the sending file are in >> process, the 401 respense was arrived. So i want authentication before >> post the file. >> >> Today, I find that I send the digest Authentication information in >> the post request is not right. >> 1. client send a get request >> 2. the server response 401 unauthored. >> 3. the httpclient automatic send the second packet the authentication >> info added in it. >> 4. the server response 200 OK, and the page in it. >> 5. I send the post request added the autentication manually. but this >> authentication info is not right >> so , i want to know how could generate the authentication >> automatic. >> That i use digest authentication. when authentication success in >> the second get packet, how to genertate the digest authentication info, >> in the next request.? >> >> SaravananD wrote: >>> >>> Hi Hamming, >>> >>> Could you please explain the steps you followed to resolve this issue. i >>> am still having this issue. >>> >>> I am having file of above 10MB. and we use POST method to server. If >>> authentication is issue then how this can be resolved. >>> >>> Thanks >>> >>> >>> Hamming77 wrote: >>>> >>>> Thanks for your advice, The issue was dissloved. >>>> It is because of the authentication. when the post big file the >>>> first packet is no use, open transfer this packet the second time. when >>>> the file is big, the authentication packet send by the server early >>>> arrived at client send the all data send the the server. so the socket >>>> is closed. >>>> Now I send a get request complete the authentication process.And >>>> send the post file request, this step is not used.The post request only >>>> send once. >>>> >>>> >>>> >>>> >>>> olegk wrote: >>>>> >>>>> On Fri, 2009-03-27 at 18:31 -0700, Hamming77 wrote: >>>>>> The first, I'm sorry for my english, it's rusty!!! >>>>>> >>>>>> I want to post a big file to the server, but encounter the >>>>>> issues. the >>>>>> debug information followed. >>>>>> >>>>>> And that if I post the file size < 10K, the operation success. if >>>>>> the >>>>>> file size >10K fail. >>>>>> >>>>>> the success process is :(when file size < 10k) >>>>>> 1. client post file -> server >>>>>> >>>>>> 2. client <- unauthoried server >>>>>> >>>>>> 3. client post file -> server >>>>>> >>>>>> 4. client <- 200 OK server >>>>>> >>>>>> >>>>>> the fail process is :(when file size > 10k) >>>>>> 1. client post file -> server >>>>>> >>>>>> 2. client <- unauthoried server >>>>>> 2. client <- unauthoried server >>>>>> 2. client <- unauthoried server >>>>>> >>>>>> using :DIGEST AUth sckema >>>>>> I use ethereal tools grap the packets , and found that, if the >>>>>> file >>>>>> size big, I can't grap the send packet, but grap the server respose >>>>>> that 401 >>>>>> unauthoried. And the reponse sends 4 times. but can't grap the >>>>>> sending >>>>>> packet. >>>>>> >>>>>> My settings are jdk 1.5 update 13 and Windows XP. And the >>>>>> httpclient >>>>>> version is 3.1 >>>>>> >>>>>> I guess it because of the timeout, but when setting the timeout >>>>>> longer >>>>>> no use. >>>>>> >>>>> >>>>> 'Software caused connection abort: socket write error' usually means >>>>> that the peer terminated the connection abnormally, most likely due to >>>>> an internal error of some kind. >>>>> >>>>> Hope this helps >>>>> >>>>> Oleg >>>>> >>>>> >>>>>> Thanks in advance!!! >>>>>> >>>>>> >>>>>> 2009/03/27 20:16:26:938 CST [DEBUG] HttpClient - Operating system >>>>>> name: >>>>>> Windows XP >>>>>> 2009/03/27 20:16:26:938 CST [DEBUG] HttpClient - Operating system >>>>>> architecture: x86 >>>>>> 2009/03/27 20:16:26:938 CST [DEBUG] HttpClient - Operating system >>>>>> version: >>>>>> 5.1 >>>>>> 2009/03/27 20:16:26:970 CST [DEBUG] HttpClient - SUN 1.5: SUN (DSA >>>>>> key/parameter generation; DSA signing; SHA-1, MD5 digests; >>>>>> SecureRandom; >>>>>> X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX >>>>>> CertPathBuilder; LDAP, Collection CertStores) >>>>>> 2009/03/27 20:16:26:970 CST [DEBUG] HttpClient - SunRsaSign 1.5: Sun >>>>>> RSA >>>>>> signature provider >>>>>> 2009/03/27 20:16:26:970 CST [DEBUG] HttpClient - SunJSSE 1.5: Sun >>>>>> JSSE >>>>>> provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1) >>>>>> 2009/03/27 20:16:26:970 CST [DEBUG] HttpClient - SunJCE 1.5: SunJCE >>>>>> Provider >>>>>> (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, >>>>>> Diffie-Hellman, HMAC) >>>>>> 2009/03/27 20:16:26:970 CST [DEBUG] HttpClient - SunJGSS 1.0: Sun >>>>>> (Kerberos >>>>>> v5) >>>>>> 2009/03/27 20:16:26:970 CST [DEBUG] HttpClient - SunSASL 1.5: Sun >>>>>> SASL >>>>>> provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, >>>>>> EXTERNAL, >>>>>> PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5) >>>>>> 2009/03/27 20:16:26:985 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> http.useragent = Jakarta Commons-HttpClient/3.1 >>>>>> 2009/03/27 20:16:27:095 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> http.protocol.version = HTTP/1.1 >>>>>> 2009/03/27 20:16:27:095 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> http.connection-manager.class = class >>>>>> org.apache.commons.httpclient.SimpleHttpConnectionManager >>>>>> 2009/03/27 20:16:27:095 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> http.protocol.cookie-policy = default >>>>>> 2009/03/27 20:16:27:095 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> http.protocol.element-charset = US-ASCII >>>>>> 2009/03/27 20:16:27:095 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> http.protocol.content-charset = ISO-8859-1 >>>>>> 2009/03/27 20:16:27:095 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> http.method.retry-handler = >>>>>> org.apache.commons.httpclient.defaulthttpmethodretryhand...@149d886 >>>>>> 2009/03/27 20:16:27:095 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, >>>>>> dd-MMM-yy >>>>>> HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, >>>>>> EEE, >>>>>> dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy >>>>>> HH:mm:ss >>>>>> z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE >>>>>> dd-MMM-yy >>>>>> HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, >>>>>> EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z] >>>>>> 2009/03/27 20:16:27:126 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> http.connection.timeout = 50000 >>>>>> 2009/03/27 20:16:27:126 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> http.authentication.credential-provider = >>>>>> com.h3c.imc.vsm.httpclient.vsmhttpupload$authchallen...@419d05 >>>>>> 2009/03/27 20:16:27:266 CST [DEBUG] HttpConnection - Open connection >>>>>> to >>>>>> 10.153.89.166:80 >>>>>> 2009/03/27 20:16:27:313 CST [DEBUG] header - >> "GET /FS/BOARD.ini >>>>>> HTTP/1.1[\r][\n]" >>>>>> 2009/03/27 20:16:27:313 CST [DEBUG] HttpMethodBase - Adding Host >>>>>> request >>>>>> header >>>>>> 2009/03/27 20:16:27:360 CST [DEBUG] header - >> "User-Agent: Jakarta >>>>>> Commons-HttpClient/3.1[\r][\n]" >>>>>> 2009/03/27 20:16:27:360 CST [DEBUG] header - >> "Host: >>>>>> 10.153.89.166[\r][\n]" >>>>>> 2009/03/27 20:16:27:360 CST [DEBUG] header - >> "[\r][\n]" >>>>>> 2009/03/27 20:16:27:501 CST [DEBUG] header - << "HTTP/1.1 200 >>>>>> OK[\r][\n]" >>>>>> 2009/03/27 20:16:27:501 CST [DEBUG] header - << "HTTP/1.1 200 >>>>>> OK[\r][\n]" >>>>>> 2009/03/27 20:16:27:501 CST [DEBUG] header - << "Content-Type: >>>>>> xxxxxx[\r][\n]" >>>>>> 2009/03/27 20:16:27:501 CST [DEBUG] header - << "Cache-Control: >>>>>> no-cache[\r][\n]" >>>>>> 2009/03/27 20:16:27:501 CST [DEBUG] header - << "Expires: Thu, 26 Oct >>>>>> 1995 >>>>>> 00:00:00 GMT[\r][\n]" >>>>>> 2009/03/27 20:16:27:501 CST [DEBUG] header - << "Content-Length: >>>>>> 2160[\r][\n]" >>>>>> 2009/03/27 20:16:27:501 CST [DEBUG] header - << "Server: >>>>>> Allegro-Software-RomPager/3.10[\r][\n]" >>>>>> 2009/03/27 20:16:27:501 CST [DEBUG] header - << "[\r][\n]" >>>>>> 2009/03/27 20:16:27:610 CST [DEBUG] HttpMethodBase - Resorting to >>>>>> protocol >>>>>> version default close connection policy >>>>>> 2009/03/27 20:16:27:610 CST [DEBUG] HttpMethodBase - Should NOT close >>>>>> connection, using HTTP/1.1 >>>>>> 2009/03/27 20:16:27:610 CST [DEBUG] HttpConnection - Releasing >>>>>> connection >>>>>> back to connection manager. >>>>>> 2009/03/27 20:16:27:610 CST [DEBUG] DefaultHttpParams - Set parameter >>>>>> Digest >>>>>> = [Digest] >>>>>> 2009/03/27 20:16:27:641 CST [DEBUG] HttpConnection - Open connection >>>>>> to >>>>>> 10.153.89.166:80 >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "POST /Upload6 >>>>>> HTTP/1.1[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] HttpMethodBase - Adding Host >>>>>> request >>>>>> header >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "Referer: >>>>>> http://10.153.89.166/SoftwareUpdate[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "Accept-Language: >>>>>> en-us[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "Accept-Encoding: >>>>>> gzip, >>>>>> deflate[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "Connection: >>>>>> Keep-Alive[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "Cache-Control: >>>>>> no-cache[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "Accept: image/gif, >>>>>> image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, >>>>>> application/vnd.ms-powerpoint, application/msword, >>>>>> application/x-shockwave-flash, */ *[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "User-Agent: Jakarta >>>>>> Commons-HttpClient/3.1[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "Host: >>>>>> 10.153.89.166[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "Content-Length: >>>>>> 4339209[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "Content-Type: >>>>>> multipart/form-data; boundary=DwzxTVoQcw-1HAP9I7U8FczjtzV8IA[\r][\n]" >>>>>> 2009/03/27 20:16:27:673 CST [DEBUG] header - >> "[\r][\n]" >>>>>> 2009/03/27 20:16:29:719 CST [DEBUG] HttpMethodDirector - Closing the >>>>>> connection. >>>>>> 2009/03/27 20:16:29:719 CST [INFO] HttpMethodDirector - I/O exception >>>>>> (java.net.SocketException) caught when processing request: Software >>>>>> caused >>>>>> connection abort: socket write error >>>>>> 2009/03/27 20:16:29:719 CST [DEBUG] HttpMethodDirector - Software >>>>>> caused >>>>>> connection abort: socket write error <java.net.SocketException: >>>>>> Software >>>>>> caused connection abort: socket write error>java.net.SocketException: >>>>>> Software caused connection abort: socket write error >>>>>> at java.net.SocketOutputStream.socketWrite0(Native Method) >>>>>> at >>>>>> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) >>>>>> at java.net.SocketOutputStream.write(SocketOutputStream.java:136) >>>>>> at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105) >>>>>> at >>>>>> org.apache.commons.httpclient.methods.multipart.FilePart.sendData(FilePart.java:223) >>>>>> at >>>>>> org.apache.commons.httpclient.methods.multipart.Part.send(Part.java:312) >>>>>> at >>>>>> org.apache.commons.httpclient.methods.multipart.Part.sendParts(Part.java:385) >>>>>> at >>>>>> org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity.writeRequest(MultipartRequestEntity.java:164) >>>>>> 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.h3c.imc.vsm.httpclient.VsmHttpUpload.doPost(VsmHttpUpload.java:242) >>>>>> at >>>>>> com.h3c.imc.vsm.httpclient.VsmHttpUpload.doUpgrade(VsmHttpUpload.java:141) >>>>>> at >>>>>> com.h3c.imc.vsm.httpclient.VsmHttpUpload.main(VsmHttpUpload.java:121) >>>>>> >>>>>> 2009/03/27 20:16:29:719 CST [INFO] HttpMethodDirector - Retrying >>>>>> request >>>>>> 2009/03/27 20:16:29:719 CST [DEBUG] HttpConnection - Open connection >>>>>> to >>>>>> 10.153.89.166:80 >>>>>> 2009/03/27 20:16:29:735 CST [DEBUG] header - >> "POST /Upload6 >>>>>> HTTP/1.1[\r][\n]" >>>>>> 2009/03/27 20:16:29:735 CST [DEBUG] HttpMethodBase - Adding Host >>>>>> request >>>>>> header >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "Referer: >>>>>> http://10.153.89.166/SoftwareUpdate[\r][\n]" >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "Accept-Language: >>>>>> en-us[\r][\n]" >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "Accept-Encoding: >>>>>> gzip, >>>>>> deflate[\r][\n]" >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "Connection: >>>>>> Keep-Alive[\r][\n]" >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "Cache-Control: >>>>>> no-cache[\r][\n]" >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "Accept: image/gif, >>>>>> image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, >>>>>> application/vnd.ms-powerpoint, application/msword, >>>>>> application/x-shockwave-flash, */ *[\r][\n]" >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "User-Agent: Jakarta >>>>>> Commons-HttpClient/3.1[\r][\n]" >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "Content-Length: >>>>>> 4339209[\r][\n]" >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "Content-Type: >>>>>> multipart/form-data; boundary=DwzxTVoQcw-1HAP9I7U8FczjtzV8IA[\r][\n]" >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "Host: >>>>>> 10.153.89.166[\r][\n]" >>>>>> 2009/03/27 20:16:29:766 CST [DEBUG] header - >> "[\r][\n]" >>>>>> 2009/03/27 20:16:31:828 CST [DEBUG] HttpMethodDirector - Closing the >>>>>> connection. >>>>>> 2009/03/27 20:16:31:828 CST [INFO] HttpMethodDirector - I/O exception >>>>>> (java.net.SocketException) caught when processing request: Software >>>>>> caused >>>>>> connection abort: socket write error >>>>>> 2009/03/27 20:16:31:828 CST [DEBUG] HttpMethodDirector - Software >>>>>> caused >>>>>> connection abort: socket write error <java.net.SocketException: >>>>>> Software >>>>>> caused connection abort: socket write error>java.net.SocketException: >>>>>> Software caused connection abort: socket write error >>>>>> at java.net.SocketOutputStream.socketWrite0(Native Method) >>>>>> at >>>>>> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) >>>>>> at java.net.SocketOutputStream.write(SocketOutputStream.java:136) >>>>>> at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105) >>>>>> at >>>>>> org.apache.commons.httpclient.methods.multipart.FilePart.sendData(FilePart.java:223) >>>>>> at >>>>>> org.apache.commons.httpclient.methods.multipart.Part.send(Part.java:312) >>>>>> at >>>>>> org.apache.commons.httpclient.methods.multipart.Part.sendParts(Part.java:385) >>>>>> at >>>>>> org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity.writeRequest(MultipartRequestEntity.java:164) >>>>>> 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.h3c.imc.vsm.httpclient.VsmHttpUpload.doPost(VsmHttpUpload.java:242) >>>>>> at >>>>>> com.h3c.imc.vsm.httpclient.VsmHttpUpload.doUpgrade(VsmHttpUpload.java:141) >>>>>> at >>>>>> com.h3c.imc.vsm.httpclient.VsmHttpUpload.main(VsmHttpUpload.java:121) >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [email protected] >>>>> For additional commands, e-mail: [email protected] >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/IO-Exception-when-Content-size-increases-tp22637093p22777638.html Sent from the HttpClient-User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
