hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guru Prasad P.S" <prasad...@yahoo.com>
Subject Re: instream.read() ---- In SSL mode
Date Tue, 20 Apr 2010 09:37:36 GMT
Exception trace:
java.net.SocketException: Socket Closed
        at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:201)
        at java.net.Socket.setSoTimeout(Socket.java:997)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.setSoTimeout(SSLSocketImpl.java:2061)
        at org.apache.http.impl.io.SocketInputBuffer.isDataAvailable(SocketInputBuffer.java:145)
        at org.apache.http.impl.conn.LoggingSessionInputBuffer.isDataAvailable(LoggingSessionInputBuffer.java:64)
        at org.apache.http.impl.io.IdentityInputStream.available(IdentityInputStream.java:74)
        at org.apache.http.conn.EofSensorInputStream.available(EofSensorInputStream.java:171)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:325)
        at java.io.FilterInputStream.read(FilterInputStream.java:90)
        at com.app.BaseProxyServlet.sendResponse(BaseProxyServlet.java:149)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at com.sun.comms.client.web.AnonymousRequestFilter.doFilter(AnonymousRequestFilter.java:133)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at com.sun.comms.client.web.UserTraceFilter.doFilter(UserTraceFilter.java:46)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at com.sun.comms.client.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:43)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)


Wire Log:
 [org.apache.http.wire] >> "GET /attach/request.ics?mbox=INBOX&uid=aaa12&number=6&type=text&subtype=calendar&attachment=1
HTTP/1.1[EOL]"
 [org.apache.http.wire] >> "host: localhost:9090[EOL]"
 [org.apache.http.wire] >> "user-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US;
rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729)[EOL]"
 [org.apache.http.wire] >> "accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8[EOL]"
 [org.apache.http.wire] >> "accept-language: en-us,en;q=0.5[EOL]"
 [org.apache.http.wire] >> "accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7[EOL]"
 [org.apache.http.wire] >> "keep-alive: 300[EOL]"
 [org.apache.http.wire] >> "connection: keep-alive[EOL]"
 [org.apache.http.wire] >> "referer: http://localhost:9090/app_context/layout/main.html?lang=en&00.01_144242&[EOL]"
 [org.apache.http.wire] >> "cookie: webmailsid=5jrz8rlQFdw; path=/[EOL]"
 [org.apache.http.wire] >> "[EOL]"
 [org.apache.http.wire] << "HTTP/1.1 200 OK[EOL]"
 [org.apache.http.wire] << "Date: Tue, 20 Apr 2010 09:27:38 GMT[EOL]"
 [org.apache.http.wire] << "Content-type: text/calendar; charset=UTF-8[EOL]"
 [org.apache.http.wire] << "Connection: close[EOL]"
 [org.apache.http.wire] << "Content-disposition: attachment; filename="request.ics"[EOL]"
 [org.apache.http.wire] << "[EOL]"
 [org.apache.http.headers] << HTTP/1.1 200 OK
 [org.apache.http.headers] << Date: Tue, 20 Apr 2010 09:27:38 GMT
 [org.apache.http.headers] << Content-type: text/calendar; charset=UTF-8
 [org.apache.http.headers] << Connection: close
 [org.apache.http.headers] << Content-disposition: attachment; filename="request.ics"
 [org.apache.http.wire] << "BEGIN:VCALENDAR[\r][\n]"
 [org.apache.http.wire] << "VERSION:2.0[\r][\n]"
 [org.apache.http.wire] << "PRODID:-//TEST123//EN[\r][\n]"
 [org.apache.http.wire] << "METHOD:REQUEST[\r][\n]"
 [org.apache.http.wire] << "BEGIN:VTIMEZONE[\r][\n]"
 [org.apache.http.wire] << "TZID:Asia/Kolkata[\r][\n]"
 [org.apache.http.wire] << "TZURL:http://tzurl.org/zoneinfo/Asia/Kolkata[\r][\n]"
 [org.apache.http.wire] << "X-S1CS-TZID-ALIAS:India Standard Time[\r][\n]"
 [org.apache.http.wire] << "X-S1CS-TZID-ALIAS:Asia/Calcutta[\r][\n]"
 [org.apache.http.wire] << "BEGIN:DAYLIGHT[\r][\n]"
 [org.apache.http.wire] << "TZOFFSETFROM:+0530[\r][\n]"
 [org.apache.http.wire] << "TZOFFSETTO:+0630[\r][\n]"
 [org.apache.http.wire] << "TZNAME:IST[\r][\n]"
 [org.apache.http.wire] << "DTSTART:19420901T000000[\r][\n]"
 [org.apache.http.wire] << "END:DAYLIGHT[\r][\n]"
 [org.apache.http.wire] << "BEGIN:STANDARD[\r][\n]"
 [org.apache.http.wire] << "TZOFFSETFROM:+0630[\r][\n]"
 [org.apache.http.wire] << "TZOFFSETTO:+0530[\r][\n]"
 [org.apache.http.wire] << "TZNAME:IST[\r][\n]"
 [org.apache.http.wire] << "DTSTART:19420515T000000[\r][\n]"
 [org.apache.http.wire] << "END:STANDARD[\r][\n]"
 [org.apache.http.wire] << "END:VTIMEZONE[\r][\n]"
 [org.apache.http.wire] << "BEGIN:VEVENT[\r][\n]"
 [org.apache.http.wire] << "DTSTAMP:20100330T112310Z[\r][\n]"
 [org.apache.http.wire] << "UID:e8c43bce-9beb-471b-b8ce-87a3cd1ba641[\r][\n]"
 [org.apache.http.wire] << "CLASS:PUBLIC[\r][\n]"
 [org.apache.http.wire] << "DTSTART;TZID=Asia/Kolkata:20100330T163000[\r][\n]"
 [org.apache.http.wire] << "SUMMARY:invite2[\r][\n]"
 [org.apache.http.wire] << "ATTENDEE;PARTSTAT=ACCEPTED:mailto:davuser2@domain.com[\r][\n]"
 [org.apache.http.wire] << "ATTENDEE;PARTSTAT=DECLINED:mailto:davuser1@domain.com[\r][\n]"
 [org.apache.http.wire] << "ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:ngc1@domain.com[\r][\n]"
 [org.apache.http.wire] << "DTEND;TZID=Asia/Kolkata:20100330T173000[\r][\n]"
 [org.apache.http.wire] << "ORGANIZER:mailto:davuser2@domain.com[\r][\n]"
 [org.apache.http.wire] << "END:VEVENT[\r][\n]"
 [org.apache.http.wire] << "END:VCALENDAR[\r][\n]"
 [org.apache.http.wire] << "[\r][\n]"





________________________________
From: Oleg Kalnichevski <olegk@apache.org>
To: HttpClient User Discussion <httpclient-users@hc.apache.org>
Sent: Tue, April 20, 2010 2:15:52 PM
Subject: Re: instream.read() ---- In SSL mode

On Mon, 2010-04-19 at 20:30 -0700, Guru Prasad P.S wrote:
> While reading content ( attachment in response ) from the input stream in SSL mode throws
java.net.SocketException: Socket Closed
> 
> Note: This Exception is thrown only when response has an attachment.
> 
> In non ssl mode there is no issue.
>     InputStream instream = entity.getContent();
>     int l;
>     byte[] tmp = new byte[2048];
>     while ((l = instream.read(tmp)) != -1) {
>     }
> 
> 
> java.net.SocketException: Socket Closed
>         at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:201)
>         at java.net.Socket.setSoTimeout(Socket.java:997)
>         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.setSoTimeout(SSLSocketImpl.java:2061)
>         at org.apache.http.impl.io.SocketInputBuffer.isDataAvailable(SocketInputBuffer.java:145)
>         at org.apache.http.impl.io.IdentityInputStream.available(IdentityInputStream.java:74)
>         at org.apache.http.conn.EofSensorInputStream.available(EofSensorInputStream.java:171)
> 

Please post a *COMPLETE* exception trace and preferably a wire log of
the HTTP session.

http://hc.apache.org/httpcomponents-client-4.0.1/logging.html

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: mailto:httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: mailto:httpclient-users-help@hc.apache.org


      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message